From: Yu Watanabe Date: Thu, 5 Sep 2024 08:58:29 +0000 (+0900) Subject: test: add test case for systemd-repart --seed=random X-Git-Tag: v256.6~30 X-Git-Url: http://git-history.diyao.me/?a=commitdiff_plain;h=69282da9aab90c2dc1e440b04af5b2163779515a;p=systemd%2F.git test: add test case for systemd-repart --seed=random For issue #34257. (cherry picked from commit 56d6ebd40468e2a743b39ad7d87b0675bdf9a042) --- diff --git a/test/units/TEST-58-REPART.sh b/test/units/TEST-58-REPART.sh index f8c22abd3a..a989043c5e 100755 --- a/test/units/TEST-58-REPART.sh +++ b/test/units/TEST-58-REPART.sh @@ -1288,6 +1288,49 @@ testcase_dropped_partitions() { [[ "$(sfdisk -q -l "$image" | grep -c "$image")" -eq 2 ]] } +testcase_random_seed() { + local defs imgs output + + # For issue #34257 + + defs="$(mktemp --directory "/tmp/test-repart.defs.XXXXXXXXXX")" + imgs="$(mktemp --directory "/var/tmp/test-repart.imgs.XXXXXXXXXX")" + # shellcheck disable=SC2064 + trap "rm -rf '$defs' '$imgs'" RETURN + chmod 0755 "$defs" + + tee "$defs/root.conf" <