Update smoke_tests

As now exported object path is not printed for cores that do not have
active exported object, there are needed some changes in tests that
relied on previous behavior.

Replace exported object based lookup with cache_id/core_id pair.

Signed-off-by: Robert Baldyga <robert.baldyga@intel.com>
This commit is contained in:
Robert Baldyga
2022-03-28 12:43:57 +02:00
parent fd1b2dc121
commit dff8f2f7b2
6 changed files with 96 additions and 46 deletions

View File

@@ -36,10 +36,10 @@ CACHE_ID_OPTION="1" CORE_DEVICE_OPTION="${CORE_DEVICE}-part1" add_core
CACHE_ID_OPTION="1" CORE_DEVICE_OPTION="${CORE_DEVICE}-part2" add_core
CACHE_ID_OPTION="1" CORE_DEVICE_OPTION="${CORE_DEVICE}-part3" add_core
DEVICE_ID_OPTION="${CACHE_DEVICE}-part1" DEMANDED_STATE_OPTION="Running" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-1" DEMANDED_STATE_OPTION="Active" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-2" DEMANDED_STATE_OPTION="Active" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-3" DEMANDED_STATE_OPTION="Active" check_device_state
CACHE_ID_OPTION="1" DEMANDED_STATE_OPTION="Running" check_cache_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="1" DEMANDED_STATE_OPTION="Active" check_core_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="2" DEMANDED_STATE_OPTION="Active" check_core_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="3" DEMANDED_STATE_OPTION="Active" check_core_state
# Stop prepared setup
CACHE_ID_OPTION="1" stop_cache
@@ -49,10 +49,10 @@ sleep 1
# Load cache, then add cores and check if chache is running
# Try to load cache device, check its state and cores state
CACHE_DEVICE_OPTION="${CACHE_DEVICE}-part1" CACHE_LOAD_METADATA_OPTION="y" start_cache
DEVICE_ID_OPTION="${CACHE_DEVICE}-part1" DEMANDED_STATE_OPTION="Incomplete" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-1" DEMANDED_STATE_OPTION="Active" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-2" DEMANDED_STATE_OPTION="Active" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-3" DEMANDED_STATE_OPTION="Inactive" check_device_state
CACHE_ID_OPTION="1" DEMANDED_STATE_OPTION="Incomplete" check_cache_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="1" DEMANDED_STATE_OPTION="Active" check_core_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="2" DEMANDED_STATE_OPTION="Active" check_core_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="3" DEMANDED_STATE_OPTION="Inactive" check_core_state
# Prepare partition for core device to be added
CACHE_ID_OPTION="1" CACHE_DONT_FLUSH_DATA_OPTION="1" stop_cache
@@ -62,16 +62,16 @@ sleep 1
CACHE_ID_OPTION="1" CORE_DEVICE_OPTION="${CORE_DEVICE}-part1" CORE_ID_OPTION="1" try_add_core
CACHE_ID_OPTION="1" CORE_DEVICE_OPTION="${CORE_DEVICE}-part2" CORE_ID_OPTION="2" try_add_core
CACHE_ID_OPTION="1" CORE_DEVICE_OPTION="${CORE_DEVICE}-part3" CORE_ID_OPTION="3" try_add_core
DEVICE_ID_OPTION="${CORE_DEVICE}-part1" DEMANDED_STATE_OPTION="Detached" check_device_state
DEVICE_ID_OPTION="${CORE_DEVICE}-part2" DEMANDED_STATE_OPTION="Detached" check_device_state
DEVICE_ID_OPTION="${CORE_DEVICE}-part3" DEMANDED_STATE_OPTION="Detached" check_device_state
DEVICE_ID_OPTION="${CORE_DEVICE}-part1" check_device_in_core_pool
DEVICE_ID_OPTION="${CORE_DEVICE}-part2" check_device_in_core_pool
DEVICE_ID_OPTION="${CORE_DEVICE}-part3" check_device_in_core_pool
CACHE_DEVICE_OPTION="${CACHE_DEVICE}-part1" CACHE_LOAD_METADATA_OPTION="y" start_cache
DEVICE_ID_OPTION="${CACHE_DEVICE}-part1" DEMANDED_STATE_OPTION="Running" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-1" DEMANDED_STATE_OPTION="Active" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-2" DEMANDED_STATE_OPTION="Active" check_device_state
DEVICE_ID_OPTION="${DEVICE_NAME}1-3" DEMANDED_STATE_OPTION="Active" check_device_state
CACHE_ID_OPTION="1" DEMANDED_STATE_OPTION="Running" check_cache_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="1" DEMANDED_STATE_OPTION="Active" check_core_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="2" DEMANDED_STATE_OPTION="Active" check_core_state
CACHE_ID_OPTION="1" CORE_ID_OPTION="3" DEMANDED_STATE_OPTION="Active" check_core_state
# Clean up after test
CACHE_ID_OPTION="1" stop_cache