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.

Reply via email to