Re: 5.96: 3 test failures on HP-UX 11.23
Jim Meyering [EMAIL PROTECTED] writes: it's because HP-UX's exec-family functions are not POSIX conforming. Thanks for explaining this. The first failure, though, I think is due to an unportable use of \ and \ in a sed pattern. And the other failures can be worked around. I installed this into the trunk. Maybe some of these should go into the 5.9x branch? 2006-06-01 Paul Eggert [EMAIL PROTECTED] Fix some porting problems in the test cases reported by Ralf Wildenhues for HP-UX 11.23 in: http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html * tests/help-version: Don't assume that \ \ works in sed. * tests/misc/close-stdout: Don't assume that - works. Add a /dev/full test. * tests/touch/no-create-missing: Don't assume that - works. Index: tests/help-version === RCS file: /fetish/cu/tests/help-version,v retrieving revision 1.19 diff -p -u -r1.19 help-version --- tests/help-version 5 Mar 2006 17:28:42 - 1.19 +++ tests/help-version 1 Jun 2006 07:07:53 - @@ -42,7 +42,7 @@ scripts to fail, so it is being removed programs checked by this test. EOF - all_programs=`echo $all_programs|sed 's/\groups\ *//'` + all_programs=`echo $all_programs | tr ' ' '\n' | grep -v '^groups$'` fi ;; esac Index: tests/misc/close-stdout === RCS file: /fetish/cu/tests/misc/close-stdout,v retrieving revision 1.3 diff -p -u -r1.3 close-stdout --- tests/misc/close-stdout 14 Nov 2004 11:08:22 - 1.3 +++ tests/misc/close-stdout 1 Jun 2006 07:07:53 - @@ -42,9 +42,19 @@ sleep 0 - || fail=1 $pwd/../../src/true - || fail=1 $pwd/../../src/printf '' - || fail=1 -# Ensure these fail, because stdout is closed and they *do* -# generate output. -$pwd/../../src/printf 'foo' - 2/dev/null fail=1 -cp --verbose a b - 2/dev/null fail=1 +# If - works, ensure these fail, because stdout is closed and they +# *do* generate output. - apparently does not work in HP-UX 11.23. +# This test is ineffective unless /dev/stdout also works. +if $pwd/../../src/test -w /dev/stdout /dev/null + $pwd/../../src/test ! -w /dev/stdout -; then + $pwd/../../src/printf 'foo' - 2/dev/null fail=1 + cp --verbose a b - 2/dev/null fail=1 +fi + +# Likewise for /dev/full, if /dev/full works. +if test -w /dev/full test -c /dev/full; then + $pwd/../../src/printf 'foo' /dev/full 2/dev/null fail=1 + cp --verbose a b /dev/full 2/dev/null fail=1 +fi (exit $fail); exit $fail Index: tests/touch/no-create-missing === RCS file: /fetish/cu/tests/touch/no-create-missing,v retrieving revision 1.5 diff -p -u -r1.5 no-create-missing --- tests/touch/no-create-missing 26 Sep 2005 23:02:46 - 1.5 +++ tests/touch/no-create-missing 1 Jun 2006 07:07:53 - @@ -25,8 +25,15 @@ fail=0 touch -c no-file /dev/null 21 || fail=1 touch -cm no-file /dev/null 21 || fail=1 touch -ca no-file /dev/null 21 || fail=1 -touch -c - - 2 /dev/null || fail=1 -touch -cm - - 2 /dev/null || fail=1 -touch -ca - - 2 /dev/null || fail=1 + +# If - works, test touch -c - etc. +# - apparently does not work in HP-UX 11.23. +# This test is ineffective unless /dev/stdout also works. +if $pwd/../../src/test -w /dev/stdout /dev/null + $pwd/../../src/test ! -w /dev/stdout -; then + touch -c - - 2 /dev/null || fail=1 + touch -cm - - 2 /dev/null || fail=1 + touch -ca - - 2 /dev/null || fail=1 +fi (exit $fail); exit $fail ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: 5.96: 3 test failures on HP-UX 11.23
Paul Eggert [EMAIL PROTECTED] wrote: Jim Meyering [EMAIL PROTECTED] writes: it's because HP-UX's exec-family functions are not POSIX conforming. Thanks for explaining this. The first failure, though, I think is due to an unportable use of \ and \ in a sed pattern. And the other failures can be worked around. I installed this into the trunk. Maybe some of these should go into the 5.9x branch? 2006-06-01 Paul Eggert [EMAIL PROTECTED] Fix some porting problems in the test cases reported by Ralf Wildenhues for HP-UX 11.23 in: http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00238.html * tests/help-version: Don't assume that \ \ works in sed. * tests/misc/close-stdout: Don't assume that - works. Add a /dev/full test. * tests/touch/no-create-missing: Don't assume that - works. Nice work-around. Thanks for the patches. I've put them on the branch, too. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: 5.96: 3 test failures on HP-UX 11.23
Hi Paul, * Paul Eggert wrote on Thu, Jun 01, 2006 at 09:14:42AM CEST: Jim Meyering [EMAIL PROTECTED] writes: it's because HP-UX's exec-family functions are not POSIX conforming. Thanks for explaining this. The first failure, though, I think is due to an unportable use of \ and \ in a sed pattern. And the other failures can be worked around. I installed this into the trunk. I can confirm that make test passes on HP-UX 11.23 with this. Thanks! Cheers, Ralf ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: 5.96: 3 test failures on HP-UX 11.23
Thanks for reporting this. All these failures seem to be due to a portability problem in lib/closeout.c. Could you please run, say, cp --verbose /dev/null /tmp/foo - /dev/null in a debugger, putting a breakpoint on the close_stdout function, and see why it isn't calling 'error' with a nonzero exit_failure value? ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: 5.96: 3 test failures on HP-UX 11.23
Hi Paul, * Paul Eggert wrote on Tue, May 30, 2006 at 09:51:17AM CEST: Thanks for reporting this. All these failures seem to be due to a portability problem in lib/closeout.c. Could you please run, say, cp --verbose /dev/null /tmp/foo - /dev/null in a debugger, putting a breakpoint on the close_stdout function, and see why it isn't calling 'error' with a nonzero exit_failure value? (I assume you meant ... - 2/dev/null.) 80if (prev_fail || fclose_fail) (gdb) bt full #0 close_stdout () at ../../coreutils-5.96/lib/closeout.c:80 prev_fail = 0 '\000' none_pending = 0 '\000' fclose_fail = 0 '\000' #1 0x7afbb880 in exit+0x70 () from /usr/lib/libc.2 No symbol table info available. #2 0x7960 in main (argc=4, argv=0x7eff02f4) at ../../coreutils-5.96/src/cp.c:1022 c = -1 ok = 1 '\001' make_backups = 0 '\000' backup_suffix_string = 0x0 version_control_string = 0x0 x = {backup_type = no_backups, copy_as_regular = 1 '\001', dereference = DEREF_ALWAYS, unlink_dest_before_opening = 0 '\000', unlink_dest_after_failed_open = 0 '\000', hard_link = 0 '\000', interactive = I_UNSPECIFIED, move_mode = 0 '\000', chown_privileges = 0 '\000', one_file_system = 0 '\000', preserve_ownership = 0 '\000', preserve_mode = 0 '\000', preserve_timestamps = 0 '\000', preserve_links = 0 '\000', require_preserve = 0 '\000', recursive = 0 '\000', set_mode = 0 '\000', mode = 0, sparse_mode = SPARSE_AUTO, symbolic_link = 0 '\000', umask_kill = 65533, update = 0 '\000', verbose = 1 '\001', stdin_tty = 0 '\000', dest_info = 0x0, src_info = 0x0} copy_contents = 0 '\000' target_directory = 0x0 no_target_directory = 0 '\000' (gdb) p errno A $2 = 2 Seems fclose (stdout) isn't returning an error in this case. Cheers, Ralf ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: 5.96: 3 test failures on HP-UX 11.23
Ralf Wildenhues [EMAIL PROTECTED] writes: (I assume you meant ... - 2/dev/null.) Yes, thanks. Actually, the 2/dev/null can be omitted. Seems fclose (stdout) isn't returning an error in this case. Ouch. I suppose one possibility is a bug in the HP-UX C library. Another is that stdout happens to be open somehow. To test the latter hypothesis, can you run the HP-UX equivalent of strace -o /tmp/tr cp --verbose /dev/null /tmp/foo - to see whether stdout is closed? If not, I suppose you can run the debugger, plant a breakpoint at close_stdout, and see what close(1) returns. Here's what the tail of that strace looks like on a GNU/Linux machine. open(/dev/null, O_RDONLY|O_LARGEFILE) = 1 fcntl64(1, F_DUPFD, 3) = 3 close(1)= 0 fstat64(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0 open(/tmp/foo, O_WRONLY|O_TRUNC|O_LARGEFILE) = 1 fcntl64(1, F_DUPFD, 3) = 4 close(1)= 0 fstat64(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0 fstat64(3, {st_mode=S_IFCHR|0666, st_rdev=makedev(1, 3), ...}) = 0 read(3, , 4096) = 0 close(4)= 0 close(3)= 0 write(1, `/dev/null\' - `/tmp/foo\'\n, 26) = -1 EBADF (Bad file descriptor) close(1)= -1 EBADF (Bad file descriptor) munmap(0x40018000, 8192)= 0 write(2, cp: , 4) = 4 write(2, write error, 11) = 11 write(2, : Bad file descriptor, 21) = 21 write(2, \n, 1) = 1 exit_group(1) = ? ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
Re: 5.96: 3 test failures on HP-UX 11.23
Ralf Wildenhues [EMAIL PROTECTED] wrote: I get 3 failures on hppa2.0w-hp-hpux11.23: Regarding this one, misc/close-stdout it's because HP-UX's exec-family functions are not POSIX conforming. As described in http://www.opengroup.org/susv3xsh/execl.html, calling exec* with one or more of the three standard file descriptors closed, system implementations may open an unspecified file for each of these file descriptors in the new process image., but only if the exec'd program is run set-ID. HP-UX, however, does this even when running non-set-ID programs, thus making what should be a write failure appear to be a successful write, even though it's to /dev/null. ___ Bug-coreutils mailing list Bug-coreutils@gnu.org http://lists.gnu.org/mailman/listinfo/bug-coreutils
5.96: 3 test failures on HP-UX 11.23
I get 3 failures on hppa2.0w-hp-hpux11.23: misc/close-stdout, touch/no-create-missing, and help-version (groups), see the verbose output below. Note that I also get the warning below. On ia64-hp-hpux11.23, the same tests fail. On hppa2.0w-hp-hpux11.11, I get no test failures, and no such warning. Cheers, Ralf WARNING: On this system, the built-in echo function of /bin/sh does not report failure when writing to a full device. To demonstrate, run this command: /bin/sh -c 'echo hello /dev/full; echo status=$?' Notice that the failing echo leaves its exit status set to zero and does not produce a diagnostic. That bug in /bin/sh would cause the test of the groups scripts to fail, so it is being removed from the list of programs checked by this test. gmake check-TESTS gmake[1]: Entering directory `/home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/misc' + rm --version rm (GNU coreutils) 5.96 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License http://www.gnu.org/licenses/gpl.html. There is NO WARRANTY, to the extent permitted by law. Written by Paul Rubin, David MacKenzie, Richard Stallman, and Jim Meyering. + + pwd pwd=/home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/misc + + echo ../../../coreutils-5.96/tests/misc/close-stdout + sed s,.*/,, t0=close-stdout.tmp + tmp=close-stdout.tmp/17850 + trap status=$?; cd $pwd; chmod -R u+rwx $t0; rm -rf $t0 exit $status 0 + trap (exit $?); exit $? 1 2 13 15 + framework_failure=0 + mkdir -p close-stdout.tmp/17850 + cd close-stdout.tmp/17850 + test 0 = 1 + PATH=/home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/misc/../..:/home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/misc/../../src:/home/ralf/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/bin/X11:/opt/aCC/bin:/opt/ansic/bin:/usr/ccs/bin:/usr/contrib/bin/X11 + export PATH + fail=0 + touch a + cp a b + + test -f b + chmod o-w . + + ln a c + + rm c + + mkdir d + + mv d e + + rmdir e + + touch e + + sleep 0 + + /home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/misc/../../src/true + + /home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/misc/../../src/printf + + /home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/misc/../../src/printf foo + 2 /dev/null + fail=1 + cp --verbose a b + 2 /dev/null + fail=1 + exit 1 + exit 1 + status=1 + cd /home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/misc + chmod -R u+rwx close-stdout.tmp + rm -rf close-stdout.tmp + exit 1 FAIL: close-stdout gmake check-TESTS gmake[1]: Entering directory `/home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/touch' + touch --version touch (GNU coreutils) 5.96 Copyright (C) 2006 Free Software Foundation, Inc. This is free software. You may redistribute copies of it under the terms of the GNU General Public License http://www.gnu.org/licenses/gpl.html. There is NO WARRANTY, to the extent permitted by law. Written by Paul Rubin, Arnold Robbins, Jim Kingdon, David MacKenzie, and Randy Smith. + + pwd pwd=/home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/touch + + echo ../../../coreutils-5.96/tests/touch/no-create-missing + sed s,.*/,, tmp=no-create-missing.tmp + trap status=$?; cd $pwd; rm -rf $tmp exit $status 0 + trap (exit $?); exit 1 2 13 15 + framework_failure=0 + mkdir no-create-missing.tmp + cd no-create-missing.tmp + test 0 = 1 + fail=0 + touch -c no-file + 1 /dev/null 2 1 + touch -cm no-file + 1 /dev/null 2 1 + touch -ca no-file + 1 /dev/null 2 1 + touch -c - + 2 /dev/null + fail=1 + touch -cm - + 2 /dev/null + fail=1 + touch -ca - + 2 /dev/null + fail=1 + exit 1 + exit 1 + status=1 + cd /home/ralf/coreutils/build-hppa2.0w-hp-hpux11.23/tests/touch + rm -rf no-create-missing.tmp + exit 1 FAIL: no-create-missing $ gmake check-TESTS VERBOSE=yes TESTS=help-version [...] + test groups = test + test groups = false + test groups = install + ../src/groups --help + 1 h-groups + ../src/groups --version + 1 /dev/null + grep bug-coreutils@gnu.org h-groups + 1 /dev/null + rm -f h-groups + test -w /dev/full + test -c /dev/full + ../src/groups --help + 1 /dev/full 2 /dev/null + fail=1 + ../src/groups --version + 1 /dev/full 2 /dev/null + fail=1 + status=0 + test groups = [ + prog=groups + eval expected=$expected_failure_status_groups + expected= + test x = x + expected=1 + test 0 = 1 + fail=1 + echo *** groups: bad exit status `0' (expected 1), + 1 2 *** groups: bad exit status `0' (expected 1), + echo with --help or --version output redirected to /dev/full + 1 2 with --help or --version output redirected to /dev/full + test head = test + test head = false + test head = install [...] [ three instances of the above sequence ] + 0 in-17911 1 out-17911 + : + rm -rf in-17911 in2-17911 out-17911 dir-17911 + cd .. + rm -rf tmp-17911 + exit 1 FAIL: help-version