Skip to content

Commit

Permalink
Merge pull request #12005 from wjwithagen/wip-wjw-freebsd-ceph-helpers
Browse files Browse the repository at this point in the history
workunits/ceph-helpers.sh: FreeBSD returns a different errorstring.

Reviewed-by: Kefu Chai <kchai@redhat.com>
  • Loading branch information
tchaikov committed Nov 21, 2016
2 parents 9369f20 + e34e186 commit 23c2123
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions qa/workunits/ceph-helpers.sh
Expand Up @@ -1327,10 +1327,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
Expand Down

0 comments on commit 23c2123

Please sign in to comment.