summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-04.journal-append.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:45 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-12 03:50:45 +0000
commitefeb864cb547a2cbf96dc0053a8bdb4d9190b364 (patch)
treec0b83368f18be983fcc763200c4c24d633244588 /test/units/testsuite-04.journal-append.sh
parentReleasing progress-linux version 255.5-1~progress7.99u1. (diff)
downloadsystemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.tar.xz
systemd-efeb864cb547a2cbf96dc0053a8bdb4d9190b364.zip
Merging upstream version 256.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/units/testsuite-04.journal-append.sh')
-rwxr-xr-xtest/units/testsuite-04.journal-append.sh46
1 files changed, 0 insertions, 46 deletions
diff --git a/test/units/testsuite-04.journal-append.sh b/test/units/testsuite-04.journal-append.sh
deleted file mode 100755
index 35f9433..0000000
--- a/test/units/testsuite-04.journal-append.sh
+++ /dev/null
@@ -1,46 +0,0 @@
-#!/usr/bin/env bash
-# SPDX-License-Identifier: LGPL-2.1-or-later
-set -eux
-set -o pipefail
-
-# test-journal-append corrupts the journal file by flipping a bit at a given offset and
-# following it by a write to check if we handle appending messages to corrupted journals
-# gracefully
-
-TEST_JOURNAL_APPEND=/usr/lib/systemd/tests/unit-tests/manual/test-journal-append
-
-[[ -x "$TEST_JOURNAL_APPEND" ]]
-
-# Corrupt the first ~1024 bytes, this should be pretty quick
-"$TEST_JOURNAL_APPEND" --sequential --start-offset=0 --iterations=350 --iteration-step=3
-
-# Skip most of the test when running without acceleration, as it's excruciatingly slow
-# (this shouldn't be an issue, as it should run in nspawn as well)
-if ! [[ "$(systemd-detect-virt -v)" == "qemu" ]]; then
- # Corrupt the beginning of every 1K block between 1K - 32K
- for ((i = 1024; i <= (32 * 1024); i += 1024)); do
- "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
- done
-
- # Corrupt the beginning of every 16K block between 32K - 128K
- for ((i = (32 * 1024); i <= (256 * 1024); i += (16 * 1024))); do
- "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
- done
-
- # Corrupt the beginning of every 128K block between 128K - 1M
- for ((i = (128 * 1024); i <= (1 * 1024 * 1024); i += (128 * 1024))); do
- "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
- done
-
- # And finally the beginning of every 1M block between 1M and 8M
- for ((i = (1 * 1024 * 1024); i < (8 * 1024 * 1024); i += (1 * 1024 * 1024))); do
- "$TEST_JOURNAL_APPEND" --sequential --start-offset="$i" --iterations=5 --iteration-step=13
- done
-
- if [[ "$(nproc)" -ge 2 ]]; then
- # Try to corrupt random bytes throughout the journal
- "$TEST_JOURNAL_APPEND" --iterations=25
- fi
-else
- "$TEST_JOURNAL_APPEND" --iterations=10
-fi