Package: startpar
Version: 0.61-1
Severity: normal
X-Debbugs-Cc: Jesse Smith <jessefrgsm...@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?

Attachment: pgpRsq8HJt_IH.pgp
Description: PGP signature

Reply via email to