[PATCH 07/15] virt-aa-helper-test: Silence ls

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Michal Privoznik <mprivozn@xxxxxxxxxx>

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 <mprivozn@xxxxxxxxxx>
---
 tests/virt-aa-helper-test | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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,</devices>,<devices>,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
-- 
2.49.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux