tests: skip test-relabel.pl when selinuxrelabel is not available

test-relabel.pl performs a full SELinux relabelling of the phony guest,
and the selinux_relabel API does not work if the "selinuxrelabel"
feature is not available.
This commit is contained in:
Pino Toscano
2019-02-11 16:43:53 +01:00
parent c8a26adf1d
commit 89b5dabf8d

View File

@@ -51,6 +51,13 @@ unless ($g->feature_available (["linuxxattrs"])) {
exit 77
}
# If SELinux relabelling is not available then we cannot test this.
unless ($g->feature_available (["selinuxrelabel"])) {
print "$prog: test skipped because 'selinuxrelabel' feature not available.\n";
$g->close ();
exit 77
}
$g->part_disk ("/dev/sda", "mbr");
$g->mkfs ("ext4", "/dev/sda1");