From 48af4bec8b17ee57ba3896d9d4dec33edff2f479 Mon Sep 17 00:00:00 2001 From: Erwan Velu Date: Tue, 23 Feb 2016 17:54:21 +0100 Subject: [PATCH] tests/ceph-disk: Let teardown clearing data MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When running the ceph-disk check suite, 'test_mark_init' & 'test_activate_dir' had a permission denied of the freshly created stuff like in : tests/ceph-disk.sh:237: test_mark_init: /bin/rm -fr /ceph/src/ceph-disk/test-ceph-disk/dir /bin/rm: cannot remove « /ceph/src/ceph-disk/test-ceph-disk/dir/snap_1 »: Permission denied /bin/rm: cannot remove « /ceph/src/ceph-disk/test-ceph-disk/dir/current »: Permission denied /bin/rm: cannot remove « /ceph/src/ceph-disk/test-ceph-disk/dir/snap_2 »: Permission denied Those two tests are starting a mon with run_mon. Trying to delete the files while the daemon are still alive is impossible. This patch removes the explicit 'rm' and let the teardown doing the cleaning stuff by stopping daemons & cleaning content. By using this patch, make check is now sucessful on ceph-disk. Signed-off-by: Erwan Velu --- src/ceph-disk/tests/ceph-disk.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/ceph-disk/tests/ceph-disk.sh b/src/ceph-disk/tests/ceph-disk.sh index 9456ee364f30..479e319b387f 100644 --- a/src/ceph-disk/tests/ceph-disk.sh +++ b/src/ceph-disk/tests/ceph-disk.sh @@ -233,8 +233,6 @@ function test_mark_init() { ! test -f $osd_data/$(ceph-detect-init) || return 1 test -f $osd_data/$expected || return 1 - - $rm -fr $osd_data } function test_zap() { @@ -315,7 +313,6 @@ function test_activate_dir() { local osd_data=$DIR/dir $mkdir -p $osd_data test_activate $osd_data $osd_data || return 1 - $rm -fr $osd_data } function test_activate_dir_bluestore() { -- 2.47.3