scripts/shell.c doesn't support '\0'

Chris Boot bootc at debian.org
Mon Dec 27 19:26:19 UTC 2021


Hi all,

I've started experimentally packaging BusyBox 1.35.0 for Debian, and 
found that the "awk printf('%c') can output NUL" test kept failing. It 
turns out that scripts/shell.c cannot output a NUL for the "\0" in the 
test string, thus breaking this test.

I had a quick look at scripts/shell.c but I couldn't work out how to fix 
it, so I think that's best left for someone else.

Instead, the workaround I found was to change the shebang for 
testsuite/awk.tests to "#!/usr/bin/env ash" and add an "unset ECHO" on 
the next line. That uses the newly built busybox ash to run those tests, 
and this can handle "echo -ne" unlike dash (the Debian Almquist Shell) 
which is used for /bin/sh.

Best regards,
Chris

-- 
Chris Boot
bootc at debian.org


More information about the busybox mailing list