On 27.05.20 01:45, Chris Hofstaedtler wrote:
> Please resubmit the patch with upstreams requirements...
Clean-up patch is attached.
Thanks!
Helge
[PATCH] Fix uname26 testcases for glibc >= 2.30
On architectures which already run glibc >= 2.30 the uname26 testcases fail.
The tests/ts/misc/setarch testcase is wrong:
$TS_CMD_SETARCH $ARCH -v --uname-2.6 echo "2.6 worked" >> $TS_OUTPUT 2>> $TS_ERRLOG
Errors are written to $TS_ERRLOG, while OK'ed output is written to $TS_OUTPUT.
With glibc >= 2.30 you get "FATAL: kernel too old", older glibc report "2.6 worked".
But a few lines later in the script we have:
sed -i "$ s/$expected/2.6 works or kernel too old/" $TS_OUTPUT
which only replaces the text in $TS_OUTPUT (and ignores $TS_ERRLOG).
Changing
$TS_CMD_SETARCH $ARCH -v --uname-2.6 echo "2.6 worked" >> $TS_OUTPUT 2>> $TS_ERRLOG
to
$TS_CMD_SETARCH $ARCH -v --uname-2.6 echo "2.6 worked" >> $TS_OUTPUT 2>> $TS_OUTPUT
fixes the uname26 tests.
Signed-off-by: Helge Deller
Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=961639
diff -up ./tests/ts/misc/setarch.org ./tests/ts/misc/setarch
--- ./tests/ts/misc/setarch.org 2020-05-26 22:27:49.173547933 +
+++ ./tests/ts/misc/setarch 2020-05-26 22:25:49.230293192 +
@@ -45,7 +45,7 @@ ts_init_subtest uname26
finmsg="" # for debugging 2.6 issues
echo "## --uname-2.6 echo" >>$TS_OUTPUT
-$TS_CMD_SETARCH $ARCH -v --uname-2.6 echo "2.6 worked" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SETARCH $ARCH -v --uname-2.6 echo "2.6 worked" >> $TS_OUTPUT 2>> $TS_OUTPUT
if [ $? -eq 0 ]; then
expected='^2.6 worked$'
else
@@ -56,7 +56,7 @@ fi
sed -i "$ s/$expected/2.6 works or kernel too old/" $TS_OUTPUT
echo "## --uname-2.6 true, non-verbose" >>$TS_OUTPUT
-$TS_CMD_SETARCH $ARCH --uname-2.6 true >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_SETARCH $ARCH --uname-2.6 true >> $TS_OUTPUT 2>> $TS_OUTPUT
if [ $? -eq 0 ]; then
echo "2.6 works or kernel too old" >> $TS_OUTPUT
else