ceph/qa
Kefu Chai 5e16f2379d test: cephtool/test.sh: fix expect_false with pipe
this fixes failures like,

/home/jenkins-build/build/workspace/ceph-pull-requests/qa/workunits/cephtool/test.sh:
line 32: ceph osd blacklist ls | grep 192.168.0.1: command not found

where the failure is not the "failure" we are expecting.

in our tests, following command

expect_false "ceph osd blacklist ls | grep 192.168.0.1"

is designed to to verify that "ceph osd blacklist ls | grep 192.168.0.1"
fails with non-zero return code. but expect_false() evaluates the command
line using plain "$@", which will send the arguments direct to the shell,
and $0 is "ceph auth get client.xx | grep caps | grep mon", which does
not exist and is not built-in command. so we need to check the grep
command instead.

for multiple piped command line, use

expect_false sh <<< "echo foo  | grep bar | grep baz"

Signed-off-by: Kefu Chai <kchai@redhat.com>
2016-07-05 15:26:43 +08:00
..
btrfs
client
fs
libceph
mds
mon/bootstrap
qa_scripts Add date to README 2016-05-18 11:27:10 -07:00
rbd
workunits test: cephtool/test.sh: fix expect_false with pipe 2016-07-05 15:26:43 +08:00
loopall.sh
Makefile
run_xfstests_krbd.sh
run_xfstests_qemu.sh
run_xfstests-obsolete.sh
run_xfstests.sh
runallonce.sh
runoncfuse.sh
runonkclient.sh
setup-chroot.sh