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@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
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