GNU bug report logs - #16075
ls/stat-free-color.sh fails on AArch64 architecture

Previous Next

Package: coreutils;

Reported by: Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>

Date: Fri, 6 Dec 2013 16:25:02 UTC

Severity: normal

Done: Pádraig Brady <P <at> draigBrady.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16075 in the body.
You can then email your comments to 16075 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Fri, 06 Dec 2013 16:25:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Fri, 06 Dec 2013 16:25:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
To: bug-coreutils <at> gnu.org
Subject: ls/stat-free-color.sh fails on AArch64 architecture
Date: Fri, 06 Dec 2013 16:50:04 +0100
[Message part 1 (text/plain, inline)]
Test checks for use of stat,lstat,stat64,lstat64 syscalls. But on
AArch64 it is using statfs64 and newfstatat calls so test fails.

log and log-help attached

Commands used:
strace -o log ls --color=always >/dev/null
strace -o log-help ls --help >/dev/null
[log-help (text/plain, attachment)]
[log (text/plain, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Fri, 06 Dec 2013 16:49:01 GMT) Full text and rfc822 format available.

Message #8 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>, 16075 <at> debbugs.gnu.org
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Fri, 06 Dec 2013 17:48:40 +0100
On 12/06/2013 04:50 PM, Marcin Juszkiewicz wrote:
> Test checks for use of stat,lstat,stat64,lstat64 syscalls. But on
> AArch64 it is using statfs64 and newfstatat calls so test fails.
> 
> log and log-help attached
> 
> Commands used:
> strace -o log ls --color=always >/dev/null
> strace -o log-help ls --help >/dev/null

Thanks for the bug report.
Does adding both system calls as in the following patch help?

Thanks & have a nice day,
Berny


diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
index 3aacf96..145c566 100755
--- a/tests/ls/stat-free-color.sh
+++ b/tests/ls/stat-free-color.sh
@@ -53,10 +53,11 @@ eval $(dircolors -b color-without-stat)
 # To avoid counting those, first get a baseline count by running
 # ls with only the --help option.  Then, compare that with the
 # invocation under test.
-strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
+stats='stat,lstat,stat64,lstat64,statfs64,newfstatat'
+strace -o log-help -e "$stats" ls --help >/dev/null || fail=1
 n_lines_help=$(wc -l < log-help)

-strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
+strace -o log -e "$stats" ls --color=always . || fail=1
 n_lines=$(wc -l < log)

 n_stat=$(expr $n_lines - $n_lines_help)




Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Fri, 06 Dec 2013 17:21:01 GMT) Full text and rfc822 format available.

Message #11 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 16075 <at> debbugs.gnu.org, Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Fri, 06 Dec 2013 17:20:32 +0000
On 12/06/2013 04:48 PM, Bernhard Voelker wrote:
> On 12/06/2013 04:50 PM, Marcin Juszkiewicz wrote:
>> Test checks for use of stat,lstat,stat64,lstat64 syscalls. But on
>> AArch64 it is using statfs64 and newfstatat calls so test fails.
>>
>> log and log-help attached
>>
>> Commands used:
>> strace -o log ls --color=always >/dev/null
>> strace -o log-help ls --help >/dev/null
> 
> Thanks for the bug report.
> Does adding both system calls as in the following patch help?
> 
> Thanks & have a nice day,
> Berny
> 
> 
> diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
> index 3aacf96..145c566 100755
> --- a/tests/ls/stat-free-color.sh
> +++ b/tests/ls/stat-free-color.sh
> @@ -53,10 +53,11 @@ eval $(dircolors -b color-without-stat)
>  # To avoid counting those, first get a baseline count by running
>  # ls with only the --help option.  Then, compare that with the
>  # invocation under test.
> -strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
> +stats='stat,lstat,stat64,lstat64,statfs64,newfstatat'
> +strace -o log-help -e "$stats" ls --help >/dev/null || fail=1
>  n_lines_help=$(wc -l < log-help)
> 
> -strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
> +strace -o log -e "$stats" ls --color=always . || fail=1
>  n_lines=$(wc -l < log)
> 
>  n_stat=$(expr $n_lines - $n_lines_help)

That would probably work, though perhaps we should
make this test a bit more general with something like the following?

Also Marcin, could you try out the latest snapshot (which will
also need the patch applied). It has another aarch64 specific patch included,
and it would be great to verify it on this platform.
Two birds with one stone and all that. Simple test instructions at:
http://lists.gnu.org/archive/html/coreutils/2013-12/msg00062.html

diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
index 3aacf96..4dd7ae7 100755
--- a/tests/ls/stat-free-color.sh
+++ b/tests/ls/stat-free-color.sh
@@ -53,11 +53,11 @@ eval $(dircolors -b color-without-stat)
 # To avoid counting those, first get a baseline count by running
 # ls with only the --help option.  Then, compare that with the
 # invocation under test.
-strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
-n_lines_help=$(wc -l < log-help)
+strace -o log-help ls --help >/dev/null || fail=1
+n_lines_help=$(grep 'stat.*(' log-help | wc -l)

-strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
-n_lines=$(wc -l < log)
+strace -o log ls --color=always . || fail=1
+n_lines=$(grep 'stat.*(' log | wc -l)

 n_stat=$(expr $n_lines - $n_lines_help)





Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Fri, 06 Dec 2013 17:46:02 GMT) Full text and rfc822 format available.

Message #14 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 16075 <at> debbugs.gnu.org, Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Fri, 06 Dec 2013 17:45:13 +0000
On 12/06/2013 05:20 PM, Pádraig Brady wrote:
> On 12/06/2013 04:48 PM, Bernhard Voelker wrote:
>> On 12/06/2013 04:50 PM, Marcin Juszkiewicz wrote:
>>> Test checks for use of stat,lstat,stat64,lstat64 syscalls. But on
>>> AArch64 it is using statfs64 and newfstatat calls so test fails.
>>>
>>> log and log-help attached
>>>
>>> Commands used:
>>> strace -o log ls --color=always >/dev/null
>>> strace -o log-help ls --help >/dev/null
>>
>> Thanks for the bug report.
>> Does adding both system calls as in the following patch help?
>>
>> Thanks & have a nice day,
>> Berny
>>
>>
>> diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
>> index 3aacf96..145c566 100755
>> --- a/tests/ls/stat-free-color.sh
>> +++ b/tests/ls/stat-free-color.sh
>> @@ -53,10 +53,11 @@ eval $(dircolors -b color-without-stat)
>>  # To avoid counting those, first get a baseline count by running
>>  # ls with only the --help option.  Then, compare that with the
>>  # invocation under test.
>> -strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
>> +stats='stat,lstat,stat64,lstat64,statfs64,newfstatat'
>> +strace -o log-help -e "$stats" ls --help >/dev/null || fail=1
>>  n_lines_help=$(wc -l < log-help)
>>
>> -strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
>> +strace -o log -e "$stats" ls --color=always . || fail=1
>>  n_lines=$(wc -l < log)
>>
>>  n_stat=$(expr $n_lines - $n_lines_help)
> 
> That would probably work, though perhaps we should
> make this test a bit more general with something like the following?
> 
> Also Marcin, could you try out the latest snapshot (which will
> also need the patch applied). It has another aarch64 specific patch included,
> and it would be great to verify it on this platform.
> Two birds with one stone and all that. Simple test instructions at:
> http://lists.gnu.org/archive/html/coreutils/2013-12/msg00062.html
> 
> diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
> index 3aacf96..4dd7ae7 100755
> --- a/tests/ls/stat-free-color.sh
> +++ b/tests/ls/stat-free-color.sh
> @@ -53,11 +53,11 @@ eval $(dircolors -b color-without-stat)
>  # To avoid counting those, first get a baseline count by running
>  # ls with only the --help option.  Then, compare that with the
>  # invocation under test.
> -strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
> -n_lines_help=$(wc -l < log-help)
> +strace -o log-help ls --help >/dev/null || fail=1
> +n_lines_help=$(grep 'stat.*(' log-help | wc -l)
> 
> -strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
> -n_lines=$(wc -l < log)
> +strace -o log ls --color=always . || fail=1
> +n_lines=$(grep 'stat.*(' log | wc -l)
> 
>  n_stat=$(expr $n_lines - $n_lines_help)

Even at that the test is still brittle,
as the guard only checks that `strace -e stat` works.
Also it's conceivable that on some edge cases there
may be more than one stat call used in this case.

So I'd be inclined to drop this from the default test set,
if we can't come up with something more robust.

Pádraig.





Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Fri, 06 Dec 2013 18:41:01 GMT) Full text and rfc822 format available.

Message #17 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
To: Pádraig Brady <P <at> draigBrady.com>,
 Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 16075 <at> debbugs.gnu.org
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Fri, 06 Dec 2013 19:40:29 +0100
W dniu 06.12.2013 18:20, Pádraig Brady pisze:

> Also Marcin, could you try out the latest snapshot (which will
> also need the patch applied). It has another aarch64 specific patch included,
> and it would be great to verify it on this platform.
> Two birds with one stone and all that. Simple test instructions at:
> http://lists.gnu.org/archive/html/coreutils/2013-12/msg00062.html
> 
> diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
> index 3aacf96..4dd7ae7 100755
> --- a/tests/ls/stat-free-color.sh
> +++ b/tests/ls/stat-free-color.sh
> @@ -53,11 +53,11 @@ eval $(dircolors -b color-without-stat)
>  # To avoid counting those, first get a baseline count by running
>  # ls with only the --help option.  Then, compare that with the
>  # invocation under test.
> -strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
> -n_lines_help=$(wc -l < log-help)
> +strace -o log-help ls --help >/dev/null || fail=1
> +n_lines_help=$(grep 'stat.*(' log-help | wc -l)
> 
> -strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
> -n_lines=$(wc -l < log)
> +strace -o log ls --color=always . || fail=1
> +n_lines=$(grep 'stat.*(' log | wc -l)
> 
>  n_stat=$(expr $n_lines - $n_lines_help)

19:34 hrw <at> chroot-rawhide:coreutils-8.21.176-37e00$ patch <update.diff -p1
patching file tests/ls/stat-free-color.sh
19:34 hrw <at> chroot-rawhide:coreutils-8.21.176-37e00$ make check -C tests TESTS=ls/stat-free-color VERBOSE=yes
make: Wejście do katalogu `/home/hrw/test/coreutils-8.21.176-37e00/tests'
cd .. && make check TESTS=tests/ls/stat-free-color SUBDIRS=.
make[1]: Wejście do katalogu `/home/hrw/test/coreutils-8.21.176-37e00'
  GEN      public-submodule-commit
make  check-recursive
make[2]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
Making check in .
make[3]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
make  check-TESTS check-local
make[4]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[5]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
PASS: tests/ls/stat-free-color.sh
make[6]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
make  all-recursive
make[7]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
Making all in .
make[8]: Entering directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[8]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[7]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[6]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
============================================================================
Testsuite summary for GNU coreutils 8.21.176-37e00
============================================================================
# TOTAL: 1
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[5]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
  GEN      check-README
  GEN      check-duplicate-no-install
  GEN      sc-avoid-builtin
  GEN      sc-avoid-io
  GEN      sc-avoid-non-zero
  GEN      sc-avoid-path
  GEN      sc-avoid-timezone
  GEN      sc-avoid-zeroes
  GEN      sc-exponent-grouping
  GEN      sc-lower-case-var
  GEN      check-texinfo
make[4]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[3]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[2]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
make[1]: Opuszczenie katalogu `/home/hrw/test/coreutils-8.21.176-37e00'
make: Opuszczenie katalogu `/home/hrw/test/coreutils-8.21.176-37e00/tests'

All tests pass with this patch:
============================================================================
Testsuite summary for GNU coreutils 8.21.176-37e00
============================================================================
# TOTAL: 316
# PASS:  304
# SKIP:  12
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================
make[6]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[5]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[4]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[3]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[2]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00/gnulib-tests'
make[1]: Leaving directory `/home/hrw/test/coreutils-8.21.176-37e00'
19:39 hrw <at> chroot-rawhide:coreutils-8.21.176-37e00$ 





Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Fri, 06 Dec 2013 20:59:01 GMT) Full text and rfc822 format available.

Message #20 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 16075 <at> debbugs.gnu.org, Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Fri, 06 Dec 2013 21:58:25 +0100
On 12/06/2013 06:45 PM, Pádraig Brady wrote:
> On 12/06/2013 05:20 PM, Pádraig Brady wrote:
>> That would probably work, though perhaps we should
>> make this test a bit more general with something like the following?
>>
>> Also Marcin, could you try out the latest snapshot (which will
>> also need the patch applied). It has another aarch64 specific patch included,
>> and it would be great to verify it on this platform.
>> Two birds with one stone and all that. Simple test instructions at:
>> http://lists.gnu.org/archive/html/coreutils/2013-12/msg00062.html
>>
>> diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
>> index 3aacf96..4dd7ae7 100755
>> --- a/tests/ls/stat-free-color.sh
>> +++ b/tests/ls/stat-free-color.sh
>> @@ -53,11 +53,11 @@ eval $(dircolors -b color-without-stat)
>>  # To avoid counting those, first get a baseline count by running
>>  # ls with only the --help option.  Then, compare that with the
>>  # invocation under test.
>> -strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
>> -n_lines_help=$(wc -l < log-help)
>> +strace -o log-help ls --help >/dev/null || fail=1
>> +n_lines_help=$(grep 'stat.*(' log-help | wc -l)
>>
>> -strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
>> -n_lines=$(wc -l < log)
>> +strace -o log ls --color=always . || fail=1
>> +n_lines=$(grep 'stat.*(' log | wc -l)
>>
>>  n_stat=$(expr $n_lines - $n_lines_help)

I think that's okay (and much better than my on-the-spot fix),
and Marcin already gave positive feedback.

> Even at that the test is still brittle,
> as the guard only checks that `strace -e stat` works.
> Also it's conceivable that on some edge cases there
> may be more than one stat call used in this case.

I must confess that I don't understand this, i.e. in which circumstances
this test would fail as it has been working long enough, and now just
is ported to another architecture.

Have a nice day,
Berny




Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Fri, 06 Dec 2013 21:08:02 GMT) Full text and rfc822 format available.

Message #23 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
Cc: Bernhard Voelker <mail <at> bernhard-voelker.de>, 16075 <at> debbugs.gnu.org
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Fri, 06 Dec 2013 21:07:43 +0000
On 12/06/2013 06:40 PM, Marcin Juszkiewicz wrote:
> W dniu 06.12.2013 18:20, Pádraig Brady pisze:
> 
>> Also Marcin, could you try out the latest snapshot (which will
>> also need the patch applied). It has another aarch64 specific patch included,
>> and it would be great to verify it on this platform.
>> Two birds with one stone and all that. Simple test instructions at:
>> http://lists.gnu.org/archive/html/coreutils/2013-12/msg00062.html
>>
>> diff --git a/tests/ls/stat-free-color.sh b/tests/ls/stat-free-color.sh
>> index 3aacf96..4dd7ae7 100755
>> --- a/tests/ls/stat-free-color.sh
>> +++ b/tests/ls/stat-free-color.sh
>> @@ -53,11 +53,11 @@ eval $(dircolors -b color-without-stat)
>>  # To avoid counting those, first get a baseline count by running
>>  # ls with only the --help option.  Then, compare that with the
>>  # invocation under test.
>> -strace -o log-help -e stat,lstat,stat64,lstat64 ls --help >/dev/null || fail=1
>> -n_lines_help=$(wc -l < log-help)
>> +strace -o log-help ls --help >/dev/null || fail=1
>> +n_lines_help=$(grep 'stat.*(' log-help | wc -l)
>>
>> -strace -o log -e stat,lstat,stat64,lstat64 ls --color=always . || fail=1
>> -n_lines=$(wc -l < log)
>> +strace -o log ls --color=always . || fail=1
>> +n_lines=$(grep 'stat.*(' log | wc -l)
>>
>>  n_stat=$(expr $n_lines - $n_lines_help)
> 

> 19:34 hrw <at> chroot-rawhide:coreutils-8.21.176-37e00$ patch <update.diff -p1
> patching file tests/ls/stat-free-color.sh
> 19:34 hrw <at> chroot-rawhide:coreutils-8.21.176-37e00$ make check -C tests TESTS=ls/stat-free-color VERBOSE=yes
> make: Wejście do katalogu `/home/hrw/test/coreutils-8.21.176-37e00/tests'
> cd .. && make check TESTS=tests/ls/stat-free-color SUBDIRS=.
> make[1]: Wejście do katalogu `/home/hrw/test/coreutils-8.21.176-37e00'
>   GEN      public-submodule-commit

> ============================================================================
> Testsuite summary for GNU coreutils 8.21.176-37e00
> ============================================================================
> # TOTAL: 1
> # PASS:  1

> All tests pass with this patch:

Much appreciated for testing that new important architecture.

> ============================================================================
> Testsuite summary for GNU coreutils 8.21.176-37e00
> ============================================================================
> # TOTAL: 316
> # PASS:  304
> # SKIP:  12
> # XFAIL: 0
> # FAIL:  0
> # XPASS: 0
> # ERROR: 0
> ============================================================================

Note there are two test result outputs for coreutils and for gnulib.
The above totals are for the gnulib component.
I presume all the coreutils tests passed also as the test you
noticed failing was within the coreutils set.

thanks!
Pádraig.




Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Fri, 06 Dec 2013 21:13:02 GMT) Full text and rfc822 format available.

Message #26 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 16075 <at> debbugs.gnu.org, Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Fri, 06 Dec 2013 21:12:46 +0000
On 12/06/2013 08:58 PM, Bernhard Voelker wrote:
> On 12/06/2013 06:45 PM, Pádraig Brady wrote:

>> Even at that the test is still brittle,
>> as the guard only checks that `strace -e stat` works.
>> Also it's conceivable that on some edge cases there
>> may be more than one stat call used in this case.
> 
> I must confess that I don't understand this, i.e. in which circumstances
> this test would fail as it has been working long enough, and now just
> is ported to another architecture.

So I'm worried that the system might have a version
of strace that doesn't support say newfstatat for example.
Now my removing of the -e ... above will avoid the immediate:
  strace: invalid system call `newfstatat'
But strace may then output something that `grep stat..` doesn't match,
thuse messing up the counts and failing the test.

I'll sleep on it as I'm rushing off now.

thanks,
Pádraig




Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Sat, 07 Dec 2013 10:21:02 GMT) Full text and rfc822 format available.

Message #29 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: Pádraig Brady <P <at> draigBrady.com>
Cc: 16075 <at> debbugs.gnu.org, Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Sat, 07 Dec 2013 11:20:04 +0100
On 12/06/2013 10:12 PM, Pádraig Brady wrote:
> So I'm worried that the system might have a version
> of strace that doesn't support say newfstatat for example.
> Now my removing of the -e ... above will avoid the immediate:
>   strace: invalid system call `newfstatat'
> But strace may then output something that `grep stat..` doesn't match,
> thuse messing up the counts and failing the test.

Sounds like require_strace_ would need some more love rather
than stat-free-color.sh, right?

Have a nice day,
Berny




Reply sent to Pádraig Brady <P <at> draigBrady.com>:
You have taken responsibility. (Sat, 07 Dec 2013 15:22:02 GMT) Full text and rfc822 format available.

Notification sent to Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>:
bug acknowledged by developer. (Sat, 07 Dec 2013 15:22:02 GMT) Full text and rfc822 format available.

Message #34 received at 16075-done <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Bernhard Voelker <mail <at> bernhard-voelker.de>
Cc: 16075-done <at> debbugs.gnu.org, Marcin Juszkiewicz <mjuszkiewicz <at> redhat.com>
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Sat, 07 Dec 2013 15:21:11 +0000
[Message part 1 (text/plain, inline)]
On 12/06/2013 09:12 PM, Pádraig Brady wrote:
> On 12/06/2013 08:58 PM, Bernhard Voelker wrote:
>> On 12/06/2013 06:45 PM, Pádraig Brady wrote:
> 
>>> Even at that the test is still brittle,
>>> as the guard only checks that `strace -e stat` works.
>>> Also it's conceivable that on some edge cases there
>>> may be more than one stat call used in this case.
>>
>> I must confess that I don't understand this, i.e. in which circumstances
>> this test would fail as it has been working long enough, and now just
>> is ported to another architecture.
> 
> So I'm worried that the system might have a version
> of strace that doesn't support say newfstatat for example.
> Now my removing of the -e ... above will avoid the immediate:
>   strace: invalid system call `newfstatat'
> But strace may then output something that `grep stat..` doesn't match,
> thuse messing up the counts and failing the test.
> 
> I'll sleep on it as I'm rushing off now.

I going with the attached which should handle everything,
even diagnosis of unhandled "stat" calls.

thanks,
Pádraig.

[newfstatat.patch (text/x-patch, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#16075; Package coreutils. (Sat, 07 Dec 2013 17:33:01 GMT) Full text and rfc822 format available.

Message #37 received at 16075 <at> debbugs.gnu.org (full text, mbox):

From: Bernhard Voelker <mail <at> bernhard-voelker.de>
To: 16075 <at> debbugs.gnu.org, P <at> draigBrady.com, mjuszkiewicz <at> redhat.com
Subject: Re: bug#16075: ls/stat-free-color.sh fails on AArch64 architecture
Date: Sat, 07 Dec 2013 18:31:31 +0100
On 12/07/2013 04:21 PM, Pádraig Brady wrote:
> I going with the attached which should handle everything,
> even diagnosis of unhandled "stat" calls.

great!

> Subject: [PATCH] tests: fix false failure on platforms using newfstatat
> 
> * tests/ls/stat-free-color.sh: Add newfstatat to the list
> of syscalls to trace.  Also add all "stat" syscalls to the
> list of syscalls that we verify that strace supports.
> Also only create a single dangling symlink to check, since
> we already only check for a single "stat" call.
> Fixes http://bugs.gnu.org/16075

It's probably worth mentioning AArch64 here.
+1 otheriwse.

Thanks!

Have a nice day,
Berny




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sun, 05 Jan 2014 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 114 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.