From 800ab95bd55c9beebd14fd23ef34ea7f3e055e6a Mon Sep 17 00:00:00 2001 From: "greg@kroah.com" Date: Wed, 10 Nov 2004 18:11:00 -0800 Subject: [PATCH] [PATCH] make udev-test.pl test for root permissions before running Should prevent false error reports from happening. --- test/udev-test.pl | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/udev-test.pl b/test/udev-test.pl index e615a1ed..e8ce0b44 100644 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -1275,6 +1275,13 @@ sub run_test { } +# only run if we have root permissions +# due to mknod restrictions +if (!($<==0)) { + print "Must have root permissions to run properly.\n"; + exit; +} + # prepare system("rm -rf $udev_root"); mkdir($udev_root) || die "unable to create udev_root: $udev_root\n"; -- 2.39.5