From patchwork Thu Feb 21 06:28:31 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 1045809 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 444lCs4LfPz9s8m for ; Thu, 21 Feb 2019 17:38:17 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="E0OgFHXl"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="r571ajzV"; dkim-atps=neutral Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 444lCs3G7rzDqT4 for ; Thu, 21 Feb 2019 17:38:17 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=aj.id.au (client-ip=66.111.4.26; helo=out2-smtp.messagingengine.com; envelope-from=andrew@aj.id.au; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=aj.id.au Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=aj.id.au header.i=@aj.id.au header.b="E0OgFHXl"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="r571ajzV"; dkim-atps=neutral Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 444l2q2ZWtzDqNb for ; Thu, 21 Feb 2019 17:30:25 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id B20A821F79; Thu, 21 Feb 2019 01:30:23 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 21 Feb 2019 01:30:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=from :to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm2; bh=hMsewc1XVbgFw jLgurI5ALiFEYqQ9uex+0zJ7qaTRfI=; b=E0OgFHXldScugCps1IKUDrYis3RBE B120uv4E9n/tSx+RPeHPmXo4lEnWZYSyOOoJY2ikS1jlV7eRf1GTUdnALYyo6PIH OAu1NZRUizmuL88+VEYb54HF38k04LO1jPYUr/pETklhXijZe2xkNQvIjScDvhGI CuLAE3Z1DTkPSOP/RORE3QSy9FbbhitMO1f87MQGFDI8qszHEYA0MNHlAtv3oE3d XdrAWb/IBlqnpOlBW8ErColNMjqPdRl8MyEnpAfTHTOIoY9RNvrRDpJ7HQvHSORi 6JSnuwuDKD6z4p3lW+3hfaQswNrHiQo66GPrjy+2iiwB/JqPn92Mg0QNg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; bh=hMsewc1XVbgFwjLgurI5ALiFEYqQ9uex+0zJ7qaTRfI=; b=r571ajzV 8HaawMJlhEx917yhPW9yWLr2PZB9yZPR+JRKhF/+o110xXitbsTKcq5FqpyV7xZ1 fCPWvGx3coCH03Gtl2ibOHXcAqgaO/tTfQokYNsWGhsOQ3rz8HUlNm1c4DJnSdXG M4PPx/EEAh84VsO/kZo6QFVo6G+q3H6PU5cB1BnkYDY2OiC0p+1QLLySqr62PNmx oyNqemp/9hdrsPm7mSgw3WqrC+27AovV/hnF6IJ9KA6yLAqWChaZo6HHXDVc33Vp nqutbbKAQvMr0hH8o5+RUiOxU0H0FhgQjsBKLZGpmMGQc8LR75xuFvr/jjuWH4Fd n9lnAf5rTxbqCQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrtdejgdeljeculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehnughrvgifucflvghffhgvrhihuceorghnughrvgifsegr jhdrihgurdgruheqnecukfhppedvtddvrdekuddrudekrddvkeenucfrrghrrghmpehmrg hilhhfrhhomheprghnughrvgifsegrjhdrihgurdgruhenucevlhhushhtvghrufhiiigv pedvke X-ME-Proxy: Received: from mistburn.bha-au.ibmmobiledemo.com (unknown [202.81.18.28]) by mail.messagingengine.com (Postfix) with ESMTPA id B8100E419A; Thu, 21 Feb 2019 01:30:21 -0500 (EST) From: Andrew Jeffery To: skiboot@lists.ozlabs.org Date: Thu, 21 Feb 2019 16:58:31 +1030 Message-Id: <20190221062851.21958-33-andrew@aj.id.au> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190221062851.21958-1-andrew@aj.id.au> References: <20190221062851.21958-1-andrew@aj.id.au> MIME-Version: 1.0 Subject: [Skiboot] [PATCH v2 32/52] test-ipmi-hiomap: Add get-flash-info-error test X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrew Jeffery Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" Cc: stable Signed-off-by: Andrew Jeffery --- libflash/test/test-ipmi-hiomap.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c index 4d050e804302..0820a3100013 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 }, };