]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test: validate empty json output during recursive scrub
authorVenky Shankar <vshankar@redhat.com>
Fri, 13 Jul 2018 11:39:12 +0000 (07:39 -0400)
committerVenky Shankar <vshankar@redhat.com>
Tue, 17 Jul 2018 09:20:43 +0000 (05:20 -0400)
Signed-off-by: Venky Shankar <vshankar@redhat.com>
Fixes: http://tracker.ceph.com/issues/23958
qa/tasks/cephfs/test_forward_scrub.py
qa/tasks/cephfs/test_scrub.py

index ac912dd0b2968b3f402c95cbac1528b0306c3b21..1f80366af0cf98ccf8b9cec365a9ba182f1df6b8 100644 (file)
@@ -232,7 +232,8 @@ class TestForwardScrub(CephFSTestCase):
         self.mount_a.umount_wait()
 
         with self.assert_cluster_log("inode table repaired", invert_match=True):
-            self.fs.mds_asok(["scrub_path", "/", "repair", "recursive"])
+            out_json = self.fs.mds_asok(["scrub_path", "/", "repair", "recursive"])
+            self.assertNotEqual(out_json, None)
 
         self.mds_cluster.mds_stop()
         self.mds_cluster.mds_fail()
@@ -254,7 +255,8 @@ class TestForwardScrub(CephFSTestCase):
         self.fs.wait_for_daemons()
 
         with self.assert_cluster_log("inode table repaired"):
-            self.fs.mds_asok(["scrub_path", "/", "repair", "recursive"])
+            out_json = self.fs.mds_asok(["scrub_path", "/", "repair", "recursive"])
+            self.assertNotEqual(out_json, None)
 
         self.mds_cluster.mds_stop()
         table_text = self.fs.table_tool(["0", "show", "inode"])
@@ -284,7 +286,8 @@ class TestForwardScrub(CephFSTestCase):
                                   "oh i'm sorry did i overwrite your xattr?")
 
         with self.assert_cluster_log("bad backtrace on inode"):
-            self.fs.mds_asok(["scrub_path", "/", "repair", "recursive"])
+            out_json = self.fs.mds_asok(["scrub_path", "/", "repair", "recursive"])
+            self.assertNotEqual(out_json, None)
         self.fs.mds_asok(["flush", "journal"])
         backtrace = self.fs.read_backtrace(file_ino)
         self.assertEqual(['alpha', 'parent_a'],
index 12ce1668ed1bfd362f56a19415d12538063a26e6..9469dfce6e4939edd926890eda96b8f43465cb0a 100644 (file)
@@ -103,7 +103,8 @@ class DupInodeWorkload(Workload):
         self._filesystem.wait_for_daemons()
 
     def validate(self):
-        self._filesystem.mds_asok(["scrub_path", "/", "recursive", "repair"])
+        out_json = self._filesystem.mds_asok(["scrub_path", "/", "recursive", "repair"])
+        self.assertNotEqual(out_json, None)
         self.assertTrue(self._filesystem.are_daemons_healthy())
         return self._errors
 
@@ -128,7 +129,8 @@ class TestScrub(CephFSTestCase):
         # Apply any data damage the workload wants
         workload.damage()
 
-        self.fs.mds_asok(["scrub_path", "/", "recursive", "repair"])
+        out_json = self.fs.mds_asok(["scrub_path", "/", "recursive", "repair"])
+        self.assertNotEqual(out_json, None)
 
         # See that the files are present and correct
         errors = workload.validate()