summaryrefslogtreecommitdiff
path: root/src/test/test-fs-util.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-05-03 01:24:11 +0900
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-05-28 13:44:19 +0900
commit39d7af99c237e7d558075010b28983954875c353 (patch)
treee3ccc54ac6926c4e0a49047c9f7b74984e179b45 /src/test/test-fs-util.c
parent353df4438ee29068df8f36187ae7e73f889e2120 (diff)
downloadsystemd-39d7af99c237e7d558075010b28983954875c353.tar.gz
fs-util: make chase_symlinks() use path_find_first_component()
The previous commit about path_compare() breaks chase_symlinks(). This commit fixes it.
Diffstat (limited to 'src/test/test-fs-util.c')
-rw-r--r--src/test/test-fs-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c
index c42c48722f..63bb830370 100644
--- a/src/test/test-fs-util.c
+++ b/src/test/test-fs-util.c
@@ -332,7 +332,7 @@ static void test_chase_symlinks(void) {
assert_se(S_ISLNK(st.st_mode));
result = mfree(result);
- /* Test CHASE_ONE */
+ /* Test CHASE_STEP */
p = strjoina(temp, "/start");
r = chase_symlinks(p, NULL, CHASE_STEP, &result, NULL);
@@ -343,7 +343,7 @@ static void test_chase_symlinks(void) {
r = chase_symlinks(p, NULL, CHASE_STEP, &result, NULL);
assert_se(r == 0);
- p = strjoina(temp, "/top/./dotdota");
+ p = strjoina(temp, "/top/dotdota");
assert_se(streq(p, result));
result = mfree(result);