From patchwork Thu Feb 21 06:28:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 1045808 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 444lCb0Hcyz9s4Y for ; Thu, 21 Feb 2019 17:38:03 +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="rY2wrSLK"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="mbJBLJZ3"; 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 444lCZ6BG0zDqSV for ; Thu, 21 Feb 2019 17:38:02 +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="rY2wrSLK"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="mbJBLJZ3"; 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 444l2l6PfpzDqNH for ; Thu, 21 Feb 2019 17:30:23 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id A5E3E222C1; Thu, 21 Feb 2019 01:30:21 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Thu, 21 Feb 2019 01:30:21 -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=TntujYwAr0jq9 ESLT6MlYqDvr2XfO9aqSQ2Guvzzruc=; b=rY2wrSLKk8C7r4FzhTwSP08+Bd0yO 5OjG2oClnOoVSByV164F8osDLXkozswc8Dk39qjk7tztQ5K6iMmcwE7ZzC3whsEl +NF6IbnuJLqxBUaoP8FaVCVOev9u/Nj/15d81qm6e19atzpaxE3+Zo2VT1DQd9NU SXKWf1VOhp5wQT+/0riNGGUiJTw/hWOzQhiajTAR8/i70HdpbPYn9HtegyQeoTG2 +JUB1QtEdMyUxItJVlzg9q2caiA5AqTtHQhwfwlyntVtToJOcwSJV5xjitrXTbXY 4tBx0ZDFXnx0/5I07pfmdEdLdFa1mNooCp17FWkvCgKKxRGKx+PVw8uCQ== 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=TntujYwAr0jq9ESLT6MlYqDvr2XfO9aqSQ2Guvzzruc=; b=mbJBLJZ3 8UUZa8hCr4UbMwyYAdAxJZ1nu1d08knt/SwivaosNa26AM+MWzb0OaZ8PomvfKFe ow7D9h/gQHEaDDkIopqIGyLAdIae9AU5laHajg7o26HJOE0mHD5uae2Zb7kC1ymI lAXuOANLFkmNfH0WiHZ4nXW5LluGWoPr+jOH7owJRUvzGhlUsb5cgGm/lh2O6s3o QfT7v8xlA35tXias2guskt6TRu7M6459MpGjmRkKEpOGDJLz4GiNHh0uzgfgas0/ 2xoq7EYagSRelA2HE+jKtlt8WdXDFLPBcbRl0F1gYvQkefqo5UddB1YAyBA1gezn RwG1MMBgPjYDrQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrtdejgdeljeculddtuddrgedtledrtddtmd cutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfhuthen uceurghilhhouhhtmecufedttdenucenucfjughrpefhvffufffkofgjfhgggfestdekre dtredttdenucfhrhhomheptehnughrvgifucflvghffhgvrhihuceorghnughrvgifsegr jhdrihgurdgruheqnecukfhppedvtddvrdekuddrudekrddvkeenucfrrghrrghmpehmrg hilhhfrhhomheprghnughrvgifsegrjhdrihgurdgruhenucevlhhushhtvghrufhiiigv pedvhe X-ME-Proxy: Received: from mistburn.bha-au.ibmmobiledemo.com (unknown [202.81.18.28]) by mail.messagingengine.com (Postfix) with ESMTPA id 9B124E4625; Thu, 21 Feb 2019 01:30:19 -0500 (EST) From: Andrew Jeffery To: skiboot@lists.ozlabs.org Date: Thu, 21 Feb 2019 16:58:30 +1030 Message-Id: <20190221062851.21958-32-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 31/52] test-ipmi-hiomap: Add get-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 | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/libflash/test/test-ipmi-hiomap.c b/libflash/test/test-ipmi-hiomap.c index e29242f73b69..4d050e804302 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 }, };