From patchwork Tue Mar 30 10:45:58 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 12172257 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=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 51614C433E1 for ; Tue, 30 Mar 2021 10:47:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0B722619AA for ; Tue, 30 Mar 2021 10:47:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231602AbhC3KrX (ORCPT ); Tue, 30 Mar 2021 06:47:23 -0400 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:24478 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbhC3Kqx (ORCPT ); Tue, 30 Mar 2021 06:46:53 -0400 Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 12UAg2NJ020739; Tue, 30 Mar 2021 05:46:19 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding : content-type; s=PODMain02222019; bh=pURXyEbufO34s3H/mKKyt6oXSIaLkoflKS02BSTQm1A=; b=N5DdH6fX1YEOFYtlgP8MQxAPw5qfyYX+remDp48Op3PtRmbbrScHndtiKYKB35wysaJG F5T+YaEtafOVcdzpqbQUDfwYbnH20s1cHmifAqSdNc+y4ZiO+kvcEgM29g0Z7K5xJFSW Dm2bzPzWL7KDTrNou1eHfvAEH1ZhOv81SSvjLn+93fYBZbRfRTqFysT2y/2xCETWXllI TiPakXtOpZ9RaPm7a0WOPkPI24hL+YmOqQUjUUY4oXuIxEG2aaOaNIL97pNSGBO5ShKB HTI+ap4/4whExtBuGuDm74Y1i0LqVvOzy0mJTcd10FeK7VgT/Oh3HkWvHgP7E9c2ivQ0 aQ== Received: from ediex01.ad.cirrus.com ([87.246.76.36]) by mx0b-001ae601.pphosted.com with ESMTP id 37kfhx1edf-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Tue, 30 Mar 2021 05:46:19 -0500 Received: from EDIEX01.ad.cirrus.com (198.61.84.80) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Tue, 30 Mar 2021 11:46:17 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by EDIEX01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.1.2176.2 via Frontend Transport; Tue, 30 Mar 2021 11:46:17 +0100 Received: from AUSNPC0LSNW1-debian.cirrus.com (AUSNPC0LSNW1.ad.cirrus.com [198.61.65.138]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 0258C11D6; Tue, 30 Mar 2021 10:46:16 +0000 (UTC) From: Richard Fitzgerald To: , , , , , CC: , , , Richard Fitzgerald Subject: [PATCH v8 4/4] selftests: lib: Add wrapper script for test_scanf Date: Tue, 30 Mar 2021 11:45:58 +0100 Message-ID: <20210330104558.16481-4-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20210330104558.16481-1-rf@opensource.cirrus.com> References: <20210330104558.16481-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: shuAdcURx0wruSmnMpx5VIkXLiZClyl6 X-Proofpoint-ORIG-GUID: shuAdcURx0wruSmnMpx5VIkXLiZClyl6 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 phishscore=0 spamscore=0 clxscore=1015 malwarescore=0 impostorscore=0 mlxscore=0 bulkscore=0 mlxlogscore=999 suspectscore=0 priorityscore=1501 adultscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2103250000 definitions=main-2103300076 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Adds a wrapper shell script for the test_scanf module. Signed-off-by: Richard Fitzgerald Reviewed-by: Petr Mladek Acked-by: Andy Shevchenko --- Changed since v6: Fixed typo in tools/testing/selftests/lib/config: -CONFIG_TEST_SCANTF=m +CONFIG_TEST_SCANF=m As this is a trivial change I have kept Petr Mladek's Reviewed-by and Andy Shevchenko's ack. --- tools/testing/selftests/lib/Makefile | 2 +- tools/testing/selftests/lib/config | 1 + tools/testing/selftests/lib/scanf.sh | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) create mode 100755 tools/testing/selftests/lib/scanf.sh diff --git a/tools/testing/selftests/lib/Makefile b/tools/testing/selftests/lib/Makefile index a105f094676e..ee71fc99d5b5 100644 --- a/tools/testing/selftests/lib/Makefile +++ b/tools/testing/selftests/lib/Makefile @@ -4,6 +4,6 @@ # No binaries, but make sure arg-less "make" doesn't trigger "run_tests" all: -TEST_PROGS := printf.sh bitmap.sh prime_numbers.sh strscpy.sh +TEST_PROGS := printf.sh bitmap.sh prime_numbers.sh scanf.sh strscpy.sh include ../lib.mk diff --git a/tools/testing/selftests/lib/config b/tools/testing/selftests/lib/config index b80ee3f6e265..645839b50b0a 100644 --- a/tools/testing/selftests/lib/config +++ b/tools/testing/selftests/lib/config @@ -1,4 +1,5 @@ CONFIG_TEST_PRINTF=m +CONFIG_TEST_SCANF=m CONFIG_TEST_BITMAP=m CONFIG_PRIME_NUMBERS=m CONFIG_TEST_STRSCPY=m diff --git a/tools/testing/selftests/lib/scanf.sh b/tools/testing/selftests/lib/scanf.sh new file mode 100755 index 000000000000..b59b8ba561c3 --- /dev/null +++ b/tools/testing/selftests/lib/scanf.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 +# Tests the scanf infrastructure using test_scanf kernel module. +$(dirname $0)/../kselftest/module.sh "scanf" test_scanf