/src/igr-tests/check-cycle/output.txt
/src/igr-tests/reload1/sd
/src/igr-tests/reload2/sd
+/src/igr-tests/no-command-error/dinit-run.log
# Generated man pages:
/doc/manpages/*.5
int main(int argc, char **argv)
{
const char * const test_dirs[] = { "basic", "environ", "ps-environ", "chain-to", "force-stop", "restart",
- "check-basic", "check-cycle", "reload1", "reload2" };
+ "check-basic", "check-cycle", "reload1", "reload2", "no-command-error" };
constexpr int num_tests = sizeof(test_dirs) / sizeof(test_dirs[0]);
int passed = 0;
--- /dev/null
+#!/bin/sh
+#
+# Check that a service without a command configured causes the appropriate error.
+#
+
+rm -f dinit-run.log
+
+../../dinit -d sd -u -p socket -q \
+ no-command -l dinit-run.log
+
+STATUS=FAIL
+if [ -e dinit-run.log ]; then
+ if [ "$(cat dinit-run.log)" = "$(cat dinit-run.expected)" ]; then
+ STATUS=PASS
+ fi
+fi
+
+if [ $STATUS = PASS ]; then exit 0; fi
+exit 1