about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/unix/sysv/linux/tst-fanotify.c13
2 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 1f291278b6..773ea6a1c6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-09-05  Mike Frysinger  <vapier@gentoo.org>
+
+	* sysdeps/unix/sysv/linux/tst-fanotify.c (do_test): Skip test when
+	fanotify_init returns EPERM.
+
 2013-09-04  Joseph Myers  <joseph@codesourcery.com>
 
 	* conform/conformtest.pl (newtoken): Treat tokens not allowed as
diff --git a/sysdeps/unix/sysv/linux/tst-fanotify.c b/sysdeps/unix/sysv/linux/tst-fanotify.c
index b88995d6f3..b21e160cad 100644
--- a/sysdeps/unix/sysv/linux/tst-fanotify.c
+++ b/sysdeps/unix/sysv/linux/tst-fanotify.c
@@ -29,11 +29,14 @@ do_test (void)
   fd = fanotify_init (0, 0);
   if (fd < 0)
     {
-      if (errno == ENOSYS)
-	{
-	  puts ("SKIP: missing support for fanotify (check CONFIG_FANOTIFY=y)");
-	  return 0;
-	}
+      switch (errno) {
+      case ENOSYS:
+	puts ("SKIP: missing support for fanotify (check CONFIG_FANOTIFY=y)");
+	return 0;
+      case EPERM:
+	puts ("SKIP: missing proper permissions for runtime test");
+	return 0;
+      }
 
       perror ("fanotify_init (0, 0) failed");
       return 1;