bug-coreutils
[Top][All Lists]
Advanced

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

Re: testsuite portability nit


From: Paul Eggert
Subject: Re: testsuite portability nit
Date: Mon, 18 Apr 2005 11:48:50 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.4 (gnu/linux)

Eric Blake <address@hidden> writes:

> What was wrong with my proposed patch?

I had some qualms with it, because it added coupling between the test
cases and the rest of the code, by propagating BUILD_SRC_DIR and
EXEEXT from the latter to the former.  Coupling like that places extra
constraints on future mainstream development, and makes it harder for
others to figure out what's going on in the test cases.  The extra
cost is relatively small here, but the benefit is small as well, and
in my judgment the tradeoff wasn't quite worth it.

Looking forward, I'd rather have the Microsoft-Windows-specific stuff
be relatively isolated -- ideally, in a separate subdirectory where
the mainstream developers don't have to worry about it.  We're not at
this point with coreutils, but I'd rather not make it harder to head
in that direction.

Jim may have other opinions, though.  Perhaps he'd prefer the approach
of the original patch, in which case we should install that instead.


> `test -r ../../src/dd' succeeds on cygwin because of .exe magic
> built in to cygwin stat(2); the failure comes later when open(2)
> fails after the stat(2) succeeded

Sorry, I wasn't aware of the complexity of this particular problem.
I installed the following patch to work around this glitch.

2005-04-18  Paul Eggert  <address@hidden>

        * tests/install/basic-1: Use "cat", not "test", to test for
        ../../src/dd.  Problem reported by Eric Blake.

--- basic-1     18 Apr 2005 06:35:06 -0000      1.12
+++ basic-1     18 Apr 2005 18:48:22 -0000      1.14
@@ -8,7 +8,9 @@ fi
 dir=dir
 file=file
 
-test -r ../../src/dd || {
+# Skip this test if we're on a non-POSIX platform where executables' names end
+# in .exe, or we have some other problem like that.
+cat ../../src/dd > /dev/null || {
   echo >&2 "$0: ../../src/dd is not readable, so can't run this test"
   exit 77
 }




reply via email to

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