From db23d83bd49bb04ffb96ce130d2ff004a60a248b Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 27 Nov 2019 17:57:51 +0100 Subject: [PATCH] test: add simple test for log namespaces --- test/TEST-44-LOG-NAMESPACE/Makefile | 1 + test/TEST-44-LOG-NAMESPACE/test.sh | 39 +++++++++++++++++++++++++ test/TEST-44-LOG-NAMESPACE/testsuite.sh | 19 ++++++++++++ 3 files changed, 59 insertions(+) create mode 120000 test/TEST-44-LOG-NAMESPACE/Makefile create mode 100755 test/TEST-44-LOG-NAMESPACE/test.sh create mode 100755 test/TEST-44-LOG-NAMESPACE/testsuite.sh 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 -- 2.47.3