[v2] resolv/tst-resolv-res_init-skeleton: Check for filtered syscall
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Testing passed
|
Commit Message
If sethostname syscall is filtered return UNSUPPORTED.
Found in a podman container on Fedora x86_64.
---
Changes to v1:
* update commit message to indicate where the failure was detected.
resolv/tst-resolv-res_init-skeleton.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
@@ -1039,7 +1039,11 @@ do_test (void)
/* We are in an UTS namespace, so we can set the host name without
altering the state of the entire system. */
if (sethostname (test_hostname, strlen (test_hostname)) != 0)
- FAIL_EXIT1 ("sethostname: %m");
+ {
+ if (errno == EPERM)
+ FAIL_UNSUPPORTED ("sethostname syscall argument is filtered");
+ FAIL_EXIT1 ("sethostname: %m");
+ }
/* These environment variables affect resolv.conf parsing. */
unsetenv ("LOCALDOMAIN");