mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-03 08:11:08 +00:00
tst-fanotify: skip when we get back EPERM
Since fanotify_init requires CAP_SYS_ADMIN in order to work (which usually means running as root), we need to handle that error case too. Reported-by: Andreas Jaeger <aj@suse.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
This commit is contained in:
parent
2deb7bdb74
commit
bb8ea71379
@ -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>
|
2013-09-04 Joseph Myers <joseph@codesourcery.com>
|
||||||
|
|
||||||
* conform/conformtest.pl (newtoken): Treat tokens not allowed as
|
* conform/conformtest.pl (newtoken): Treat tokens not allowed as
|
||||||
|
@ -29,11 +29,14 @@ do_test (void)
|
|||||||
fd = fanotify_init (0, 0);
|
fd = fanotify_init (0, 0);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
{
|
{
|
||||||
if (errno == ENOSYS)
|
switch (errno) {
|
||||||
{
|
case ENOSYS:
|
||||||
puts ("SKIP: missing support for fanotify (check CONFIG_FANOTIFY=y)");
|
puts ("SKIP: missing support for fanotify (check CONFIG_FANOTIFY=y)");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
case EPERM:
|
||||||
|
puts ("SKIP: missing proper permissions for runtime test");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
perror ("fanotify_init (0, 0) failed");
|
perror ("fanotify_init (0, 0) failed");
|
||||||
return 1;
|
return 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user