]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: use /var/tmp for storing disk images
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 13 Mar 2022 12:38:10 +0000 (21:38 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 15 Mar 2022 03:35:50 +0000 (12:35 +0900)
The Ubuntu CI on ppc64el seems to have a issue on tmpfs, and files
may not be fsynced. See c10caebb98803b812ebc4dd6cdeaab2ca17826d7.
For safety, let's use /var/tmp to store disk images.

test/units/testsuite-58.sh

index f1b690a71ff9e923b5a6e4ea04b8617d6a97a49b..1ebc699a1b044d1faaf4d8a0295285f38975024b 100755 (executable)
@@ -172,9 +172,9 @@ rm -r /tmp/testsuite-58.3-defs/
 
 # testcase for #21817
 mkdir -p /tmp/testsuite-58-issue-21817-defs/
-truncate -s 100m /tmp/testsuite-58-issue-21817.img
-LOOP=$(losetup -P --show -f /tmp/testsuite-58-issue-21817.img)
-printf 'size=50M,type=%s\n,\n' "${root_guid}" | sfdisk -X gpt /tmp/testsuite-58-issue-21817.img
+truncate -s 100m /var/tmp/testsuite-58-issue-21817.img
+LOOP=$(losetup -P --show -f /var/tmp/testsuite-58-issue-21817.img)
+printf 'size=50M,type=%s\n,\n' "${root_guid}" | sfdisk -X gpt /var/tmp/testsuite-58-issue-21817.img
 cat >/tmp/testsuite-58-issue-21817-defs/test.conf <<EOF
 [Partition]
 Type=root
@@ -187,7 +187,7 @@ grep -qiF "p1 : start=        2048, size=      102400, type=${root_guid}," /tmp/
 # Accept both unpadded (pre-v2.38 util-linux) and padded (v2.38+ util-linux) sizes
 grep -qE "p2 : start=      104448, size=      (100319| 98304)," /tmp/testsuite-58-issue-21817.dump
 
-rm /tmp/testsuite-58-issue-21817.img /tmp/testsuite-58-issue-21817.dump
+rm /var/tmp/testsuite-58-issue-21817.img /tmp/testsuite-58-issue-21817.dump
 rm -r /tmp/testsuite-58-issue-21817-defs/
 
 testsector()