Bug#931976: startpar: does testsuite of startpar actually test anything?

Dmitry Bogatov KAction at debian.org
Sat Jul 13 09:28:55 BST 2019


Package: startpar
Version: 0.61-1
Severity: normal
X-Debbugs-Cc: Jesse Smith <jessefrgsmith at yahoo.ca>

Hi!

I just noticed that we have wrong value of STARTPAR in our autopkgtests:
debian/tests/testuite:

	#!/bin/sh
	set -e
	# Run test suite using the installed startpar binary
	make -C testsuite STARTPAR=/lib/startpar/startpar check

And still, all Gitlab CI is happy. Actually, even during build log is
suspicious:

	$ make check
	make STARTPAR=/home/iu/devel/salsa/debian/startpar/startpar -C testsuite check
	make[1]: Entering directory '/home/iu/devel/salsa/debian/startpar/testsuite'
	STARTPAR=/home/iu/devel/salsa/debian/startpar/startpar ./runtests
	error: the test init.d was not running
	success: the ls command was running
	make[1]: Leaving directory '/home/iu/devel/salsa/debian/startpar/testsuite'

It is quite confusing, that is says both "error" and "success". Also,
following snippet is suspitious:

	cat > etc/init.d/test <<EOF
	#!/bin/sh
	set -e
	### BEGIN INIT INFO
	# Provides:          test
	# Required-Start:    $all
	# Required-Stop:     $remote_fs
	# Default-Start:     2 3 4 5
	# Default-Stop:      0 1 6
	# Short-Description: init script for stopping readahead profiling
	### END INIT INFO

	echo success: the test script is running $1
	EOF

Values of $all and $remote_fs are likely meant to be inserted verbatim
into etc/init.d/test, since variables 'all' and 'remote_fs' are not
defined anywhere around, but it is variable substitution is going here.
(That is why I am strong proponent of `set -eu`.)

Maybe it is worth to make etc/init.d/test file part of distribution, and
not create is in script?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://www.chiark.greenend.org.uk/pipermail/debian-init-diversity/attachments/20190713/6c0adfd3/attachment.sig>


More information about the Debian-init-diversity mailing list