From patchwork Fri Feb 15 06:56:47 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Jeffery X-Patchwork-Id: 1042638 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 44146y1jSXz9s7T for ; Fri, 15 Feb 2019 18:06:18 +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="BjAJCYbP"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="ECFYgQCu"; 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 44146y0VDnzDqBm for ; Fri, 15 Feb 2019 18:06:18 +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="BjAJCYbP"; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.b="ECFYgQCu"; 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 4413yH4QCxzDqVp for ; Fri, 15 Feb 2019 17:58:47 +1100 (AEDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id 3CD4F21F24; Fri, 15 Feb 2019 01:58:45 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Fri, 15 Feb 2019 01:58:45 -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=erJgiV+24q2us lNH6G584P2rYrsIUg2YhYnwNaBz4ac=; b=BjAJCYbPscbuHm3GJP4EwrDKyelTD 4Y/V3SzCfuXG9sSR3trgRyo/q4R9ZWr4iVICIuzjBAnjtK50hX3ZyekOE2mnarLi iGY/ManLqVnri9+AlPwdFs1WJDudjAc/F/ohYM9xsEJAE8rvpJYZQd87xSQwtkI/ KngG2LrJrSSQ+bwKlGJLB4uhzT0hCIp0B77oO3nAQmxz9vF+h+U/VW3RIZ60QZOP ffKWfh6W97Y9VdZV9g+UWvd2WR44YFacQOzy0n96HxyCqDhUqv2M9L72EBjPMdgn MLxkNOnADwh6LFvzC47c620yavq03hXy4IqpO5hKpGYZEBuqdmweeAfLA== 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=erJgiV+24q2uslNH6G584P2rYrsIUg2YhYnwNaBz4ac=; b=ECFYgQCu hyVukm/dfIpRDteuGDUua//bdYrfqwmH3MMr2liqzfa0+mY7nv/2sCKbFYNiFw5J y69bdoQFhaHwDSpRTdq45BEOz2KJ/lNflqfWBxcp/Gx+BtwBIhFFffBW6YfDHa0V 42n4DKDtsFufzMDgFTaBDCOByvz233vtrjfWUBlpO4HKcg+myvAmSbnIejVl9UZ5 1exl3wxrUCuxHIxe39TGbVngUu3hh4dLivZLRX6NHxYvT/E+wzxgMiuXhijhIer9 r5cIkNRYPSccAkFHmEBVvSkbVaeFd7U7tdxGZfmiv5BKXZ9uE1Zwj2H6QP8ktJTO 4Ze0+OsXj2FYQA== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedtledruddtiedgleekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfquhhtnecuuegrihhlohhuthemucef tddtnecunecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpe etnhgurhgvficulfgvfhhfvghrhicuoegrnhgurhgvfiesrghjrdhiugdrrghuqeenucfk phepudegrddvrdekledrjeehnecurfgrrhgrmhepmhgrihhlfhhrohhmpegrnhgurhgvfi esrghjrdhiugdrrghunecuvehluhhsthgvrhfuihiivgepvdeh X-ME-Proxy: Received: from localhost.localdomain (unknown [14.2.89.75]) by mail.messagingengine.com (Postfix) with ESMTPA id E9319E4596; Fri, 15 Feb 2019 01:58:42 -0500 (EST) From: Andrew Jeffery To: skiboot@lists.ozlabs.org Date: Fri, 15 Feb 2019 17:26:47 +1030 Message-Id: <20190215065708.6086-31-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 30/51] 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" 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 }, };