mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-26 09:50:06 +01:00
test: if we're not root, return with status 77
exit code 77 signals "skip this test" Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
84d49ee49c
commit
916e8296f6
1 changed files with 7 additions and 0 deletions
|
|
@ -3563,6 +3563,13 @@ main(int argc, char **argv)
|
|||
const struct rlimit corelimit = { 0, 0 };
|
||||
enum litest_mode mode;
|
||||
|
||||
if (getuid() != 0) {
|
||||
fprintf(stderr,
|
||||
"%s must be run as root.\n",
|
||||
program_invocation_short_name);
|
||||
return 77;
|
||||
}
|
||||
|
||||
litest_init_test_devices();
|
||||
|
||||
list_init(&all_tests);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue