Skip to content

interop: Skip nbd-server tests if it does not support inetd mode

On some distros nbd-server is built without support for syslog which prevents use of inetd mode. Instead nbd-server will exit with this error:

Error: inetd mode requires syslog Exiting.

This commit adds a requires test for this and uses it around the appropriate tests.

It would be nice to test, for example, if nbd-server prints the NBD magic string on stdout. However that doesn't work because nbd-server uses socket calls (like send(2)) and fails unless we use a socket connected to stdin/stdout, which would require a much more complex test. We could also use libnbd to test if inetd is working, but that's what we're trying to test in the first place. So instead I went for the easy but inelegant way out - see if the error message is compiled into the binary.

Merge request reports