[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#7849: new instspc* test failures
From: |
Peter Rosin |
Subject: |
bug#7849: new instspc* test failures |
Date: |
Wed, 04 Jan 2012 15:17:45 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Stefano Lattarini skrev 2012-01-04 13:24:
> (Me rummaging in older bug reports ...)
>
> Reference:
> <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7849>
>
> On 01/16/2011 09:46 AM, Ralf Wildenhues wrote:
>> There are a number of new failures since the splitup of instspc.test.
>> Most seem to stem from increased coverage. Rather than putting each
>> failure in a different PR, I'm listing a number of them here; we can
>> still split things out further later if that proves necessary.
>>
>> On MinGW, instspc-carriageret-* fail because the CR character is not
>> treated correctly by the shell and/or other tools like sed. I don't
>> think this is fixable without fixing the shell.
>>
>> On Cygwin, instspc-dotdotdot-build.test fails because executing a COFF
>> binary in a directory named '...' fails (causing the "compiler works"
>> test to fail at configure time):
>>
>> $ mkdir ...
>> $ cd ...
>> $ cp /usr/bin/ls.exe .
>> $ ./ls.exe
>> bash: ./ls.exe: No such file or directory
>>
> Can anyone still reproduce such failures with the latest version of
> `instspc.tap' from master? If yes, can anyone suggest some workarounds
> for failures that are due to bugs/limitations in Cygwin and MSYS rather
> than to automake bugs?
Cygwin runs the test ok these days, but not MSYS/MinGW.
MSYS still stumbles on carriageret and the only workaround I could
think of is to check if the current test is carriageret and
skip instead of fail if $test_string is empty in that case.
But that's quite ugly, and doesn't really bring us much as the test
falls over again on dosdrive aka 'a:'. On MSYS, "mkdir ./a:" creates
the directory "a", w/o the trailing colon. Marvelous.
So, next (ugly as hell) thing to do is to try to create a dir with
only a colon if there is any colon in $test_string and skip if that
fails.
If you're not busy puking all over the place after reading the
patch, you might be able to convince me to write a commit message
for it...
The test no longer "fatals" on MSYS/MingW with these changes
(instspc: exit 0).
Cheers,
Peter
diff --git a/tests/instspc.tap b/tests/instspc.tap
index 9eb145f..b408c16 100755
--- a/tests/instspc.tap
+++ b/tests/instspc.tap
@@ -236,11 +236,26 @@ for test_name in $test_names_list; do
eval "test_string=\${instspc__$test_name}" \
&& test x"$test_string" != x \
- || fatal_ "invalid test name: '$test_name'"
+ || {
+ test x"$test_name" != xcarriageret \
+ && fatal_ "invalid test name: '$test_name'"
+ skip_ "CR probably treated as NL: '$test_name'"
+ continue
+ }
# Skip the next checks if this system doesn't support the required
# characters in file names.
+ case $test_string in
+ *:*)
+ if mkdir "./:"; then
+ rmdir "./:"
+ else
+ test_string=':'
+ fi
+ ;;
+ esac
+
mkdir "./$test_string" || {
skip_ -r "mkdir failed" "$test_name in builddir"
skip_ -r "mkdir failed" "$test_name in destdir"