From patchwork Mon Oct 21 12:44:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vasant Hegde X-Patchwork-Id: 1180568 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 46xbvd2VMyz9sR3 for ; Mon, 21 Oct 2019 23:45:17 +1100 (AEDT) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from bilbo.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 46xbvb37CHzDqcX for ; Mon, 21 Oct 2019 23:45:15 +1100 (AEDT) X-Original-To: skiboot@lists.ozlabs.org Delivered-To: skiboot@lists.ozlabs.org Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=linux.vnet.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=hegdevasant@linux.vnet.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.vnet.ibm.com Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (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 46xbtx2VbmzDqcS for ; Mon, 21 Oct 2019 23:44:40 +1100 (AEDT) Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x9LCbKx2112041 for ; Mon, 21 Oct 2019 08:44:36 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0a-001b2d01.pphosted.com with ESMTP id 2vsbgjknbc-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 21 Oct 2019 08:44:35 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 21 Oct 2019 13:44:32 +0100 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 21 Oct 2019 13:44:29 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x9LCiS2D38076476 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 21 Oct 2019 12:44:28 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A2507A405B; Mon, 21 Oct 2019 12:44:28 +0000 (GMT) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5227EA4040; Mon, 21 Oct 2019 12:44:27 +0000 (GMT) Received: from hegdevasant.in.ibm.com (unknown [9.199.45.115]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 21 Oct 2019 12:44:26 +0000 (GMT) From: Vasant Hegde To: skiboot@lists.ozlabs.org Date: Mon, 21 Oct 2019 18:14:16 +0530 X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 19102112-0016-0000-0000-000002BAED74 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19102112-0017-0000-0000-0000331C22FF Message-Id: <20191021124416.8404-1-hegdevasant@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2019-10-21_04:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=800 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1908290000 definitions=main-1910210123 Subject: [Skiboot] [PATCH] gard: Add support to run gard tests on FSP platform 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: , Errors-To: skiboot-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Skiboot" gard tool is not supported on FSP based system. But we can still run gard tests on FSP based system. Signed-off-by: Vasant Hegde Acked-by: Stewart Smith --- external/gard/gard.c | 12 ++++++------ external/gard/test/tests/02-usage | 5 +++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/external/gard/gard.c b/external/gard/gard.c index 6f75932bc..5e58fede9 100644 --- a/external/gard/gard.c +++ b/external/gard/gard.c @@ -821,12 +821,6 @@ int main(int argc, char **argv) memset(ctx, 0, sizeof(*ctx)); memset(&blank_record, 0xff, sizeof(blank_record)); - if (is_fsp()) { - fprintf(stderr, "This is the OpenPower gard tool which does " - "not support FSP systems\n"); - return EXIT_FAILURE; - } - /* process global options */ for (;;) { int c; @@ -866,6 +860,12 @@ int main(int argc, char **argv) } + if (is_fsp() && !filename) { + fprintf(stderr, "This is the OpenPower gard tool which does " + "not support FSP systems\n"); + return EXIT_FAILURE; + } + /* * It doesn't make sense to specify that we have the gard partition but diff --git a/external/gard/test/tests/02-usage b/external/gard/test/tests/02-usage index 290cca130..7ef3c04e6 100644 --- a/external/gard/test/tests/02-usage +++ b/external/gard/test/tests/02-usage @@ -1,5 +1,10 @@ #! /bin/sh +# This test fails on FSP based system. Hence skip this test. +if [ -d "/proc/device-tree/fsps" ] ; then + return 0 +fi + run_binary "./opal-gard" if [ "$?" -ne 1 ] ; then fail_test