]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tests/ceph-disk: Let teardown clearing data 7762/head
authorErwan Velu <erwan@redhat.com>
Tue, 23 Feb 2016 16:54:21 +0000 (17:54 +0100)
committerErwan Velu <erwan@redhat.com>
Wed, 24 Feb 2016 08:56:01 +0000 (09:56 +0100)
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 <erwan@redhat.com>
src/ceph-disk/tests/ceph-disk.sh

index 9456ee364f3006bed07b9c743018f70775abbf64..479e319b387f25468bc1698c4b532f34e21bd55f 100644 (file)
@@ -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() {