Commit 1c9125e7 authored by Tomasz Zawadzki's avatar Tomasz Zawadzki
Browse files

test: add bdev_wait_for_examine to static JSON configs



Runtime RPCs such as bdev creation has no chance to wait for
bdev examination to finish. To handle this case commit below
introduced bdev_wait_for_examine RPC, and built it into all newly
saved JSON configurations:
(e57bb1af)lib/bdev: build bdev_wait_for_examine into subsystem

Some tests generate the configuration by hand, rather than
saving it from an existing application.
This patch embeds this RPC into the test configs.

Fixes #1760

Signed-off-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Change-Id: I79f998d722a2d19aa98b78333c64dbd2c1151444
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7861


Community-CI: Broadcom CI
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarAleksey Marchuk <alexeymar@mellanox.com>
parent d69b16da
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -142,6 +142,9 @@ jq . <<- JSON > ${conf_file}
	            "block_size": 512,
	            "filename": "${tmp_file}"
	          }
	        },
	        {
	          "method": "bdev_wait_for_examine"
		}
	      ]
	    }
+4 −1
Original line number Diff line number Diff line
@@ -77,7 +77,10 @@ gen_conf() {
		    {
		      "subsystem": "bdev",
		      "config": [
		        ${config[*]}
		        ${config[*]},
			{
			  "method": "bdev_wait_for_examine"
			}
		      ]
		    }
		    ${extra_subsystems[*]:+,${extra_subsystems[*]}}
+3 −0
Original line number Diff line number Diff line
@@ -143,6 +143,9 @@ function initiator_json_config() {
		            "url": "iscsi://$TARGET_IP/iqn.2016-06.io.spdk:disk1/0",
		            "initiator_iqn": "iqn.2016-06.io.spdk:disk1/0"
		          }
		        },
		        {
		          "method": "bdev_wait_for_examine"
		        }
		      ]
		    }
+4 −1
Original line number Diff line number Diff line
@@ -85,7 +85,10 @@ function create_spdk_bdev_conf() {
				{
					"subsystem": "bdev",
					"config": [
						${bdev_json_cfg[*]}
						${bdev_json_cfg[*]},
					        {
					                "method": "bdev_wait_for_examine"
					        }
					]
				}
			]
+4 −1
Original line number Diff line number Diff line
@@ -573,7 +573,10 @@ function gen_nvmf_target_json() {
		        $(
		IFS=","
		printf '%s\n' "${config[*]}"
		)
		),
			{
			  "method": "bdev_wait_for_examine"
			}
		      ]
		    }
		  ]
Loading