From: Erwan Velu Date: Tue, 23 Feb 2016 16:54:21 +0000 (+0100) Subject: tests/ceph-disk: Let teardown clearing data X-Git-Tag: v10.1.0~317^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F7762%2Fhead;p=ceph.git tests/ceph-disk: Let teardown clearing data 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 --- 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() {