Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp864670imw; Thu, 14 Jul 2022 12:18:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tPaJaHAFcoK3NtjMZpBS7WCLw9cX5N5Kv2IhlIwW16HkLQWghvSiYPWP5IzUNbWtRolggR X-Received: by 2002:a17:907:97c2:b0:72b:9ec4:9a60 with SMTP id js2-20020a17090797c200b0072b9ec49a60mr9296502ejc.154.1657826288602; Thu, 14 Jul 2022 12:18:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657826288; cv=none; d=google.com; s=arc-20160816; b=smdJ3ZXgU2B0B6NrVsufH180FIVFAAV6weqpBOsQUIiG7+T7izsCuEqQCiwWBnw2Bm YEeHkyproFB/sbSsCep3JeZ2LhI27cRs85VFtATWP3zgH1WQ8RXLd9T2FSTbs9nTC7NW vKMkr5P78tpk1SMY9iY+LhMfz3PpRHEVcOek45MT40wEHqWefZ/EG9G6/hHUn8Utxb4F 0mP1/yzVvc41vTZfV00ZAs62cRqSQE7fKVs9AhnvCta+eMF5yM/yXWhqz6xlQUQTQs9Q FoMJL/zx+bFaCGarha25c8vmG5r07qhuNyWUHLns4UDw4j/YC0LUeiJnIc00GkjlM7Ai HGlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=VJP+abV5C7ZCtNSZzzqUlY9pvzhk4qF+0yndQsDVFm0=; b=ryMmVQXFPUB4O9Mxk4c51TWXsNSrUiUzN4+UgUykZv/lv4lk6kT/2klObzqMYdGedd 42jtrxgtbGZ0RqARSoQ5MgEVCoeitcCPVlRP6OlOuzYUXsQZcRFJOGuAYS+0/MifUEiv iaoW1Pjd/0Kw2IHvp3DtYw7KJOJfl4AGEuwzQVmZg77kVT0c2blWi5rcd+rYmQgUe6M5 W4FagoH2uglsf/+g1gljvTYkkXgd8/sdx9CSsWcCNsdP+BURh3ss0DfeQxwaqgwfjEUT qp32/KpnEB1mBkj6YlV5azZv0E5jERV34z7CxXyLbAO3rgh7ZQcrHnGVZ9E5przpb2SD wSrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=XNplPfaL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l21-20020a056402029500b00437de06ab37si3081318edv.244.2022.07.14.12.17.42; Thu, 14 Jul 2022 12:18:08 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@sang-engineering.com header.s=k1 header.b=XNplPfaL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231500AbiGNS6B (ORCPT + 99 others); Thu, 14 Jul 2022 14:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41932 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240897AbiGNS5f (ORCPT ); Thu, 14 Jul 2022 14:57:35 -0400 Received: from mail.zeus03.de (www.zeus03.de [194.117.254.33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 20A266B764 for ; Thu, 14 Jul 2022 11:57:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple; d=sang-engineering.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=k1; bh=O6B474X8P2gxKKp7qXnpFakS0XL VtX/7FNJL6iki3kU=; b=XNplPfaLVlLVZl1NYESMAVjWqAyxa/XruwrOTvEXaA7 HEnTSzeuh9HeTt2Yf+VmVbcD45hC2BfR1/ouh8pVtVgLfxAi2rsqgm2pwJoys1Lt OH42mL9E8+AMJvrIICLq0vJv4y170xd57sJmPXKMimDhAd7aY8MFg8H6FmMJ0a8w = Received: (qmail 704724 invoked from network); 14 Jul 2022 20:57:30 +0200 Received: by mail.zeus03.de with ESMTPSA (TLS_AES_256_GCM_SHA384 encrypted, authenticated); 14 Jul 2022 20:57:30 +0200 X-UD-Smtp-Session: l3s3148p1@4dM8ecjjRsIgAwDtxwdRAEXXn+yo/Rze From: Wolfram Sang To: linux-renesas-soc@vger.kernel.org Cc: Wolfram Sang , John Stultz , Thomas Gleixner , Stephen Boyd , Shuah Khan , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH v2] selftests: timers: clocksource-switch: add 'runtime' command line parameter Date: Thu, 14 Jul 2022 20:57:21 +0200 Message-Id: <20220714185721.48125-1-wsa+renesas@sang-engineering.com> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So the user can decide how long the test should run. Signed-off-by: Wolfram Sang Acked-by: John Stultz --- Change since V1: * added the new parameter to the help printout tools/testing/selftests/timers/clocksource-switch.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/timers/clocksource-switch.c b/tools/testing/selftests/timers/clocksource-switch.c index 5256e6215980..577e4b74211a 100644 --- a/tools/testing/selftests/timers/clocksource-switch.c +++ b/tools/testing/selftests/timers/clocksource-switch.c @@ -124,17 +124,22 @@ int main(int argc, char **argv) char orig_clk[512]; int count, i, status, opt; int do_sanity_check = 1; + int runtime = 60; pid_t pid; /* Process arguments */ - while ((opt = getopt(argc, argv, "s")) != -1) { + while ((opt = getopt(argc, argv, "st:")) != -1) { switch (opt) { case 's': do_sanity_check = 0; break; + case 't': + runtime = atoi(optarg); + break; default: - printf("Usage: %s [-s]\n", argv[0]); + printf("Usage: %s [-s] [-t ]\n", argv[0]); printf(" -s: skip sanity checks\n"); + printf(" -t: Number of seconds to run\n"); exit(-1); } } @@ -167,7 +172,7 @@ int main(int argc, char **argv) printf("Running Asynchronous Switching Tests...\n"); pid = fork(); if (!pid) - return run_tests(60); + return run_tests(runtime); while (pid != waitpid(pid, &status, WNOHANG)) for (i = 0; i < count; i++) -- 2.35.1