[comp.os.minix] PC Minix ph1.5 tests

"Peter W. Borders" <TCBORDP%VCCSCENT.bitnet@vtvm2.cc.vt.edu> (04/17/91)

Hello all, anybody have any problems with test21 subtest1? Specifically
the rename(buf,buf1) call that generates error 91. the problem is that
it wants an error EINVAL back and it is getting EACCES. I took a look at
the code in FS (link.c) for do_rename and I am not sure if the part that
checks for the oldname being a prefix of the newname is working correctly.
This is line 16061 in the source listing in the manual. Anyone else have
this problem or is this just my baby? Thanks for any feedback.
Pete Borders

schlut@oski.toppoint.de (Olaf Schlueter) (04/20/91)

TCBORDP%VCCSCENT.bitnet@vtvm2.cc.vt.edu (Peter W. Borders) writes:

>Hello all, anybody have any problems with test21 subtest1? Specifically
>the rename(buf,buf1) call that generates error 91. the problem is that
>it wants an error EINVAL back and it is getting EACCES. I took a look at
>the code in FS (link.c) for do_rename and I am not sure if the part that
>checks for the oldname being a prefix of the newname is working correctly.
>This is line 16061 in the source listing in the manual. Anyone else have
>this problem or is this just my baby? Thanks for any feedback.
>Pete Borders

The check in do_rename is correct, but the rename call in test21 fails
earlier, if the permissions of /usr/src and /usr/src/test are not 777.

Indeed the rename call is rename("/usr/src/test", "/usr/src/test/wozzy").
As been told in the manual, you should compile as root, but test as
an ordinary user. If you do so, but decided earlier to protect your
/usr/src directory tree against ordinary users, the rename call
fails not because of the prefix rule but because you have no write
permission to /usr/src, so you are not allowed to rename a
file or directory within /usr/src.

There are several other reasons for the test programs to misbehave:

First of all, it is indeed necessary NOT to be root when running the
tests.  test11 must have suid root set (I put this into the Makefile). 
Then take care that you have umask 0 (I put an umask 0 into run.sh). 
Finally be sure that there are not too much other processes running. 
Test17 and test18 are using a couple of filedescriptors and failed by
filling up the system's filedes table (ENFILE error) when I was running
a make as bin on the other virtual console. 

One test (I don't know which) dumps core without telling you about that.
Probably this is intended. 
-- 
Olaf Schlueter, Sandkuhle 4-6, 2300 Kiel 1, Germany, Toppoint Mailbox e.V.
schlut@oski.toppoint.de, olaf@tpki.toppoint.de, (..!unido!tpki!olaf)