summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2024-03-22 12:08:52 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2024-03-22 15:11:39 +0100
commit27add528d72ccf13204f976b1a88bab9a5418ffb (patch)
treee989e7844f4ef8ebd7c92257e7e92745d3e87eb1 /test
parentMerge pull request #31839 from DaanDeMeyer/log (diff)
downloadsystemd-27add528d72ccf13204f976b1a88bab9a5418ffb.tar.xz
systemd-27add528d72ccf13204f976b1a88bab9a5418ffb.zip
test: Install test journals
Let's package these just like we package other test data.
Diffstat (limited to 'test')
-rwxr-xr-xtest/TEST-04-JOURNAL/test.sh3
-rw-r--r--test/meson.build1
-rwxr-xr-xtest/units/testsuite-04.corrupted-journals.sh4
-rwxr-xr-xtest/units/testsuite-04.journal.sh2
4 files changed, 4 insertions, 6 deletions
diff --git a/test/TEST-04-JOURNAL/test.sh b/test/TEST-04-JOURNAL/test.sh
index 42574ce8ea..f8f3a4b3e3 100755
--- a/test/TEST-04-JOURNAL/test.sh
+++ b/test/TEST-04-JOURNAL/test.sh
@@ -11,9 +11,6 @@ test_append_files() {
local workspace="${1:?}"
local dropin_dir
- mkdir -p "$workspace/test-journals/"
- cp -av "${TEST_BASE_DIR:?}/test-journals/"* "$workspace/test-journals/"
-
image_install curl setterm unzstd
image_install -o openssl
# Necessary for RH-based systems, otherwise MHD fails with:
diff --git a/test/meson.build b/test/meson.build
index b47fa612b1..aadf37a139 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -4,6 +4,7 @@ if install_tests
foreach subdir : [
'auxv',
'journal-data',
+ 'test-journals',
'units',
'test-execute',
'test-fstab-generator',
diff --git a/test/units/testsuite-04.corrupted-journals.sh b/test/units/testsuite-04.corrupted-journals.sh
index 2123b10152..479011ea78 100755
--- a/test/units/testsuite-04.corrupted-journals.sh
+++ b/test/units/testsuite-04.corrupted-journals.sh
@@ -6,11 +6,11 @@ set -o pipefail
JOURNAL_DIR="$(mktemp -d)"
REMOTE_OUT="$(mktemp -d)"
# tar on C8S doesn't support the --zstd option
-unzstd --stdout "/test-journals/afl-corrupted-journals.tar.zst" | tar -xC "$JOURNAL_DIR/"
+unzstd --stdout "/usr/lib/systemd/tests/testdata/test-journals/afl-corrupted-journals.tar.zst" | tar -xC "$JOURNAL_DIR/"
while read -r file; do
filename="${file##*/}"
unzstd "$file" -o "$JOURNAL_DIR/${filename%*.zst}"
-done < <(find /test-journals/corrupted/ -name "*.zst")
+done < <(find /usr/lib/systemd/tests/testdata/test-journals/corrupted/ -name "*.zst")
# First, try each of them sequentially. Skip this part when running with plain
# QEMU, as it is excruciatingly slow
# Note: we care only about exit code 124 (timeout) and special bash exit codes
diff --git a/test/units/testsuite-04.journal.sh b/test/units/testsuite-04.journal.sh
index 40ae39557b..90d865cdf5 100755
--- a/test/units/testsuite-04.journal.sh
+++ b/test/units/testsuite-04.journal.sh
@@ -244,7 +244,7 @@ JOURNAL_DIR="$(mktemp -d)"
while read -r file; do
filename="${file##*/}"
unzstd "$file" -o "$JOURNAL_DIR/${filename%*.zst}"
-done < <(find /test-journals/no-rtc -name "*.zst")
+done < <(find /usr/lib/systemd/tests/testdata/test-journals/no-rtc -name "*.zst")
journalctl --directory="$JOURNAL_DIR" --list-boots --output=json >/tmp/lb1
diff -u /tmp/lb1 - <<'EOF'