summaryrefslogtreecommitdiff
path: root/src/test/test-stat-util.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-06-17 12:37:16 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-06-17 12:37:16 -0400
commite3f791a2b35b98cddf1f140ee5c80e5403d89afd (patch)
tree2f745f336c355e6d09a39252c680cf87b37d19f9 /src/test/test-stat-util.c
parenta1bb2402cb6edc4b46f6bf2bc3ed2773bb213919 (diff)
downloadsystemd-e3f791a2b35b98cddf1f140ee5c80e5403d89afd.tar.gz
systemd-e3f791a2b35b98cddf1f140ee5c80e5403d89afd.tar.bz2
systemd-e3f791a2b35b98cddf1f140ee5c80e5403d89afd.zip
basic/path-util: allow flags for path_equal_or_files_same
No functional change, just a new parameters and the tests that AT_SYMLINK_NOFOLLOW works as expected.
Diffstat (limited to 'src/test/test-stat-util.c')
-rw-r--r--src/test/test-stat-util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/test/test-stat-util.c b/src/test/test-stat-util.c
index 3ff2aadea4..8e027ff26c 100644
--- a/src/test/test-stat-util.c
+++ b/src/test/test-stat-util.c
@@ -38,8 +38,10 @@ static void test_files_same(void) {
assert_se(fd >= 0);
assert_se(symlink(name, name_alias) >= 0);
- assert_se(files_same(name, name));
- assert_se(files_same(name, name_alias));
+ assert_se(files_same(name, name, 0));
+ assert_se(files_same(name, name, AT_SYMLINK_NOFOLLOW));
+ assert_se(files_same(name, name_alias, 0));
+ assert_se(!files_same(name, name_alias, AT_SYMLINK_NOFOLLOW));
unlink(name);
unlink(name_alias);