]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
modified the script to run on both argonaut and bobtail.
authortamil <tamil.muthamizhan@inktank.com>
Thu, 7 Feb 2013 19:47:06 +0000 (11:47 -0800)
committertamil <tamil.muthamizhan@inktank.com>
Thu, 7 Feb 2013 19:47:06 +0000 (11:47 -0800)
Signed-off-by: tamil <tamil.muthamizhan@inktank.com>
qa/qa_scripts/RbdLib.pm
qa/qa_scripts/rbd_cli_tests.pl

index d0749f49ec03c8c597ab76b325204abcba82794d..a7d957b3fe5cd4f01727a88c6c81704e43182ce7 100755 (executable)
@@ -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/ ) )
       )
     {
index dcfc6f1956074bd229f21cb5cc3896598d59bf34..854089e5ce687d30a66ea01d35303ae96dfea22b 100755 (executable)
@@ -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,