Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E50CC38142 for ; Wed, 1 Feb 2023 00:18:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231665AbjBAASU (ORCPT ); Tue, 31 Jan 2023 19:18:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56684 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231634AbjBAASS (ORCPT ); Tue, 31 Jan 2023 19:18:18 -0500 Received: from smtp-relay-internal-0.canonical.com (smtp-relay-internal-0.canonical.com [185.125.188.122]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D392717177 for ; Tue, 31 Jan 2023 16:18:11 -0800 (PST) Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id B474F421FC for ; Wed, 1 Feb 2023 00:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1675210690; bh=Bj5TXzK2teQXYpcCK8bVKEjwIEUwVyWarV+TEw7ui6E=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=s0nsEicXQKoEzN2wpn4yE7n43fxl8Nm0WVJlJ01aamzWG4ttg3+UgpksmaGzmOKks WlkMJAyWx+ZWEn8fkMjl0rDA4GhoLVDsCLBjFJrdDRK4QI2KwbLW15vCLi7o60kfgd P0cCZ/CnsJecBLLnSxY43JlNCNhbDfRSpzGbVM7sWVcsw0/DaznmuCkfI0L7w1tdyc PUNvpnV42kvTPRfTpyyqklunO9jAaE3PHy1edgU1fSvefcgWhOcewJeZHozRHwB4Fq +QzHAYeYqJmJsmfTUZes5rWzAUzQVIbUoVhxEnb/YlILMxVnRrECE+4gTwSEmerHBt pDKXEmy1Ppe/w== Received: by mail-wm1-f69.google.com with SMTP id h9-20020a1ccc09000000b003db1c488826so171544wmb.3 for ; Tue, 31 Jan 2023 16:18:10 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Bj5TXzK2teQXYpcCK8bVKEjwIEUwVyWarV+TEw7ui6E=; b=Qe9yezFCTnzBihy2QZYG6nlaKb3L5z3UWCi0Wq6gp/DqTGByKzblz2xN1YH+n1Per7 0uxtnnm6wBFpPiQDry7Jzcu1wzCGtFnIo5QFGPoavmTMUh97Qp18TRvor4LL1H+u7rHf 3V2+aOXvTEcMAZGIALhfswGZwY84evpGVuMQw/1pb77kbIZB2Dvwl5dGRh9KBNK1zOCN 24QQ4Dvn4Mh96Z8ILTsb9AXnljaxXJF7o+8KwpqIKVWPEEt3q9RsFwLCsQYcu3uIN7ln laMaOIptTG31JNY3Gq6Q6BslH6U2ae1mIvnq8i0kN5QNRNGCuDQJx6qmqbDgnYDVUQCn VUyw== X-Gm-Message-State: AO0yUKUvt/RI3XQFKhlpQxPfEE3Agdht993bOy2Yuf9DC8phQ8Bmt8PI 1ozb0JJ66m8U6XAsOG8y0/lt04mJzZuRnG9scRRaD/OmN3H7Z75dHkjd48wp4eKpk4VMcTN8206 HDjULjdBGBgGJQrrrnp9L5Ki8dKJG9kQmklUbfvwLYg== X-Received: by 2002:a05:600c:35c6:b0:3db:1424:e781 with SMTP id r6-20020a05600c35c600b003db1424e781mr105679wmq.23.1675210690419; Tue, 31 Jan 2023 16:18:10 -0800 (PST) X-Google-Smtp-Source: AK7set+XQk4pdzQFDGvVOmPL9SqfY9L49x/YHtPC7w+utWIpSyef+OB7ZAfsRO24423SWNboFGSvqA== X-Received: by 2002:a05:600c:35c6:b0:3db:1424:e781 with SMTP id r6-20020a05600c35c600b003db1424e781mr105663wmq.23.1675210690226; Tue, 31 Jan 2023 16:18:10 -0800 (PST) Received: from qwirkle.internal ([81.2.157.149]) by smtp.gmail.com with ESMTPSA id n6-20020a7bcbc6000000b003d237d60318sm108925wmi.2.2023.01.31.16.18.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Jan 2023 16:18:09 -0800 (PST) From: Andrei Gherzan To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Willem de Bruijn Cc: Andrei Gherzan , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net v4 2/4] selftests: net: udpgso_bench_rx/tx: Stop when wrong CLI args are provided Date: Wed, 1 Feb 2023 00:16:12 +0000 Message-Id: <20230201001612.515730-2-andrei.gherzan@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230201001612.515730-1-andrei.gherzan@canonical.com> References: <20230201001612.515730-1-andrei.gherzan@canonical.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Leaving unrecognized arguments buried in the output, can easily hide a CLI/script typo. Avoid this by exiting when wrong arguments are provided to the udpgso_bench test programs. Fixes: 3a687bef148d ("selftests: udp gso benchmark") Signed-off-by: Andrei Gherzan Cc: Willem de Bruijn --- tools/testing/selftests/net/udpgso_bench_rx.c | 2 ++ tools/testing/selftests/net/udpgso_bench_tx.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/testing/selftests/net/udpgso_bench_rx.c b/tools/testing/selftests/net/udpgso_bench_rx.c index d0895bd1933f..4058c7451e70 100644 --- a/tools/testing/selftests/net/udpgso_bench_rx.c +++ b/tools/testing/selftests/net/udpgso_bench_rx.c @@ -336,6 +336,8 @@ static void parse_opts(int argc, char **argv) cfg_verify = true; cfg_read_all = true; break; + default: + exit(1); } } diff --git a/tools/testing/selftests/net/udpgso_bench_tx.c b/tools/testing/selftests/net/udpgso_bench_tx.c index f1fdaa270291..b47b5c32039f 100644 --- a/tools/testing/selftests/net/udpgso_bench_tx.c +++ b/tools/testing/selftests/net/udpgso_bench_tx.c @@ -490,6 +490,8 @@ static void parse_opts(int argc, char **argv) case 'z': cfg_zerocopy = true; break; + default: + exit(1); } } -- 2.34.1