[PATCH cr-tests] file locks: don't report failed checkpoint as failure

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



And report failure if checkpoint succeeds, bc it should not.

Signed-off-by: Serge E. Hallyn <serue@xxxxxxxxxx>
---
 fileio/run-fcntltests.sh |   10 +++++++++-
 fileio/runtests.sh       |    3 +++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/fileio/run-fcntltests.sh b/fileio/run-fcntltests.sh
index 35be131..2a5f628 100755
--- a/fileio/run-fcntltests.sh
+++ b/fileio/run-fcntltests.sh
@@ -51,8 +51,16 @@ checkpoint()
 	$ECHO "\t- Checkpoint: $CHECKPOINT $pid \> $CHECKPOINT_FILE"
 	$CHECKPOINT $pid > $CHECKPOINT_FILE
 	ret=$?
+	# At the moment we expect failure because checkpoint
+	# of file locks is not supported
 	if [ $ret -ne 0 ]; then
-		$ECHO "***** FAIL: Checkpoint of $pid failed"
+		$ECHO "***** PASS: Checkpoint of $pid failed"
+		ps -efL |grep $TEST_CMD >> $SCRIPT_LOG
+		killall -9 `basename $TEST_CMD`
+		thaw
+		exit 0;
+	else
+		$ECHO "***** FAIL: Checkpoint of $pid did not fail"
 		ps -efL |grep $TEST_CMD >> $SCRIPT_LOG
 		killall -9 `basename $TEST_CMD`
 		thaw
diff --git a/fileio/runtests.sh b/fileio/runtests.sh
index b808927..cb633fb 100755
--- a/fileio/runtests.sh
+++ b/fileio/runtests.sh
@@ -7,15 +7,18 @@ echo
 
 echo
 echo "****** $0: Running test: filelock1"
+echo "****** (expect FAIL)"
 echo
 ./run-fcntltests.sh filelock1
 
 echo
 echo "****** $0: Running test: filelease1"
+echo "****** (expect FAIL)"
 echo
 ./run-fcntltests.sh filelease1
 
 echo
 echo "****** $0: Running test: fsetown1"
+echo "****** (expect FAIL)"
 echo
 ./run-fcntltests.sh fsetown1
-- 
1.6.3.3

_______________________________________________
Containers mailing list
Containers@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/containers

[Index of Archives]     [Cgroups]     [Netdev]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux