1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 03:25:31 +03:00

test: format disk image through loopback device

It seems that the change on the image file sometimes not propagated on
the loopback device immediately.
This commit is contained in:
Yu Watanabe 2022-03-14 02:26:25 +09:00
parent cc75e1f7c9
commit 8c166c962d

View File

@ -174,7 +174,7 @@ rm -r /tmp/testsuite-58.3-defs/
mkdir -p /tmp/testsuite-58-issue-21817-defs/
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
printf 'size=50M,type=%s\n,\n' "${root_guid}" | sfdisk -X gpt "$LOOP"
cat >/tmp/testsuite-58-issue-21817-defs/test.conf <<EOF
[Partition]
Type=root