2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-31 14:25:52 +00:00

tests: fix move_mount test failure caused by returned error

The move_mount tests were returning -1 in case of failure causing it
to become 255 in some systems, but checktestbg in the testsuite
considers any return value greater than 128 to be a signal error.
That would cause tests that should fail to display the following test
error:
... was expected to 'fail'. Reason for failure 'killed by
signal 127'

Signed-off-by: Georgia Garcia <georgia.garcia@canonical.com>
This commit is contained in:
Georgia Garcia
2024-01-12 17:12:43 -03:00
parent c8a2dc34d9
commit 28e67c7ba8

View File

@@ -240,5 +240,5 @@ int main(int argc, char *argv[])
}
if (ret == 0)
printf("PASS\n");
exit(ret);
exit(ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}