8 if "$@"; then return 1; else return 0; fi
11 echo note: assuming mon.a is on the current host
13 # can set to 'sudo ./ceph' to execute tests from current dir for development
14 CEPH=${CEPH:-'sudo ceph'}
16 ${CEPH} daemon mon.a version | grep version
18 # get debug_ms setting and strip it, painfully for reuse
19 old_ms=$(${CEPH} daemon mon.a config get debug_ms | \
20 grep debug_ms | sed -e 's/.*: //' -e 's/["\}\\]//g')
21 ${CEPH} daemon mon.a config set debug_ms 13
22 new_ms=$(${CEPH} daemon mon.a config get debug_ms | \
23 grep debug_ms | sed -e 's/.*: //' -e 's/["\}\\]//g')
24 [ "$new_ms" = "13/13" ]
25 ${CEPH} daemon mon.a config set debug_ms $old_ms
26 new_ms=$(${CEPH} daemon mon.a config get debug_ms | \
27 grep debug_ms | sed -e 's/.*: //' -e 's/["\}\\]//g')
28 [ "$new_ms" = "$old_ms" ]
30 # unregistered/non-existent command
31 expect_false ${CEPH} daemon mon.a bogus_command_blah foo
34 OUTPUT=$(${CEPH} -c /not/a/ceph.conf daemon mon.a help 2>&1)
36 if [ $? != 22 ] ; then exit 1; fi
37 if ! echo "$OUTPUT" | grep -q '.*open.*/not/a/ceph.conf'; then
38 echo "didn't find expected error in bad conf search"