From: Michal Privoznik Date: Tue, 10 Jun 2025 09:58:34 +0000 (+0200) Subject: virt-aa-helper-test: Silence ls X-Git-Tag: v11.6.0-rc1~183 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f12874238ddd771c19d68a0d5b8ed18bbb248df;p=thirdparty%2Flibvirt.git virt-aa-helper-test: Silence ls virt-aa-helper checks presence of files before it adds them into a profile. Because of that, test cases inside of virt-aa-helper-test that require presence of /boot/initrd* are guarded by a check. The check uses ls to find at least one initrd file. If there's none, then ls prints an error onto stderr. This is not helpful because the test script prints a message on its own right after. Signed-off-by: Michal Privoznik Reviewed-by: Ján Tomko --- diff --git a/tests/virt-aa-helper-test b/tests/virt-aa-helper-test index 8259c2679f..e462e46570 100755 --- a/tests/virt-aa-helper-test +++ b/tests/virt-aa-helper-test @@ -201,7 +201,7 @@ testme "1" "bad disk2" "-c -u $valid_uuid" "$test_xml" sed -e "s,###UUID###,$uuid,g" -e "s,###DISK###,$disk1,g" -e "s,,,g" "$template_xml" > "$test_xml" testme "1" "malformed xml" "-c -u $valid_uuid" "$test_xml" -initrd=`ls -1 /boot/initrd* | head -1` +initrd=`ls -1 /boot/initrd* 2>/dev/null | head -1` if [ -z "$initrd" ]; then echo "Skipping /boot/initrd* tests. Could not find /boot/initrd*" else