diff options
author | Adam Crume <adamcrume@gmail.com> | 2014-10-10 22:33:39 +0200 |
---|---|---|
committer | Adam Crume <adamcrume@gmail.com> | 2014-10-10 22:33:39 +0200 |
commit | 022bace0a9ff4cf39187af7e1758469b640ee3b3 (patch) | |
tree | c5ae90c0ac336b83ad8fe76236ece7255ea64429 /src/test/test_rados_tool.sh | |
parent | test: Fix rmpool in test_rados_tool.sh (diff) | |
download | ceph-022bace0a9ff4cf39187af7e1758469b640ee3b3.tar.xz ceph-022bace0a9ff4cf39187af7e1758469b640ee3b3.zip |
rados: Add tests for CLI strict parsing
Fixes: 8983
Signed-off-by: Adam Crume <adamcrume@gmail.com>
Diffstat (limited to 'src/test/test_rados_tool.sh')
-rwxr-xr-x | src/test/test_rados_tool.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/src/test/test_rados_tool.sh b/src/test/test_rados_tool.sh index f85250d59ec..afd5f91a938 100755 --- a/src/test/test_rados_tool.sh +++ b/src/test/test_rados_tool.sh @@ -220,5 +220,48 @@ done diff -q -r "$TDIR/dir_cp_src" "$TDIR/dir_cp_dst" \ || die "copy pool validation failed!" +for opt in \ + block-size \ + concurrent-ios \ + min-object-size \ + max-object-size \ + min-op-len \ + max-op-len \ + max-ops \ + max-backlog \ + target-throughput \ + read-percent \ + num-objects \ + run-length \ + ; do + run_expect_succ "$RADOS_TOOL" --$opt 4 df + run_expect_fail "$RADOS_TOOL" --$opt 4k df +done + +run_expect_succ "$RADOS_TOOL" lock list f.1 --lock-duration 4 --pool "$POOL" +echo # previous command doesn't output an end of line: issue #9735 +run_expect_fail "$RADOS_TOOL" lock list f.1 --lock-duration 4k --pool "$POOL" + +run_expect_succ "$RADOS_TOOL" mksnap snap1 --pool "$POOL" +snapid=$("$RADOS_TOOL" lssnap --pool "$POOL" | grep snap1 | cut -f1) +[ $? -ne 0 ] && die "expected success, but got failure! cmd: \"$RADOS_TOOL\" lssnap --pool \"$POOL\" | grep snap1 | cut -f1" +run_expect_succ "$RADOS_TOOL" ls --pool "$POOL" --snapid="$snapid" +run_expect_fail "$RADOS_TOOL" ls --pool "$POOL" --snapid="$snapid"k + +run_expect_succ "$RADOS_TOOL" chown 1 --pool "$POOL" +run_expect_fail "$RADOS_TOOL" chown 1k --pool "$POOL" + +run_expect_succ "$RADOS_TOOL" truncate f.1 0 --pool "$POOL" +run_expect_fail "$RADOS_TOOL" truncate f.1 0k --pool "$POOL" + +run "$RADOS_TOOL" rmpool delete_me_mkpool_test delete_me_mkpool_test --yes-i-really-really-mean-it +run_expect_succ "$RADOS_TOOL" mkpool delete_me_mkpool_test 0 0 +run_expect_fail "$RADOS_TOOL" mkpool delete_me_mkpool_test2 0k 0 +run_expect_fail "$RADOS_TOOL" mkpool delete_me_mkpool_test3 0 0k + +run_expect_succ "$RADOS_TOOL" --pool "$POOL" bench 1 write +run_expect_fail "$RADOS_TOOL" --pool "$POOL" bench 1k write + + echo "SUCCESS!" exit 0 |