test/json: cover get_notification_types RPC
Change-Id: I703febc5999793c7deb6435648b7d857232bff6f Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456775 Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
5afa401230
commit
10d659a748
@ -48,6 +48,25 @@ function initiator_rpc() {
|
||||
RE_UUID="[[:alnum:]-]+"
|
||||
last_event_id=0
|
||||
|
||||
function tgt_check_notification_types() {
|
||||
timing_enter $FUNCNAME
|
||||
|
||||
local ret=0
|
||||
local enabled_types="
|
||||
bdev_register
|
||||
bdev_unregister
|
||||
"
|
||||
|
||||
get_types=$(tgt_rpc get_notification_types | jq -r '.[]')
|
||||
if [ "$(echo $enabled_types)" != "$(echo $get_types)" ]; then
|
||||
echo "ERROR: expected types:" $enabled_types ", but got:" $get_types
|
||||
ret=1
|
||||
fi
|
||||
|
||||
timing_exit $FUNCNAME
|
||||
return $ret
|
||||
}
|
||||
|
||||
function tgt_check_notifications() {
|
||||
local event_line event ev_type ev_ctx
|
||||
local rc=""
|
||||
@ -340,6 +359,8 @@ function json_config_test_init()
|
||||
echo ']}'
|
||||
) | tgt_rpc load_config
|
||||
|
||||
tgt_check_notification_types
|
||||
|
||||
if [[ $SPDK_TEST_BLOCKDEV -eq 1 ]]; then
|
||||
create_bdev_subsystem_config
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user