Message ID | 20190215065708.6086-17-andrew@aj.id.au |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> 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 44143D5wW4z9s4Z for <incoming@patchwork.ozlabs.org>; Fri, 15 Feb 2019 18:03:04 +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="VY2ii2Ke"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Jvlk/E6c"; 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 44143D4t4CzDqVB for <incoming@patchwork.ozlabs.org>; Fri, 15 Feb 2019 18:03:04 +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=<UNKNOWN>) 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="VY2ii2Ke"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="Jvlk/E6c"; 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 4413xc4LRCzDqV9 for <skiboot@lists.ozlabs.org>; Fri, 15 Feb 2019 17:58:12 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id AA2F521F24; Fri, 15 Feb 2019 01:58:09 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 15 Feb 2019 01:58:09 -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=UljJDlkcg6Rbe 9oMO4+ow4Vn1PT3LTDQ5bMKsFJCsHk=; b=VY2ii2KeyMKCdSBMSPELr94higBkh H9jQN7jB0EmdYOUOGAHVidsk0UtkEsZ5mpY1L5j1pgsS2vn8q40R+PvknLBodXxS G3ar7CPPdKvOYfGMpCTSfx9Li9j2DniWAvy9dy2ea+U5tnqGHmK6jtWxq9GlYpPZ XBk8OIju24MmKx9al3Qejexx+UQ2gUNFQ1Sr4/jsaQIeqObWoro+BxpnbGjfiojC qcGD09XuahvIfvpHOKp3SbIqvMKlM0RWR3nIXhny6VNU22JtoghGofoCymZskgp3 oSpHI91W+nHTYSP6oKHuvWV2RnO8Eg+bPC9gD43O0qc8eeHEsVyg2W44A== 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=UljJDlkcg6Rbe9oMO4+ow4Vn1PT3LTDQ5bMKsFJCsHk=; b=Jvlk/E6c RyjhiKQxWWmEoL4TkWIIHqphqwygJv6JTTVqxJFuuBPLdwt8+hL8c5yVxBzmEXlo oTk6mGrPOD0FXu7/Fx3xPeBZuDKVSV0wOObmvYLz3V5LhhHzsj8+mMdYLD3p2PTx 2SsuelLk/KiYWhJP/Ax6+9wQLqZP6jJy+nKIF9DNV6dwQcfNyJTMuMYs2RSM8KYQ 0jyQyJ2CrFWrh3nxWjaOITeLgMv+EQh8TMPYDqt302c5W1LuRELQHF46GkQ36gaM g96Mnyo1fZh7sK8EwbYkFtyCl6Ubx+IHRqZ/mnsAMlKvZm3b/k708HTLAAV0Awj+ LF7b61Wz1a2JPQ== X-ME-Sender: <xms:AWNmXKko6cxBgHRTlHenQeLZ7CgJeKZjiSIUe0TjzHghC4f9PPdV1A> X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddtiedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpe etnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucfk phepudegrddvrdekledrjeehnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfi esrghjrdhiugdrrghunecuvehluhhsthgvrhfuihiivgepuddu X-ME-Proxy: <xmx:AWNmXFB2d8Fek4PVh2nxYutTJhGTpFVG3vDxNBVd9B831wbT48NVaA> <xmx:AWNmXExcQ6GdfBt9utK4mqDPymFqF2nFRCna0JpZY2tWF2xyE7LM9Q> <xmx:AWNmXJCYcq9i7s_rlaQr3zOuzrSDspad-NVTmzHKqirZqV2_ED0UJw> <xmx:AWNmXHHe4pSTiMm5baLi1xhElmvnqdKSXho8Q1FKY9MOfoYC5FKx2Q> Received: from localhost.localdomain (unknown [14.2.89.75]) by mail.messagingengine.com (Postfix) with ESMTPA id CAC04E45E2; Fri, 15 Feb 2019 01:58:07 -0500 (EST) From: Andrew Jeffery <andrew@aj.id.au> To: skiboot@lists.ozlabs.org Date: Fri, 15 Feb 2019 17:26:33 +1030 Message-Id: <20190215065708.6086-17-andrew@aj.id.au> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190215065708.6086-1-andrew@aj.id.au> References: <20190215065708.6086-1-andrew@aj.id.au> MIME-Version: 1.0 Subject: [Skiboot] [PATCH 16/51] test-ipmi-hiomap: Add event-before-read X-BeenThere: skiboot@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Mailing list for skiboot development <skiboot.lists.ozlabs.org> List-Unsubscribe: <https://lists.ozlabs.org/options/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=unsubscribe> List-Archive: <http://lists.ozlabs.org/pipermail/skiboot/> List-Post: <mailto:skiboot@lists.ozlabs.org> List-Help: <mailto:skiboot-request@lists.ozlabs.org?subject=help> List-Subscribe: <https://lists.ozlabs.org/listinfo/skiboot>, <mailto:skiboot-request@lists.ozlabs.org?subject=subscribe> Cc: Andrew Jeffery <andrew@aj.id.au> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" <skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org> |
Series |
ipmi-hiomap: Tests and fixes for event handling
|
expand
|
diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c index 4df3641a0df6..5eb5aeaeff58 100644 --- a/libflash/test/test-ipmi-hiomap.c +++ b/libflash/test/test-ipmi-hiomap.c @@ -796,6 +796,35 @@ static void test_hiomap_protocol_read_two_blocks(void) scenario_exit(); } +static const struct scenario_event +scenario_hiomap_protocol_event_before_action[] = { + { .type = scenario_event_p, .p = &hiomap_ack_call, }, + { .type = scenario_event_p, .p = &hiomap_get_info_call, }, + { .type = scenario_event_p, .p = &hiomap_get_flash_info_call, }, + { + .type = scenario_sel, + .s = { + .bmc_state = HIOMAP_E_DAEMON_READY | + HIOMAP_E_FLASH_LOST, + } + }, + SCENARIO_SENTINEL, +}; + +static void test_hiomap_protocol_event_before_read(void) +{ + struct blocklevel_device *bl; + char buf; + int rc; + + scenario_enter(scenario_hiomap_protocol_event_before_action); + assert(!ipmi_hiomap_init(&bl)); + rc = bl->read(bl, 0, &buf, sizeof(buf)); + assert(rc == FLASH_ERR_AGAIN); + ipmi_hiomap_exit(bl); + scenario_exit(); +} + static const struct scenario_event scenario_hiomap_protocol_persistent_error[] = { { .type = scenario_event_p, .p = &hiomap_ack_call, }, @@ -841,6 +870,7 @@ struct test_case test_cases[] = { TEST_CASE(test_hiomap_protocol_reset_recovery), TEST_CASE(test_hiomap_protocol_read_one_block), TEST_CASE(test_hiomap_protocol_read_two_blocks), + TEST_CASE(test_hiomap_protocol_event_before_read), TEST_CASE(test_hiomap_protocol_persistent_error), { NULL, NULL }, };
Signed-off-by: Andrew Jeffery <andrew@aj.id.au> --- libflash/test/test-ipmi-hiomap.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+)