From 92ecc875120640a16a77d70039355a6ffc9905d7 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 20 Dec 2021 23:34:17 +0900 Subject: [PATCH 1/2] test: install losetup by default Preparation for the next commit. --- test/TEST-29-PORTABLE/test.sh | 1 - test/TEST-50-DISSECT/test.sh | 1 - test/TEST-67-INTEGRITY/test.sh | 1 - test/test-functions | 1 + 4 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/TEST-29-PORTABLE/test.sh b/test/TEST-29-PORTABLE/test.sh index a345e29314e..7727e7b5cae 100755 --- a/test/TEST-29-PORTABLE/test.sh +++ b/test/TEST-29-PORTABLE/test.sh @@ -21,7 +21,6 @@ test_append_files() { instmods overlay =overlayfs install_dmevent generate_module_dependencies - inst_binary losetup inst_binary mksquashfs inst_binary unsquashfs install_verity_minimal diff --git a/test/TEST-50-DISSECT/test.sh b/test/TEST-50-DISSECT/test.sh index bbc65a05394..77a64b9b1e8 100755 --- a/test/TEST-50-DISSECT/test.sh +++ b/test/TEST-50-DISSECT/test.sh @@ -27,7 +27,6 @@ test_append_files() { instmods overlay =overlayfs install_dmevent generate_module_dependencies - inst_binary losetup inst_binary wc if command -v openssl >/dev/null 2>&1; then inst_binary openssl diff --git a/test/TEST-67-INTEGRITY/test.sh b/test/TEST-67-INTEGRITY/test.sh index c379d72e205..b3bc1441abe 100755 --- a/test/TEST-67-INTEGRITY/test.sh +++ b/test/TEST-67-INTEGRITY/test.sh @@ -15,7 +15,6 @@ test_append_files() {( instmods loop =block instmods dm_integrity =md - inst_binary losetup inst_binary integritysetup inst_binary blkid install_dmevent diff --git a/test/test-functions b/test/test-functions index 7b9467cfc1c..218d0e6888c 100644 --- a/test/test-functions +++ b/test/test-functions @@ -154,6 +154,7 @@ BASICTOOLS=( ln loadkeys login + losetup lz4cat mkfifo mktemp From 71bb6048075313a4ba90e08b70c29103ceff6f15 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 20 Dec 2021 23:47:52 +0900 Subject: [PATCH 2/2] test: add a test case for issue #21817 --- test/units/testsuite-58.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/units/testsuite-58.sh b/test/units/testsuite-58.sh index 62d0a29cb5e..78c25051a2d 100755 --- a/test/units/testsuite-58.sh +++ b/test/units/testsuite-58.sh @@ -116,6 +116,25 @@ grep -qxF '/var/tmp/testsuite-58.3.img3 : start= 3662944, size= 17308536, rm /var/tmp/testsuite-58.3.img /tmp/testsuite-58.3.dump 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=4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709\n,\n' | sfdisk -X gpt /tmp/testsuite-58-issue-21817.img +cat >/tmp/testsuite-58-issue-21817-defs/test.conf </testok exit 0