From patchwork Sun May 28 19:29:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luc Van Oostenryck X-Patchwork-Id: 9752641 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 832D0602F0 for ; Sun, 28 May 2017 19:29:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 72B9B20242 for ; Sun, 28 May 2017 19:29:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 67B4A223C7; Sun, 28 May 2017 19:29:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0E83620242 for ; Sun, 28 May 2017 19:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750861AbdE1T3T (ORCPT ); Sun, 28 May 2017 15:29:19 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:33418 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750851AbdE1T3S (ORCPT ); Sun, 28 May 2017 15:29:18 -0400 Received: by mail-wm0-f65.google.com with SMTP id b84so12969732wmh.0 for ; Sun, 28 May 2017 12:29:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=lWHyhXqTnPNLqqsw9sj0SErS5oNMNOY8fMzNS3W80NI=; b=txVYDXk+RtT5bLFOf3Gput0u/ImtNrIgIvBk7IEXSDp03DQoeYQv8bXI+rZQ6e7T6G X0GMWvpptM5kXvHIxzX9otZY75J+5vEIOxc9VoL3Ipo9misoi75GSyb1+NrF6fjDIAQC hEYhEVqm4Rq6PJ1DLH2KZvvkNa+WT1GPljm61yeEsfoMkJ/D/smMFcvadmYAfry0XsfU GJENr3qnJAZCqQFyU9R7IOFLB4cUpUht5oCwl7s6DiLLzoQfn1sv9wq5xAtC9DvTs5uB PlhLDK/6S4oCiFzVrmG2aZf3lVslSYeJPBTQ5bmAZAz81lj6YkAn2H8PJSVZ4KzoGIJK c8Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=lWHyhXqTnPNLqqsw9sj0SErS5oNMNOY8fMzNS3W80NI=; b=FndLsywBCntQi3iVEtA6FBfwt0T7M/RaCeZwG4AyC+YcCtyzPtGtPoqSFrP0HHNeIH GuxtFtQcHj4VKT/91wFOBF1ZTjog4UrzPVNiLrDp3AaHbEbXJa0xhyJw3NB8Rr3kk2Hu I7Zi2Wc0vkDe8mwfInpUcpYEcQv3PGvSHZmqjyOY0x/cQoi6mT3HudErRph9SbnYX0Uw ip1zcWza6hWBHbnJTVP83kuAMJ+on5cJveg4xrkiTZK0asM6oZDwNV+Y8X1HHavLHYu8 ruX1QgSk3YAzMacyXLa8Wuv/qHbETRGoMgSQ8G6BGotIgTcqb1TJ1KrDraAqDQznhg1G oaig== X-Gm-Message-State: AODbwcBnN+UUZDOAA46IhTarWaNULu/AMS2ozqOFN45tpR3WR+Mo8NhU aaEwoMivss20M1XuLpo= X-Received: by 10.80.158.99 with SMTP id z90mr10022489ede.50.1495999756958; Sun, 28 May 2017 12:29:16 -0700 (PDT) Received: from localhost.localdomain ([2a02:a03f:840:6400:ec7b:61ba:4d3e:5951]) by smtp.gmail.com with ESMTPSA id k17sm3840297eda.61.2017.05.28.12.29.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 28 May 2017 12:29:16 -0700 (PDT) From: Luc Van Oostenryck To: linux-sparse@vger.kernel.org Cc: Luc Van Oostenryck Subject: [PATCH 6/6] testsuite: avoid fork+execing basename Date: Sun, 28 May 2017 21:29:06 +0200 Message-Id: <20170528192906.1023-7-luc.vanoostenryck@gmail.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170528192906.1023-1-luc.vanoostenryck@gmail.com> References: <20170528192906.1023-1-luc.vanoostenryck@gmail.com> Sender: linux-sparse-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sparse@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Some testcase (the ones related to sparse-llvm) are disabled if the needed support is not present. This is done by checking the name of the command used by the testcase. The previous possible presence of './' before the command meant that the command was checked via the 'basename' command, which need to ne fork+execed. Since the './' have now been stripped from all command names this is no more needed. Change this by comparing directly the command name. This speedup the testsuite by another 6%. Signed-off-by: Luc Van Oostenryck --- validation/test-suite | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/validation/test-suite b/validation/test-suite index da9d88159..3056fce90 100755 --- a/validation/test-suite +++ b/validation/test-suite @@ -189,11 +189,10 @@ do_test() if [ "$check_command" = "" ]; then check_command="$defaut_command" fi - cmd=`eval echo $default_path/$check_command` # check for disabled commands - set -- $cmd - base_cmd=`basename $1` + set -- $check_command + base_cmd=$1 for i in $disabled_cmds; do if [ "$i" = "$base_cmd" ] ; then disabled_tests=$(($disabled_tests + 1)) @@ -202,6 +201,8 @@ do_test() fi done + cmd=`eval echo $default_path/$check_command` + echo " TEST $test_name ($file)" verbose "Using command : $cmd"