mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-29 21:34:00 +00:00
tests: fix config file tests
Link: https://bugs.launchpad.net/bugs/1943441 Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
074c356087
commit
b967f9e8d5
@ -368,17 +368,35 @@ int main(int argc, char *argv[])
|
|||||||
goto non_test_error;
|
goto non_test_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (set_get_compare_clear_save_load(c, "lxc.apparmor.profile", "unconfined", tmpf, true) < 0) {
|
ret = set_get_compare_clear_save_load(c, "lxc.apparmor.profile", "unconfined", tmpf, true);
|
||||||
|
#if HAVE_APPARMOR
|
||||||
|
if (ret < 0)
|
||||||
|
#else
|
||||||
|
if (ret == 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
lxc_error("%s\n", "lxc.apparmor.profile");
|
lxc_error("%s\n", "lxc.apparmor.profile");
|
||||||
goto non_test_error;
|
goto non_test_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (set_get_compare_clear_save_load(c, "lxc.apparmor.allow_incomplete", "1", tmpf, true) < 0) {
|
ret = set_get_compare_clear_save_load(c, "lxc.apparmor.allow_incomplete", "1", tmpf, true);
|
||||||
|
#if HAVE_APPARMOR
|
||||||
|
if (ret < 0)
|
||||||
|
#else
|
||||||
|
if (ret == 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
lxc_error("%s\n", "lxc.apparmor.allow_incomplete");
|
lxc_error("%s\n", "lxc.apparmor.allow_incomplete");
|
||||||
goto non_test_error;
|
goto non_test_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (set_get_compare_clear_save_load(c, "lxc.selinux.context", "system_u:system_r:lxc_t:s0:c22", tmpf, true) < 0) {
|
ret = set_get_compare_clear_save_load(c, "lxc.selinux.context", "system_u:system_r:lxc_t:s0:c22", tmpf, true);
|
||||||
|
#if HAVE_SELINUX
|
||||||
|
if (ret < 0)
|
||||||
|
#else
|
||||||
|
if (ret == 0)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
lxc_error("%s\n", "lxc.selinux.context");
|
lxc_error("%s\n", "lxc.selinux.context");
|
||||||
goto non_test_error;
|
goto non_test_error;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user