m4-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

more Linux test fallout


From: Eric Blake
Subject: more Linux test fallout
Date: Thu, 12 Apr 2007 11:37:19 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.10) Gecko/20070221 Thunderbird/1.5.0.10 Mnenhy/0.7.5.666

-----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  <address@hidden>

        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             address@hidden
-----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-----
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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]