[Toybox] sort tests broken?
enh
enh at google.com
Tue Aug 23 16:01:28 PDT 2022
yeah, the sort failures were caused by |&, so i've sent a patch that fixes
that and fixes the seq issue (which was actually "there is no timeout(1) on
macOS").
interestingly, there are still macos-specific _toybox_ timeout failures
(plus the tar test failures we already knew about, and really should fix
one way or another so we can at least see when we have other issues). i
haven't understood the toybox timeout.test failures yet, so i haven't
included them in a patch.
On Tue, Aug 23, 2022 at 10:02 AM enh <enh at google.com> wrote:
> note that that transcript is from macos, since it's more easily to hand.
> but the original failure i reported was on android. interestingly the
> github ci still seems to think that ubuntu is fine. but they're seeing the
> same macos error. (plus a seq segfault?! we really need to get the tar
> tests passing on macos again so we can spot actual new breakages as they
> happen... who knows how long seq has been broken there? [because i _don't_
> run the tests on macos as part of android's ci because we don't have mac
> support there --- github is toybox's only mac ci];
> https://github.com/landley/toybox/runs/7936685655?check_suite_focus=true)
>
> is it a shell thing? what does `|&` even mean? is that a new bashism that
> macos' old bash/android's mksh don't implement?
>
> On Tue, Aug 23, 2022 at 9:55 AM enh <enh at google.com> wrote:
>
>> no, and (oddly?) neither does _reverting_ that change...
>>
>> ~$ git clone https://github.com/landley/toybox.git toybox
>> Cloning into 'toybox'...
>> cdremote: Enumerating objects: 26019, done.
>> remote: Counting objects: 100% (137/137), done.
>> remote: Compressing objects: 100% (62/62), done.
>> remote: Total 26019 (delta 78), reused 108 (delta 75), pack-reused 25882
>> Receiving objects: 100% (26019/26019), 11.00 MiB | 19.84 MiB/s, done.
>> Resolving deltas: 24% (4531/18878))
>> Resolving deltas: 100% (18878/18878), done.
>> m~$ cd toybox
>> ~/toybox$ make macos_defconfig
>> cc -o kconfig/conf kconfig/conf.c kconfig/zconf.tab.c -DKBUILD_NO_NLS=1 \
>> -DPROJECT_NAME=\"ToyBox\"
>> scripts/genconfig.sh
>> KCONFIG_ALLCONFIG=./kconfig/macos_miniconfig kconfig/conf -n Config.in >
>> /dev/null
>> ~/toybox$ make test_sort
>> scripts/test.sh sort
>> scripts/runtest.sh: line 217: syntax error near unexpected token `;'
>> scripts/runtest.sh: line 217: ` R) LEN=0; B=1; ;&'
>> sort:Library probe
>> generated/{Config.in,newtoys.h,flags.h,globals.h,tags.h,help.h}
>> Compile generated/testdir/sort..................
>> scripts/test.sh: line 42: realpath: command not found
>> usage: dirname string [...]
>> PASS: sort unknown argument
>> PASS: sort sort
>> PASS: sort #2
>> PASS: sort stdin
>> PASS: sort numeric
>> PASS: sort reverse
>> PASS: sort sort -o
>> PASS: sort sort -o same
>> PASS: sort one key
>> PASS: sort key range with numeric option
>> PASS: sort key range with numeric option and global reverse
>> PASS: sort key range with multiple options
>> PASS: sort key doesn't strip leading blanks, disables fallback global sort
>> PASS: sort key edge case with -t
>> PASS: sort -k2,2f
>> PASS: sort -k2,2
>> PASS: sort -f -k2,2
>> PASS: sort -t, -k3n
>> scripts/runtest.sh: eval: line 150: syntax error near unexpected token `&'
>> scripts/runtest.sh: eval: line 150: `"/sort" -c |& grep -o [0-9]*'
>> FAIL: sort -c
>> echo -ne 'a\nb\na\nc' | "/sort" -c |& grep -o [0-9]*
>> --- expected 2022-08-23 09:54:03.000000000 -0700
>> +++ actual 2022-08-23 09:54:03.000000000 -0700
>> @@ -1 +0,0 @@
>> -3
>> make: *** [test_sort] Error 1
>> ~/toybox$ git revert 529a25a2eea4
>> [master 053fefd1] Revert "Sort -c reported line number was off by one."
>> 2 files changed, 2 insertions(+), 3 deletions(-)
>> ~/toybox$ make test_sort
>> scripts/test.sh sort
>> scripts/runtest.sh: line 217: syntax error near unexpected token `;'
>> scripts/runtest.sh: line 217: ` R) LEN=0; B=1; ;&'
>> sort:generated/{newtoys.h,flags.h,globals.h,tags.h,help.h}
>> Compile generated/testdir/sort.....
>> scripts/test.sh: line 42: realpath: command not found
>> usage: dirname string [...]
>> PASS: sort unknown argument
>> PASS: sort sort
>> PASS: sort #2
>> PASS: sort stdin
>> PASS: sort numeric
>> PASS: sort reverse
>> PASS: sort sort -o
>> PASS: sort sort -o same
>> PASS: sort one key
>> PASS: sort key range with numeric option
>> PASS: sort key range with numeric option and global reverse
>> PASS: sort key range with multiple options
>> PASS: sort key doesn't strip leading blanks, disables fallback global sort
>> PASS: sort key edge case with -t
>> PASS: sort -k2,2f
>> PASS: sort -k2,2
>> PASS: sort -f -k2,2
>> PASS: sort -t, -k3n
>> scripts/runtest.sh: eval: line 150: syntax error near unexpected token `&'
>> scripts/runtest.sh: eval: line 150: `"/sort" -uc |& grep -o [0-9]*'
>> FAIL: sort -c
>> echo -ne 'a\nb\nb\nc' | "/sort" -uc |& grep -o [0-9]*
>> --- expected 2022-08-23 09:54:35.000000000 -0700
>> +++ actual 2022-08-23 09:54:35.000000000 -0700
>> @@ -1 +0,0 @@
>> -3
>> make: *** [test_sort] Error 1
>> ~/toybox$
>>
>> On Mon, Aug 22, 2022 at 8:03 PM Rob Landley <rob at landley.net> wrote:
>>
>>> On 8/22/22 11:09, enh via Toybox wrote:
>>> >
>>> > FAIL: sort -c
>>> > echo -ne 'a\nb\na\nc' | "/usr/bin/sort" -c |& grep -o [0-9]*
>>> > --- expected 2022-08-22 08:56:24.000000000 -0700
>>> > +++ actual 2022-08-22 08:56:24.000000000 -0700
>>> > @@ -1 +0,0 @@
>>> > -3
>>> > make: *** [test_sort] Error 1
>>>
>>> Commit 529a25a2eea4 didn't fix it for you?
>>>
>>> Rob
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.landley.net/pipermail/toybox-landley.net/attachments/20220823/d6902453/attachment.htm>
More information about the Toybox
mailing list