summaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-29 13:58:53 +0200
committerLennart Poettering <lennart@poettering.net>2020-05-19 17:27:13 +0200
commit053e0626dbbfa5561a3c746d911e7be1525a64f1 (patch)
tree629125c5c1e69e1a38991db189efe79873c32507 /src/test
parentMerge pull request #15845 from poettering/btrfs-encrypted-fix (diff)
downloadsystemd-053e0626dbbfa5561a3c746d911e7be1525a64f1.tar.xz
systemd-053e0626dbbfa5561a3c746d911e7be1525a64f1.zip
fs-util: teach unlinkat_deallocate() a simple scheme for overwriting for erasing
With that it becomes useful for deleting password files and such.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-fs-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/test-fs-util.c b/src/test/test-fs-util.c
index e144551eb7..80c4c209b3 100644
--- a/src/test/test-fs-util.c
+++ b/src/test/test-fs-util.c
@@ -670,7 +670,7 @@ static void test_unlinkat_deallocate(void) {
assert_se(st.st_blocks > 0);
assert_se(st.st_nlink == 1);
- assert_se(unlinkat_deallocate(AT_FDCWD, p, 0) >= 0);
+ assert_se(unlinkat_deallocate(AT_FDCWD, p, UNLINK_ERASE) >= 0);
assert_se(fstat(fd, &st) >= 0);
assert_se(IN_SET(st.st_size, 0, 6)); /* depending on whether hole punching worked the size will be 6