From a41443b6b6ed251c128ac77dd36c1d6d4b7a83c1 Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Tue, 26 Feb 2013 20:27:51 +0100 Subject: [PATCH] More extensive testing. --- Makefile.am | 28 +++++++++++++++++++++++----- maketest.sh | 3 ++- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/Makefile.am b/Makefile.am index d4f07f82..f635cb77 100644 --- a/Makefile.am +++ b/Makefile.am @@ -209,7 +209,29 @@ endif $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf check 2>> test.log $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf sync $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf check - echo --- Abort sync with additions and then delete the new additions and sync again + echo --- Abort sync late with additions, delete them and recover with RAID6 + echo --- This triggers the recoving with q using p to check the validity + cp -pR test/disk1/_a test/disk1/_c + cp -pR test/disk1/_a test/disk1/_d + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self --test-kill-after-sync -c $(srcdir)/test-raid6.conf sync + rm -r test/disk1/_c + rm -r test/disk1/_d + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf fix 2>> test.log + rm -r test/disk1/_c + rm -r test/disk1/_d + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf sync + echo --- Abort sync early with additions, delete them and recover with RAID6 + echo --- This triggers the recoving with q using p to check the validity, but failing for new block being filled with zero + cp -pR test/disk1/_a test/disk1/_c + cp -pR test/disk1/_a test/disk1/_d + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -t 1 --test-kill-after-sync -c $(srcdir)/test-raid6.conf sync + rm -r test/disk1/_c + rm -r test/disk1/_d + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self --test-expect-unrecoverable -c $(srcdir)/test-raid6.conf fix 2>> test.log + rm -r test/disk1/_c + rm -r test/disk1/_d + $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf sync + echo --- Abort sync late with additions and then delete the new additions and sync again cp -pR test/disk1/_a test/disk1/_c cp -pR test/disk2/_a test/disk2/_c cp -pR test/disk3/_a test/disk3/_c @@ -218,7 +240,6 @@ endif rm -r test/disk2/_c rm -r test/disk3/_c $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf sync - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf check echo --- Abort sync late with additions and then delete some unchanged stuff and fix with RAID5 cp -pR test/disk1/_b test/disk1/_c $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid5.conf --test-kill-after-sync sync @@ -227,7 +248,6 @@ endif $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid5.conf fix 2>> test.log rm -r test/disk1/_c $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf sync - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf check echo --- Abort sync late with more deletions than additions and then delete some unchanged stuff and fix with RAID5 cp -pR test/disk1/_a test/disk1/_c mv test/disk1/_a test/_a @@ -242,7 +262,6 @@ endif mv test/_a test/disk1/_a mv test/_b test/disk1/_b $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf sync - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf check echo --- Abort sync early with more deletions than additions and then delete some unchanged stuff and fix with RAID6 cp -pR test/disk1/_a test/disk1/_c mv test/disk1/_a test/_a @@ -258,7 +277,6 @@ endif mv test/_a test/disk1/_a mv test/_b test/disk1/_b $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf sync - $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self -c $(srcdir)/test-raid6.conf check echo --- Delete some files, fix with -m and check with raid5 rm test/disk1/8* $(TESTENV) ./snapraid$(EXEEXT) $(CHECKFLAGS) --test-skip-self --test-expect-recoverable -c $(srcdir)/test-raid5.conf check 2>> test.log diff --git a/maketest.sh b/maketest.sh index 2ce3c392..9942239f 100755 --- a/maketest.sh +++ b/maketest.sh @@ -3,6 +3,8 @@ make distclean +rm -rf cov_release + if ! ./configure --enable-coverage; then exit 1 fi @@ -11,7 +13,6 @@ if ! make lcov_reset check lcov_capture lcov_html; then exit 1 fi -rm -rf cov_release mv cov cov_release if ! make distclean; then