Xref: utzoo comp.lang.perl:3570 comp.sys.hp:7384 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!ruuinf!piet From: piet@cs.ruu.nl (Piet van Oostrum) Newsgroups: comp.lang.perl,comp.sys.hp Subject: Re: make test fails on hp 9000s300, why? Message-ID: <4670@ruuinf.cs.ruu.nl> Date: 16 Jan 91 10:05:25 GMT References: <1991Jan11.133837@cs.utwente.nl> Sender: news@ruuinf.cs.ruu.nl Reply-To: piet@cs.ruu.nl (Piet van Oostrum) Followup-To: comp.lang.perl Organization: Dept of Computer Science, Utrecht University, The Netherlands Lines: 54 In-reply-to: belinfan@cs.utwente.nl (Axel Belinfante) >>>>> In message <1991Jan11.133837@cs.utwente.nl>, belinfan@cs.utwente.nl (Axel Belinfante) (AB) writes: AB> I tried to compile perl 3.41 on a hp9000s300 machine, running hp-ux 7.0. AB> It compiles ok, as long as i don't try to compile it with -O AB> (if i do, cc hangs in eval.c). AB> The problems start when i run `make test'. AB> test op.read fails, the other tests run ok: >> % op.read >> 1..4 >> ok 1 >> ok 2 >> not ok 3 >> not ok 4 I experienced the same problem. Even more strangely, the test also failed on pl 41 and on an old perl pl 18. I traced it with adb, and found that the read after the seek(20000) returned a full buffer of zero bytes. I finally traced it down to the perl directory being on a NFS mounted filesystem. So I bet you have your perl directory also on NFS. When I run the test from the machine where perl was located the problem disappeared. It seems that the HP-UX implementation of NFS returns a full buffer of zero bytes if you do a lseek after the end of file, followed by a read. I would say this is a bug. The problem does not appear to be in the server as it works correctly from other machines (e.g. a Sun), even if the actual file system is on a HP. Here is a short C program that duplicates the problem: #include main() { /* Note : use an NFS mounted file */ FILE * f = fopen ("/usr/staff/src/perl3.0/README", "r"); int i, n; char buf[80]; fseek (f, 20000L, 0); n = fread (buf, 1,5,f); printf ("%d: ", n); for (i=0; i