From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1A930C0044C for ; Wed, 31 Oct 2018 15:46:31 +0000 (UTC) Received: from lists.ozlabs.org (lists.ozlabs.org [203.11.71.2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7A4742080A for ; Wed, 31 Oct 2018 15:46:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7A4742080A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.ibm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 42lXkX3LkJzF3M8 for ; Thu, 1 Nov 2018 02:46:28 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: lists.ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=linux.ibm.com (client-ip=148.163.158.5; helo=mx0a-001b2d01.pphosted.com; envelope-from=bauerman@linux.ibm.com; receiver=) Authentication-Results: lists.ozlabs.org; dmarc=none (p=none dis=none) header.from=linux.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 42lXh91KgTzDqBx for ; Thu, 1 Nov 2018 02:44:24 +1100 (AEDT) Received: from pps.filterd (m0098414.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w9VFi8wx050594 for ; Wed, 31 Oct 2018 11:44:22 -0400 Received: from e34.co.us.ibm.com (e34.co.us.ibm.com [32.97.110.152]) by mx0b-001b2d01.pphosted.com with ESMTP id 2nfcc6h3hn-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 31 Oct 2018 11:44:14 -0400 Received: from localhost by e34.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 31 Oct 2018 15:44:13 -0000 Received: from b03cxnp08025.gho.boulder.ibm.com (9.17.130.17) by e34.co.us.ibm.com (192.168.1.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 31 Oct 2018 15:44:10 -0000 Received: from b03ledav006.gho.boulder.ibm.com (b03ledav006.gho.boulder.ibm.com [9.17.130.237]) by b03cxnp08025.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w9VFiA3w15335624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 31 Oct 2018 15:44:10 GMT Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id F1856C605F; Wed, 31 Oct 2018 15:44:09 +0000 (GMT) Received: from b03ledav006.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0CDB1C6055; Wed, 31 Oct 2018 15:44:08 +0000 (GMT) Received: from morokweng.localdomain (unknown [9.80.223.149]) by b03ledav006.gho.boulder.ibm.com (Postfix) with ESMTPS; Wed, 31 Oct 2018 15:44:08 +0000 (GMT) References: <1540996702-27161-1-git-send-email-leitao@debian.org> <1540996702-27161-2-git-send-email-leitao@debian.org> User-agent: mu4e 1.0; emacs 25.3.1 From: Thiago Jung Bauermann To: Breno Leitao Subject: Re: [PATCH v2 2/3] selftests/powerpc: Create a new SKIP_IF macro In-reply-to: <1540996702-27161-2-git-send-email-leitao@debian.org> Date: Wed, 31 Oct 2018 12:44:04 -0300 MIME-Version: 1.0 Content-Type: text/plain X-TM-AS-GCONF: 00 x-cbid: 18103115-0016-0000-0000-0000094C76C1 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009960; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000268; SDB=6.01110673; UDB=6.00575520; IPR=6.00890766; MB=3.00023981; MTD=3.00000008; XFM=3.00000015; UTC=2018-10-31 15:44:12 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18103115-0017-0000-0000-000040E77888 Message-Id: <871s86qfy3.fsf@morokweng.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:, , definitions=2018-10-31_06:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=960 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1810310131 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linuxppc-dev@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" Breno Leitao writes: > This patch creates a new macro that skips a test and prints a message to > stderr. This is useful to give an idea why the tests is being skipped, > other than just skipping the test blindly. > > Signed-off-by: Breno Leitao Reviewed-by: Thiago Jung Bauermann > --- > tools/testing/selftests/powerpc/include/utils.h | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/tools/testing/selftests/powerpc/include/utils.h b/tools/testing/selftests/powerpc/include/utils.h > index da1b963cdb32..486c1782c23e 100644 > --- a/tools/testing/selftests/powerpc/include/utils.h > +++ b/tools/testing/selftests/powerpc/include/utils.h > @@ -72,6 +72,16 @@ do { \ > } \ > } while (0) > > +#define SKIP_IF_MSG(x, msg) \ > +do { \ > + if ((x)) { \ > + fprintf(stderr, \ > + "[SKIP] Test skipped on line %d: %s\n", \ > + __LINE__, msg); \ > + return MAGIC_SKIP_RETURN_VALUE; \ > + } \ > +} while (0) > + > #define _str(s) #s > #define str(s) _str(s) -- Thiago Jung Bauermann IBM Linux Technology Center