diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-06-02 11:05:10 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-06-06 14:42:03 +0200 |
commit | 8b85333cda91c3466b86918dfb214d08037b6f2f (patch) | |
tree | 284b491ad93f0071d48a65a12790a51b7e3d714f /src/test | |
parent | chase: Allow passing NULL as the empty path to chaseat() (diff) | |
download | systemd-8b85333cda91c3466b86918dfb214d08037b6f2f.tar.xz systemd-8b85333cda91c3466b86918dfb214d08037b6f2f.zip |
test-chase: Add one more test for chase_and_openat()
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-chase.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-chase.c b/src/test/test-chase.c index c62a14a777..4f1573cec3 100644 --- a/src/test/test-chase.c +++ b/src/test/test-chase.c @@ -586,6 +586,12 @@ TEST(chaseat) { assert_se(fd_verify_directory(fd) >= 0); fd = safe_close(fd); + fd = chase_and_openat(tfd, NULL, CHASE_PARENT|CHASE_EXTRACT_FILENAME, O_PATH|O_DIRECTORY|O_CLOEXEC, &result); + assert_se(fd >= 0); + assert_se(streq(result, ".")); + fd = safe_close(fd); + result = mfree(result); + /* Test chase_and_openatdir() */ assert_se(chase_and_opendirat(tfd, "o/p/e/n/d/i", 0, &result, &dir) >= 0); |