From: Willem Jan Withagen Date: Tue, 15 Nov 2016 11:10:18 +0000 (+0100) Subject: workunits/ceph-helpers.sh: FreeBSD returns a different errorstring. X-Git-Tag: v11.1.0~226^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e34e18609f3a133fc81444e2e1b2819f84198c36;p=ceph.git workunits/ceph-helpers.sh: FreeBSD returns a different errorstring. Signed-off-by: Willem Jan Withagen --- diff --git a/qa/workunits/ceph-helpers.sh b/qa/workunits/ceph-helpers.sh index f441830a142c..e82de4661254 100755 --- a/qa/workunits/ceph-helpers.sh +++ b/qa/workunits/ceph-helpers.sh @@ -1285,10 +1285,17 @@ function test_wait_for_scrub() { function erasure_code_plugin_exists() { local plugin=$1 - local status + local grepstr + case `uname` in + FreeBSD) grepstr="Cannot open.*$plugin" ;; + *) grepstr="$plugin.*No such file" ;; + esac + if ceph osd erasure-code-profile set TESTPROFILE plugin=$plugin 2>&1 | - grep "$plugin.*No such file" ; then + grep "$grepstr" ; then + # display why the string was rejected. + ceph osd erasure-code-profile set TESTPROFILE plugin=$plugin status=1 else status=0