aboutsummaryrefslogtreecommitdiff
path: root/posix/tst-chmod.c
diff options
context:
space:
mode:
authorFrédéric Bérat <fberat@redhat.com>2023-06-02 17:28:11 +0200
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2023-06-06 08:23:53 -0400
commitf6a532fbd0f430dc4ded254d713d89fcbafc1b7e (patch)
tree877e228c5be9426c828c3bd79ad8c5d9515b420f /posix/tst-chmod.c
parent8c4f69d711481a18c70cb9a6c0a5367604894320 (diff)
downloadglibc-f6a532fbd0f430dc4ded254d713d89fcbafc1b7e.zip
glibc-f6a532fbd0f430dc4ded254d713d89fcbafc1b7e.tar.gz
glibc-f6a532fbd0f430dc4ded254d713d89fcbafc1b7e.tar.bz2
tests: Replace various function calls with their x variant
With fortification enabled, few function calls return result need to be checked, has they get the __wur macro enabled. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'posix/tst-chmod.c')
-rw-r--r--posix/tst-chmod.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/posix/tst-chmod.c b/posix/tst-chmod.c
index b98a05a..470a696 100644
--- a/posix/tst-chmod.c
+++ b/posix/tst-chmod.c
@@ -27,6 +27,8 @@
#include <unistd.h>
#include <sys/stat.h>
+#include <support/xunistd.h>
+
#define OUT_OF_MEMORY \
do { \
@@ -229,7 +231,8 @@ do_test (int argc, char *argv[])
close (fd);
snprintf (buf, buflen, "%s/..", testdir);
- chdir (buf);
+ xchdir (buf);
+
/* We are now in the directory above the one we create the test
directory in. */
@@ -349,7 +352,7 @@ do_test (int argc, char *argv[])
}
fail:
- chdir (startdir);
+ xchdir (startdir);
/* Remove all the files. */
chmod (testdir, 0700);