aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2019-02-21 16:58:30 +1030
committerVasant Hegde <hegdevasant@linux.vnet.ibm.com>2019-03-05 09:57:24 +0530
commit59fef8a367d6ba664c4c33c2af2719dd1f98e316 (patch)
treed514d614c0c068315073b9d6170d5f9c6a0aed81
parent4591893d3dd24746c85353849f3f0859f7a5e516 (diff)
downloadskiboot-59fef8a367d6ba664c4c33c2af2719dd1f98e316.zip
skiboot-59fef8a367d6ba664c4c33c2af2719dd1f98e316.tar.gz
skiboot-59fef8a367d6ba664c4c33c2af2719dd1f98e316.tar.bz2
test-ipmi-hiomap: Add get-info-error test
[ Upstream commit bcdd3f134970472583593476f04d13c074cd96de ] 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.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c
index e29242f..4d050e8 100644
--- a/libflash/test/test-ipmi-hiomap.c
+++ b/libflash/test/test-ipmi-hiomap.c
@@ -1428,6 +1428,34 @@ static void test_hiomap_protocol_persistent_error(void)
scenario_exit();
}
+static const struct scenario_event
+scenario_hiomap_get_info_error[] = {
+ { .type = scenario_event_p, .p = &hiomap_ack_call, },
+ {
+ .type = scenario_cmd,
+ .c = {
+ .req = {
+ .cmd = HIOMAP_C_GET_INFO,
+ .seq = 2,
+ .args = {
+ [0] = HIOMAP_V2,
+ },
+ },
+ .cc = IPMI_INVALID_COMMAND_ERR,
+ },
+ },
+ SCENARIO_SENTINEL,
+};
+
+static void test_hiomap_get_info_error(void)
+{
+ struct blocklevel_device *bl;
+
+ scenario_enter(scenario_hiomap_get_info_error);
+ assert(ipmi_hiomap_init(&bl) > 0);
+ scenario_exit();
+}
+
struct test_case {
const char *name;
void (*fn)(void);
@@ -1459,6 +1487,7 @@ struct test_case test_cases[] = {
TEST_CASE(test_hiomap_protocol_action_error),
TEST_CASE(test_hiomap_protocol_persistent_error),
TEST_CASE(test_hiomap_protocol_get_flash_info),
+ TEST_CASE(test_hiomap_get_info_error),
{ NULL, NULL },
};