Xref: utzoo comp.lang.perl:2687 comp.sys.apollo:6871 Path: utzoo!utgpu!watserv1!watmath!att!rutgers!usc!orion.oac.uci.edu!mheffron From: mheffron@orion.oac.uci.edu (Matt Heffron) Newsgroups: comp.lang.perl,comp.sys.apollo Subject: perl difficulties on Apollo Message-ID: <2724E240.153@orion.oac.uci.edu> Date: 24 Oct 90 00:37:20 GMT Reply-To: mheffron@orion.oac.uci.edu (Matt Heffron) Organization: Beckman Instruments, Inc. Lines: 71 I've just installed perl V3.0 pl 37 on an Apollo DN3500 running Domain/OS (10.2) and two tests fail, both with file mode related errors. Does anyone have any advice/opinions/... ? The first seems to be an assumption in the io.fs test: # $Header: io.fs,v 3.0.1.1 90/08/13 22:31:17 lwall Locked $ print "1..22\n"; $wd = `pwd`; chop($wd); `rm -f tmp 2>/dev/null; mkdir tmp 2>/dev/null`; chdir './tmp'; `/bin/rm -rf a b c x`; umask(022); if (umask(0) == 022) {print "ok 1\n";} else {print "not ok 1\n";} open(fh,'>x') || die "Can't create x"; close(fh); open(fh,'>a') || die "Can't create a"; # ^^^^^^^^^^^^^ What here specifies that the file should have mode 0666 ?? # It seems to be a somewhat erroneous assumption in the test. # (perl's 'open' uses the 'fopen' routine with mode "w", why # MUST the "real" mode on the file therefor be 0666 ??) # (On Apollo Domain/OS the default file creation ACL # for the directory (tmp) is used for the file.) close(fh); if (link('a','b')) {print "ok 2\n";} else {print "not ok 2\n";} if (link('b','c')) {print "ok 3\n";} else {print "not ok 3\n";} ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('c'); if ($nlink == 3) {print "ok 4\n";} else {print "not ok 4\n";} if (($mode & 0777) == 0666) {print "ok 5\n";} else {print "not ok 5\n";} # ^^^^^^^^^^^^^^^^^^^^^^ The failed assumption above appears here. (By the way, it is NOT stat failing. If I change the ACL to disallow execute for owner, group, and world; then the test passes.) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - The second seems to be a real bug in Domain/OS itself, manifesting itself in the op.dbm test: # $Header: op.dbm,v 3.0.1.1 90/03/27 16:25:57 lwall Locked $ if (!-r '/usr/include/dbm.h' && !-r '/usr/include/ndbm.h') { print "1..0\n"; exit; } print "1..10\n"; unlink 'Op.dbmx.dir', 'Op.dbmx.pag'; umask(0); print (dbmopen(h,'Op.dbmx',0640) ? "ok 1\n" : "not ok 1\n"); # ^^^^^^^^^^^^^^^^^^^^^^^^ the file is created with the default file # creation ACL for the directory, not the # specified mode 0640 ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime, $blksize,$blocks) = stat('Op.dbmx.pag'); print (($mode & 0777) == 0640 ? "ok 2\n" : "not ok 2\n"); # ^^^^^^^^^^^^^^^^^^^^^^ Here's where it becomes apparent -Matt Heffron mheffron@orion.oac.uci.edu (now) heffron@falstaff.css.beckman.com (soon!!)