diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2019-02-21 16:58:31 +1030 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2019-03-04 21:17:21 +0530 |
commit | 21bed4d078d967d508be27e1b5cde297db906238 (patch) | |
tree | 1ff77e24c0f6d11e7a6375c6147d549975322328 | |
parent | 852d3885065493b0a6016d0379b816cfa32134f1 (diff) | |
download | skiboot-21bed4d078d967d508be27e1b5cde297db906238.zip skiboot-21bed4d078d967d508be27e1b5cde297db906238.tar.gz skiboot-21bed4d078d967d508be27e1b5cde297db906238.tar.bz2 |
test-ipmi-hiomap: Add get-flash-info-error test
[ Upstream commit 0bef2695055d58e8c7ad86559f741e541248d36d ]
Cc: stable
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r-- | libflash/test/test-ipmi-hiomap.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c index 4d050e8..0820a31 100644 --- a/libflash/test/test-ipmi-hiomap.c +++ b/libflash/test/test-ipmi-hiomap.c @@ -1456,6 +1456,35 @@ static void test_hiomap_get_info_error(void) scenario_exit(); } +static const struct scenario_event +scenario_hiomap_get_flash_info_error[] = { + { .type = scenario_event_p, .p = &hiomap_ack_call, }, + { .type = scenario_event_p, .p = &hiomap_get_info_call, }, + { + .type = scenario_cmd, + .c = { + .req = { + .cmd = HIOMAP_C_GET_FLASH_INFO, + .seq = 3, + .args = { + [0] = HIOMAP_V2, + }, + }, + .cc = IPMI_INVALID_COMMAND_ERR, + }, + }, + SCENARIO_SENTINEL, +}; + +static void test_hiomap_get_flash_info_error(void) +{ + struct blocklevel_device *bl; + + scenario_enter(scenario_hiomap_get_flash_info_error); + assert(ipmi_hiomap_init(&bl) > 0); + scenario_exit(); +} + struct test_case { const char *name; void (*fn)(void); @@ -1488,6 +1517,7 @@ struct test_case test_cases[] = { TEST_CASE(test_hiomap_protocol_persistent_error), TEST_CASE(test_hiomap_protocol_get_flash_info), TEST_CASE(test_hiomap_get_info_error), + TEST_CASE(test_hiomap_get_flash_info_error), { NULL, NULL }, }; |