diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-22 14:23:45 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-04-15 09:39:49 -0300 |
commit | 272e71dc366297781cd6ec5d8690e540d4b48398 (patch) | |
tree | 6982a2d0c0a4b73602cb6b0f51638de21481cfd0 /io/tst-utimensat-skeleton.c | |
parent | cc1b4029fa35ed533075ae9f1836a6bf44789285 (diff) | |
download | glibc-272e71dc366297781cd6ec5d8690e540d4b48398.tar.gz glibc-272e71dc366297781cd6ec5d8690e540d4b48398.tar.xz glibc-272e71dc366297781cd6ec5d8690e540d4b48398.zip |
linux: Add lutimes test
It uses stat to compare against the values set by lutimes. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Diffstat (limited to 'io/tst-utimensat-skeleton.c')
-rw-r--r-- | io/tst-utimensat-skeleton.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/io/tst-utimensat-skeleton.c b/io/tst-utimensat-skeleton.c index 3589146db5..ad9f6763c5 100644 --- a/io/tst-utimensat-skeleton.c +++ b/io/tst-utimensat-skeleton.c @@ -24,6 +24,7 @@ static int temp_fd = -1; static char *testfile; +static char *testlink; const static struct { int64_t v1; @@ -49,6 +50,10 @@ do_prepare (int argc, char *argv[]) { temp_fd = create_temp_file ("utime", &testfile); TEST_VERIFY_EXIT (temp_fd > 0); + + testlink = xasprintf ("%s-symlink", testfile); + xsymlink (testfile, testlink); + add_temp_file (testlink); } static int @@ -82,7 +87,7 @@ do_test (void) continue; } - TEST_CALL (testfile, temp_fd, tests[i].v1, tests[i].v2); + TEST_CALL (testfile, temp_fd, testlink, tests[i].v1, tests[i].v2); } return 0; |