more Linux test fallout
Eric Blake <[email protected]>
| Newsgroups | gmane.comp.gnu.m4.patches |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 While testing on a Linux machine, where new subdirectories inherit special bits from their parent, I got a spurious test failure when I started in a setgid dir. Unrelated (so I'll do two commits), I noticed the 'stdin seekable' test was skipping too soon. I originally put the skip there because of platforms where exit() doesn't fflush(stdin), but that is now covered by the closein module. And since a skip instead of a fail is still useful information (the first half of the test must have succeeded); we only need to skip broken sed just before using sed as a subprocess. 2007-04-12 Eric Blake <[email protected]> Allow for running test in sticky or setgid directory. * tests/builtins.at (mkdtemp): Adjust test. Don't test for broken sed too soon. * tests/others.at (stdin seekable): Rearrange subtests. - -- Don't work too hard, make some time for fun as well! Eric Blake [email protected] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGHm5O84KuGfSFAYARAnVBAJ0Yl8Ixsm3yQdEzLNqyDE3A5b5G9gCfUUPc /pbE0+SAjfnfhZySc6abJks= =EWN9 -----END PGP SIGNATURE----- _______________________________________________ M4-patches mailing list [email protected] http://lists.gnu.org/mailman/listinfo/m4-patches
m4.patch259
(text/plain, 2.2 KB)
Index: tests/builtins.at
===================================================================
RCS file: /sources/m4/m4/tests/builtins.at,v
retrieving revision 1.39
diff -u -p -r1.39 builtins.at
--- tests/builtins.at 28 Mar 2007 11:42:04 -0000 1.39
+++ tests/builtins.at 12 Apr 2007 17:22:02 -0000
@@ -451,9 +451,10 @@ AT_CHECK_M4([in], [1], [[
]], [[m4:in:1: mkdtemp: cannot create directory from template `no_such_dir/m4-fooXXXXXX': No such file or directory
]])
-dnl Check that umask has an effect
+dnl Check that umask has an effect. drws--S--T is okay.
AT_DATA([[in]],
-[[substr(esyscmd(`ls -ld 'mkdtemp(`m4-fooXXXXXX')), `0', `10')
+[[translit(substr(esyscmd(`ls -ld 'mkdtemp(`m4-fooXXXXXX')), `0', `10'),
+ `SsT', `-x-')
]])
AT_CHECK([m4 < in], [0], [[drwx------
]])
Index: tests/others.at
===================================================================
RCS file: /sources/m4/m4/tests/others.at,v
retrieving revision 1.33
diff -u -p -r1.33 others.at
--- tests/others.at 12 Apr 2007 16:27:20 -0000 1.33
+++ tests/others.at 12 Apr 2007 17:22:02 -0000
@@ -473,12 +473,6 @@ AT_DATA([in.m4], [[m4exit(
AT_CHECK([(m4; cat) < in.m4], [0], [[trailing data
]])
-dnl Not all OS's have a libc that gets the remaining tests right (for
-dnl example, cygwin 1.5.22 and earlier).
-AT_CHECK([(sed -ne 1q; cat) < in.m4], [0], [stdout])
-AT_CHECK([test "x`cat stdout`" = "x0)trailing data" || \
- { echo "skipping: sed is too greedy on seekable stdin"; exit 77; }])
-
dnl Check external follow-on process, after fatal error.
dnl We can't use AT_CHECK_M4, so we must post-process stderr ourselves.
AT_DATA([in.m4], [[dnl(
@@ -490,6 +484,12 @@ AT_CHECK([[sed 's/^[^:]*[lt-]*m4[.ex]*:/
[[m4:stdin:1: Warning: dnl: extra arguments ignored: 1 > 0
]])
+dnl Not all sed and libc combinations get the remaining tests right (for
+dnl example, sed 4.1.4 on glibc, or cygwin 1.5.22 and earlier).
+AT_CHECK([(sed -ne 1q; cat) < in.m4], [0], [stdout])
+AT_CHECK([test "x`cat stdout`" = "x0)trailing data" || \
+ { echo "skipping: sed is too greedy on seekable stdin"; exit 77; }])
+
dnl Ensure that esyscmd resumes parsing where the child process left off.
AT_DATA([in.m4], [[define(`foo', `FOO')m4 foo
esyscmd(`sed -e "s/foo/bar/;q"')sed foo