From f3631429264a0bf2ff337a0cc6c41bb33595ad96 Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Wed, 24 Jun 2020 23:29:00 +0200 Subject: [PATCH] test fix --- test_zfsautobackup.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test_zfsautobackup.py b/test_zfsautobackup.py index 95a9b92..3c26130 100644 --- a/test_zfsautobackup.py +++ b/test_zfsautobackup.py @@ -586,10 +586,11 @@ test_target1/test_source2/fs2/sub@test-20101111000002 with patch('time.strftime', return_value="20101111000000"): self.assertFalse(ZfsAutobackup("test test_target1 --verbose --min-change 100000".split(" ")).run()) - #make small change, use compress of and sync to reflect the changes immediately + #make small change, use umount to reflect the changes immediately r=shelltest("zfs set compress=off test_source1") r=shelltest("touch /test_source1/fs1/change.txt") - r=shelltest("zpool sync") + r=shelltest("zfs umount test_source1/fs1; zfs mount test_source1/fs1") + #too small change, takes no snapshots with patch('time.strftime', return_value="20101111000001"): @@ -597,7 +598,7 @@ test_target1/test_source2/fs2/sub@test-20101111000002 #make big change r=shelltest("dd if=/dev/zero of=/test_source1/fs1/change.txt bs=200000 count=1") - r=shelltest("zpool sync") + r=shelltest("zfs umount test_source1/fs1; zfs mount test_source1/fs1") #bigger change, should take snapshot with patch('time.strftime', return_value="20101111000002"):