From patchwork Fri Apr 19 11:01:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Hsu Lin X-Patchwork-Id: 10909841 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4DEB214DB for ; Fri, 19 Apr 2019 22:45:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3F3F4289CE for ; Fri, 19 Apr 2019 22:45:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3396528CD3; Fri, 19 Apr 2019 22:45:52 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI 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 DB3A4289CE for ; Fri, 19 Apr 2019 22:45:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727406AbfDSWpv (ORCPT ); Fri, 19 Apr 2019 18:45:51 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:46987 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727174AbfDSWps (ORCPT ); Fri, 19 Apr 2019 18:45:48 -0400 Received: from mail-pg1-f200.google.com ([209.85.215.200]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hHRGv-0007gO-PF for linux-kselftest@vger.kernel.org; Fri, 19 Apr 2019 11:01:33 +0000 Received: by mail-pg1-f200.google.com with SMTP id r13so3254699pga.13 for ; Fri, 19 Apr 2019 04:01:33 -0700 (PDT) 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; bh=4zumaoHX4/zdp5RahruJBE+aNHMM3t7aIPQU+OcoHVU=; b=SdTMsJlaBjG+AC5HPqC9IvBBuhyf4iuxtKhg7OckCo26t5kVzEeDX7bgch1UGth21h ptYMlnOUcu9oHJQtc/7jAViXPkgR358rV+gFBSvQcX+V1ii+F2D0ADOuLeUMskZzSDA0 hW/zwgmiEi2WC/21xrG3uDJ2ys2o37hbHP39XVwgl3cKpqYMDXh6+djjrN5Qo2sk/ZrO h7/vtPR3EynKs05TImzqLqHx2NftaqboSzRqACeA8hp7Z7IWdv38hVKnhfC/dZXgQIuR mnfY5zyNH/bgR2zd7NiUnc0pZncW0I5bmtWMXccuHBT1TzAREJzMt3a2LPaNpEKdJR1W +9dA== X-Gm-Message-State: APjAAAUPuzRCEP1bxYCliOcI0SK5lrtzZf3GZlUuqZl9XA6plmsySWxc DKuScZyc6TX+Rt+l3R1Q43Ocg+NK4CeUdec6NgoXjtzG+LbD9joV0JdaBBn48yEHU5x58f3yt/U yWOplgVsb06s7oM29/r6Y6VdO/d4PPdMUWShZU9cUYg+9 X-Received: by 2002:a17:902:2e83:: with SMTP id r3mr3125969plb.153.1555671692389; Fri, 19 Apr 2019 04:01:32 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/umxfLgneWYgiIPHMQ/V3HSAR433aTxgXGkSxHXmeyy5mTvECAO/hjxqKWm4KV3QtQrUl1g== X-Received: by 2002:a17:902:2e83:: with SMTP id r3mr3125908plb.153.1555671691786; Fri, 19 Apr 2019 04:01:31 -0700 (PDT) Received: from Leggiero.taipei.internal (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id r87sm8044020pfa.71.2019.04.19.04.01.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 19 Apr 2019 04:01:30 -0700 (PDT) From: Po-Hsu Lin To: shuah@kernel.org, davem@davemloft.net Cc: linux-kselftest@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] selftests/net: correct the return value for run_afpackettests Date: Fri, 19 Apr 2019 19:01:13 +0800 Message-Id: <20190419110113.21883-1-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The run_afpackettests will be marked as passed regardless the return value of those sub-tests in the script: -------------------- running psock_tpacket test -------------------- [FAIL] selftests: run_afpackettests [PASS] Fix this by changing the return value for each tests. Signed-off-by: Po-Hsu Lin --- tools/testing/selftests/net/run_afpackettests | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/testing/selftests/net/run_afpackettests b/tools/testing/selftests/net/run_afpackettests index 2dc95fd..ea5938e 100755 --- a/tools/testing/selftests/net/run_afpackettests +++ b/tools/testing/selftests/net/run_afpackettests @@ -6,12 +6,14 @@ if [ $(id -u) != 0 ]; then exit 0 fi +ret=0 echo "--------------------" echo "running psock_fanout test" echo "--------------------" ./in_netns.sh ./psock_fanout if [ $? -ne 0 ]; then echo "[FAIL]" + ret=1 else echo "[PASS]" fi @@ -22,6 +24,7 @@ echo "--------------------" ./in_netns.sh ./psock_tpacket if [ $? -ne 0 ]; then echo "[FAIL]" + ret=1 else echo "[PASS]" fi @@ -32,6 +35,8 @@ echo "--------------------" ./in_netns.sh ./txring_overwrite if [ $? -ne 0 ]; then echo "[FAIL]" + ret=1 else echo "[PASS]" fi +exit $ret