summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-04-06 15:26:59 +0200
committerLennart Poettering <lennart@poettering.net>2015-04-06 15:26:59 +0200
commitf70a17f8d47ec8a62fa3b9b0bbe40fa107088540 (patch)
tree9851b37698e3c2846b1edb335134c984f850f470 /src/test
parentcbf21ecc02746b3e651c5067658a9f1e99838a53 (diff)
btrfs: add support for recursive btrfs snapshotting
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-btrfs.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/test/test-btrfs.c b/src/test/test-btrfs.c
index 94437f7624..838ffcba3d 100644
--- a/src/test/test-btrfs.c
+++ b/src/test/test-btrfs.c
@@ -133,9 +133,17 @@ int main(int argc, char *argv[]) {
if (mkdir("/xxxrectest/mnt", 0755) < 0)
log_error_errno(errno, "Failed to make directory: %m");
+ r = btrfs_subvol_snapshot("/xxxrectest", "/xxxrectest2", BTRFS_SNAPSHOT_RECURSIVE);
+ if (r < 0)
+ log_error_errno(r, "Failed to snapshot subvolume: %m");
+
r = btrfs_subvol_remove("/xxxrectest", true);
if (r < 0)
log_error_errno(r, "Failed to recursively remove subvolume: %m");
+ r = btrfs_subvol_remove("/xxxrectest2", true);
+ if (r < 0)
+ log_error_errno(r, "Failed to recursively remove subvolume: %m");
+
return 0;
}