From 720b9515548bf57b63e0fe5bfe4d4161adcd8ce2 Mon Sep 17 00:00:00 2001 From: ben Date: Wed, 24 Jul 2002 00:31:53 +0000 Subject: Added test to check for crash on bad checkpoint data git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@172 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109 --- rdiff-backup/testing/finaltest.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/rdiff-backup/testing/finaltest.py b/rdiff-backup/testing/finaltest.py index 43daef6..e0589e7 100644 --- a/rdiff-backup/testing/finaltest.py +++ b/rdiff-backup/testing/finaltest.py @@ -331,5 +331,21 @@ class FinalCorrupt(PathSetter): self.set_connections(None, None, "test1/", '../') self.exec_rb(None, 'testfiles/corruptbackup_source', 'testfiles/output') + + def testCheckpointData(self): + """Destination directory has bad checkpoint data, no sym""" + self.delete_tmpdirs() + assert not os.system("cp -a testfiles/corrupt_dest1 testfiles/output") + self.set_connections(None, None, None, None) + self.exec_rb(None, 'testfiles/various_file_types', 'testfiles/output') + + def testCheckpointData2(self): + """Destination directory has bad checkpoint data, with sym""" + self.delete_tmpdirs() + assert not os.system("cp -a testfiles/corrupt_dest2 testfiles/output") + self.set_connections(None, None, None, None) + self.exec_rb(None, 'testfiles/various_file_types', 'testfiles/output') + + if __name__ == "__main__": unittest.main() -- cgit v1.2.1