From: Patrick Donnelly Date: Thu, 3 May 2018 22:07:21 +0000 (-0700) Subject: qa: move snap-hierarchy out of snaps workunits X-Git-Tag: v14.0.0~220^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21805%2Fhead;p=ceph.git qa: move snap-hierarchy out of snaps workunits The snapshot hierarchy it leaves behind can't be cleaned up by `rm -rf` which breaks workunit cleanup. So, don't run this as part of normal snaps test. Signed-off-by: Patrick Donnelly --- diff --git a/qa/suites/fs/upgrade/snaps/tasks/1-client.yaml b/qa/suites/fs/upgrade/snaps/tasks/1-client.yaml index e9dea8f4e308..0aa6dcf7877a 100644 --- a/qa/suites/fs/upgrade/snaps/tasks/1-client.yaml +++ b/qa/suites/fs/upgrade/snaps/tasks/1-client.yaml @@ -9,5 +9,5 @@ tasks: cleanup: false clients: client.0: - - fs/snaps/snap-hierarchy.sh + - fs/snap-hierarchy.sh - print: "**** done snap hierarchy" diff --git a/qa/suites/fs/upgrade/snaps/tasks/5-client-sanity.yaml b/qa/suites/fs/upgrade/snaps/tasks/5-client-sanity.yaml index f32a89da4521..680e440757a2 100644 --- a/qa/suites/fs/upgrade/snaps/tasks/5-client-sanity.yaml +++ b/qa/suites/fs/upgrade/snaps/tasks/5-client-sanity.yaml @@ -6,5 +6,5 @@ tasks: VERIFY: verify clients: client.0: - - fs/snaps/snap-hierarchy.sh + - fs/snap-hierarchy.sh - print: "**** done verify snap hierarchy" diff --git a/qa/workunits/fs/snap-hierarchy.sh b/qa/workunits/fs/snap-hierarchy.sh new file mode 100755 index 000000000000..67f0e014bd06 --- /dev/null +++ b/qa/workunits/fs/snap-hierarchy.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +set -ex + +if [ -d "$1" ]; then + mkdir -p -- "$1" && cd "$1" +fi + +[ "$VERIFY" != verify ] && mkdir 1 +[ "$VERIFY" != verify ] && mkdir 1/.snap/first +stat 1/.snap/first +[ "$VERIFY" != verify ] && mkdir 1/2 +stat 1/.snap/first/2 && exit 1 +[ "$VERIFY" != verify ] && mkdir 1/2/.snap/second +stat 1/2/.snap/second +[ "$VERIFY" != verify ] && touch 1/foo +stat 1/.snap/first/foo && exit 1 +[ "$VERIFY" != verify ] && mkdir 1/.snap/third +stat 1/.snap/third/foo || exit 1 +[ "$VERIFY" != verify ] && mkdir 1/2/3 +[ "$VERIFY" != verify ] && mkdir 1/2/.snap/fourth +stat 1/2/.snap/fourth/3 + +exit 0 diff --git a/qa/workunits/fs/snaps/snap-hierarchy.sh b/qa/workunits/fs/snaps/snap-hierarchy.sh deleted file mode 100755 index 67f0e014bd06..000000000000 --- a/qa/workunits/fs/snaps/snap-hierarchy.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh - -set -ex - -if [ -d "$1" ]; then - mkdir -p -- "$1" && cd "$1" -fi - -[ "$VERIFY" != verify ] && mkdir 1 -[ "$VERIFY" != verify ] && mkdir 1/.snap/first -stat 1/.snap/first -[ "$VERIFY" != verify ] && mkdir 1/2 -stat 1/.snap/first/2 && exit 1 -[ "$VERIFY" != verify ] && mkdir 1/2/.snap/second -stat 1/2/.snap/second -[ "$VERIFY" != verify ] && touch 1/foo -stat 1/.snap/first/foo && exit 1 -[ "$VERIFY" != verify ] && mkdir 1/.snap/third -stat 1/.snap/third/foo || exit 1 -[ "$VERIFY" != verify ] && mkdir 1/2/3 -[ "$VERIFY" != verify ] && mkdir 1/2/.snap/fourth -stat 1/2/.snap/fourth/3 - -exit 0