InterNetNews / inn

INN (InterNetNews) Usenet server
https://www.isc.org/othersoftware/#INN
Other
68 stars 12 forks source link

Fix the auth-ext test suite on OpenBSD #202

Open Julien-Elie opened 2 years ago

Julien-Elie commented 2 years ago

The problem with nnrpd/auth-ext is that /bin/sh on OpenBSD, when it kills itself with SIGUP, doesn't exit like a process killed with SIGHUP and instead exits with some sort of weird exit status. To fix this will probably require rewriting tests/nnrpd/auth-test in C or finding bash in Autoconf and switching the shell to bash. (Russ' analysis.)

Failed Set                 Fail/Total (%) Skip Stat  Failing Tests
-------------------------- -------------- ---- ----  ------------------------
nnrpd/auth-ext                2/72     3%    0    0  45, 48
#  left: example.com auth: program caught signal 1
# right: example.com auth: program exited with status 129
not ok 45 - errors
#  left: example.com auth: program caught signal 1
# right: example.com auth: program exited with status 129
not ok 48 - errors with username and password
Julien-Elie commented 2 years ago

fixconfig could take care of the change if Autoconf has the path to a better shell. I see that we have the SHELL variable in Makefile.global, unfortunately set by Autoconf to /bin/sh on BSD systems (/bin/bash is set to SHELL by Autoconf on Debian). I bet we should not temper with that SHELL variable and use something like BASH_PATH instead...

Yet, as tests/nnrpd/auth-test is the only shell script affected by such an issue, it would probably be cleaner to rewrite it in C, or even Perl. The script is pretty small and seems easily convertible.