[PATCHv2] time/tst-clock2.c: clock_settime CLOCK_MONOTONIC might return EPERM
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
dj/TryBot-32bit |
success
|
Build for i686
|
redhat-pt-bot/TryBot-still_applies |
warning
|
Patch no longer applies to master
|
Commit Message
clock_settime can return errno EPERM if it does not have permission
to set the clock indicated. The test expects setting the monotonic
clock must fail. Which it does. But the errno can be either EINVAL
or EPERM.
---
v2: add %m and split too long printf line.
https://code.wildebeest.org/git/user/mjw/glibc/commit/?h=container-perms&id=d90b0d2ac7cb14d035d2ade47ca1115486888b63
time/tst-clock2.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -27,10 +27,10 @@ do_test (void)
puts ("clock_settime(CLOCK_MONOTONIC) did not fail");
return 1;
}
- if (errno != EINVAL)
+ if (errno != EINVAL && errno != EPERM)
{
- printf ("clock_settime(CLOCK_MONOTONIC) set errno to %d, expected %d\n",
- errno, EINVAL);
+ printf ("clock_settime(CLOCK_MONOTONIC) set errno to %d (%m),"
+ " expected %d or %d\n", errno, EINVAL, EPERM);
return 1;
}
return 0;