summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamil <tamil.muthamizhan@inktank.com>2013-02-07 11:47:06 -0800
committertamil <tamil.muthamizhan@inktank.com>2013-02-07 11:47:06 -0800
commit5896b971a386b62387db78411bac1b36173f3dd9 (patch)
tree773ca90b17e9a8710835f3873b7619c7721da80d
parent943235351953c773988f3a44e20e632c7e796c56 (diff)
downloadceph-5896b971a386b62387db78411bac1b36173f3dd9.tar.gz
modified the script to run on both argonaut and bobtail.
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
-rwxr-xr-xqa/qa_scripts/RbdLib.pm8
-rwxr-xr-xqa/qa_scripts/rbd_cli_tests.pl18
2 files changed, 17 insertions, 9 deletions
diff --git a/qa/qa_scripts/RbdLib.pm b/qa/qa_scripts/RbdLib.pm
index d0749f49ec0..a7d957b3fe5 100755
--- a/qa/qa_scripts/RbdLib.pm
+++ b/qa/qa_scripts/RbdLib.pm
@@ -52,6 +52,9 @@ our $RBD_SHOWMAPPED = "rbd showmapped";
our $RADOS_LS = "rados ls";
#====Error messages========================
+our $RBD_CREATE_ERR = "size must be >= 0";
+our $RBD_EXTRA_ERR = "extraneous parameter";
+our $RBD_REQ_ERR = "expected integer";
our $RBD_RM_ERROR = "image name was not specified";
our $SNAP_LS_ERROR = "snap name was not specified";
our $SNAP_RM_ERROR = "remove failed";
@@ -69,6 +72,7 @@ our $RBD_IMP_ERR = "import failed";
our $RBD_MAP_ERR = "add failed";
our $RBD_UNMAP_ERR = "remove failed";
our $RBD_INFO_SNAP_ERR = "error setting snapshot context";
+our $RBD_SIZE_ERR = "must specify size in MB";
#=======Success messages=======================
@@ -402,6 +406,10 @@ sub validate_cmd_output {
|| ( $cmd_op =~ /$SNAP_ROLLBACK_ERR/ )
|| ( $cmd_op =~ /$RBD_MAP_ERR/ )
|| ( $cmd_op =~ /$RBD_UNMAP_ERR/ )
+ || ( $cmd_op =~ /$RBD_CREATE_ERR/ )
+ || ( $cmd_op =~ /$RBD_EXTRA_ERR/ )
+ || ( $cmd_op =~ /$RBD_REQ_ERR/ )
+ || ( $cmd_op =~ /$RBD_SIZE_ERR/ )
|| ( $cmd_op =~ /$RBD_INFO_SNAP_ERR/ ) )
)
{
diff --git a/qa/qa_scripts/rbd_cli_tests.pl b/qa/qa_scripts/rbd_cli_tests.pl
index dcfc6f19560..854089e5ce6 100755
--- a/qa/qa_scripts/rbd_cli_tests.pl
+++ b/qa/qa_scripts/rbd_cli_tests.pl
@@ -69,7 +69,7 @@ our $snap_name3 = "snap3";
our $snap_name4 = "snap4";
our $new_rbd_img = "new_rbd_img";
our $non_existing_img = "rbdimage";
-our $cp_new = "new";
+our $cp_new = "newest";
our $exp_file = "rbd_test_file1";
our $exp_file1 = "rbd_test_file2";
our $exp_file2 = "rbd_test_file3";
@@ -80,7 +80,7 @@ our $rbd_snap_new = "new";
our $neg_img_name = "neg_img";
our $new_img_name = "new_img";
our $max_img_name = "max_img";
-our $img_name1 = "test_img1";
+our $img_name1 = "testing_img1";
our $rbd_imp_test = "new_test_file";
our $non_pool_name = "no_pool";
our $no_snap = "no_snap";
@@ -98,12 +98,12 @@ sub create_image {
perform_action ( $RBD_CREATE, "$img_name,pool $pool_name,size 1024", 0 );
perform_action( $RBD_CREATE, "$img_name_mv,pool $pool_name,size 1024", 0 );
- perform_action( $RBD_CREATE, "$img_name1,pool $pool_name,size 0,order 22",
- 3 );
- perform_action( $RBD_CREATE, "$img_name1,pool $pool_name,size 0", 3 );
- perform_action( $RBD_CREATE, "$neg_img_name,pool $pool_name,size -1", 3 );
- perform_action( $RBD_CREATE, "$img_name1 pool $pool_name", 3 );
- perform_action( $RBD_CREATE, "--size 1024", 3 );
+ perform_action( $RBD_CREATE, "$img_name_mv,pool $pool_name,size 0,order 22",
+ 1 );
+ perform_action( $RBD_CREATE, "$img_name1,pool $pool_name,size 0", 0 );
+ perform_action( $RBD_CREATE, "$neg_img_name,pool $pool_name,size -1", 2 );
+ perform_action( $RBD_CREATE, "$img_name1 pool $pool_name", 2 );
+ perform_action( $RBD_CREATE, "--size 1024", 2 );
perform_action( $RBD_CREATE,
"$max_img_name,pool $pool_name,size 1024000000000", 0 );
perform_action( $RBD_CREATE, "$img_name1,pool $pool_name,size 2048,order",
@@ -208,7 +208,7 @@ sub remove_image {
sub export_image {
perform_action( $RBD_EXPORT, "$pool_name\/$img_name $exp_file", 0 );
perform_action( $RBD_EXPORT, "$pool_name\/$img_name .", 2 );
- perform_action( $RBD_EXPORT, "$pool_name\/$img_name", 2 );
+ perform_action( $RBD_EXPORT, "$pool_name\/$img_name", 0 );
perform_action( $RBD_EXPORT,
"--snap $snap_name $pool_name\/$img_name $exp_file1", 0 );
perform_action( $RBD_EXPORT,