From c0df2ecf2f2098475dfb949fc0010e05ee3d01e5 Mon Sep 17 00:00:00 2001 From: Venky Shankar Date: Tue, 25 Apr 2023 04:53:58 -0400 Subject: [PATCH] qa: add checks that validate removal of entries from lost+found dir Signed-off-by: Venky Shankar (cherry picked from commit 0252313c8726c74f874436b5f003bb1ee934c571) --- qa/tasks/cephfs/test_data_scan.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qa/tasks/cephfs/test_data_scan.py b/qa/tasks/cephfs/test_data_scan.py index b813d1417dac..6affab91d7d7 100644 --- a/qa/tasks/cephfs/test_data_scan.py +++ b/qa/tasks/cephfs/test_data_scan.py @@ -131,6 +131,10 @@ class BacktracelessFile(Workload): # We might not have got the name or path, but we should still get the size self.assert_equal(st['st_size'], self._initial_state['st_size']) + # remove the entry from lost+found directory + self._mount.run_shell(["sudo", "rm", "-f", f'lost+found/{ino_name}'], omit_sudo=False) + self.assert_equal(self._mount.ls("lost+found", sudo=True), []) + return self._errors -- 2.47.3