Bug#961639: util-linux: FTBFS with uname26 error on glibc >= 2.30

2020-05-27 Thread Helge Deller
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


Bug#961639: util-linux: FTBFS with uname26 error on glibc >= 2.30

2020-05-26 Thread Chris Hofstaedtler
Hi Helge Deller,

thanks for your report.

Please resubmit the patch with upstreams requirements (esp.
Signed-off-by) so this can be fixed upstream. (As this does not
appear to be a Debian-specific bug.)

Thanks,
Chris



Bug#961639: util-linux: FTBFS with uname26 error on glibc >= 2.30

2020-05-26 Thread Helge Deller
Package: util-linux
Version: 2.35.2-2
Severity: important
Tags: ftbfs, patch

On architectures which already run glibc >= 2.30 the uname26 testcases fail.
Currently this bug affects at least hppa, ia64 and riscv64.

The problem is, that the testcase is wrong.
This command in ./tests/ts/misc/setarch:
$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.