From: Lennart Poettering Date: Wed, 27 Nov 2019 16:57:51 +0000 (+0100) Subject: test: add simple test for log namespaces X-Git-Tag: v245-rc1~41^2~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=db23d83bd49bb04ffb96ce130d2ff004a60a248b;p=thirdparty%2Fsystemd.git test: add simple test for log namespaces --- diff --git a/test/TEST-44-LOG-NAMESPACE/Makefile b/test/TEST-44-LOG-NAMESPACE/Makefile new file mode 120000 index 00000000000..e9f93b1104c --- /dev/null +++ b/test/TEST-44-LOG-NAMESPACE/Makefile @@ -0,0 +1 @@ +../TEST-01-BASIC/Makefile \ No newline at end of file diff --git a/test/TEST-44-LOG-NAMESPACE/test.sh b/test/TEST-44-LOG-NAMESPACE/test.sh new file mode 100755 index 00000000000..4dfb4418db1 --- /dev/null +++ b/test/TEST-44-LOG-NAMESPACE/test.sh @@ -0,0 +1,39 @@ +#!/bin/bash +set -e +TEST_DESCRIPTION="test log namespaces" + +. $TEST_BASE_DIR/test-functions + +test_setup() { + create_empty_image_rootdir + + ( + LOG_LEVEL=5 + eval $(udevadm info --export --query=env --name=${LOOPDEV}p2) + + setup_basic_environment + + mask_supporting_services + + # setup the testsuite service + cat >$initdir/etc/systemd/system/testsuite.service < /tmp/hello-world +journalctl > /tmp/no-hello-world + +grep "hello world" /tmp/hello-world +! grep "hello world" /tmp/no-hello-world + +systemd-analyze log-level info + +echo OK > /testok + +exit 0