Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp679117rwe; Fri, 26 Aug 2022 12:09:58 -0700 (PDT) X-Google-Smtp-Source: AA6agR7WH4tz98IEzqNa4EyEMxvPHWtlKiIyPmG3NjipYGJd09si39QXis+XkrLiayT5kt9XfvTN X-Received: by 2002:a05:6402:1956:b0:448:19f:3ade with SMTP id f22-20020a056402195600b00448019f3ademr2157420edz.26.1661540998604; Fri, 26 Aug 2022 12:09:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661540998; cv=none; d=google.com; s=arc-20160816; b=uCx/exZrJoknmq1FPzRSK1TstmySV24l6t1ZuUBxq/WtCBPT9jGhHD0Yl9skQp1KBM 62qDMAgx0z7T6b4wxvbAFUwm44SVQLO+2FTz3r+HdvFn6uMTe708lzjDURw+yY0jmX7J 82WB/Dvrvgh5Xc01RNyAeUCLIRONxUQRO6ftkxQcmwXGrYBJwbQIlQm0xJWnkr1ntoeO Hgko5vKUVeH2Z8semETUZaqmEmUoKvgbugCI82a05QQELtjp7zxeaDFB1sIsD4nkLG1Q imFXKi9/pdxc4HirQ7o09jFAzjecUFkNlIO5QbjkpjtkETLJZHS0raOVqhWkrMtjUOrd VTvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:dkim-signature; bh=ed1e9YFm1bkZbR55Fi4AhXJIeJ9QRqoxJ1lB8J6isug=; b=vvhZiqlGTaUpgZGYAVVh89ObvBz9JorasCSo2Y0g+C+7qPfLgP149gaeYIl1c3AAZ3 A+pX+61GUFMeInZd/y2BLx/fhikR4+aXaavO0Ih4o//cfL+TOAq28zoAI39Z1zS22XJh Kq+0dG0LVkIJF9Ln9+/Cr7leulrQKwdASloHngenhrRn2Gp6oZE/ktLyP8Bpz2862tuc /cG2RhF1vKSZLdhNJPapbQrxg1RzkqzTKG1lyrpx3KVo77GFeB75Cye243Hp3k4T+fjp l4BFo3jlqYO9lCHzfIRvy8f12ItZV0swUpQdDIkulkeskI2iJJqmmVvzsZxnuqJfbTWw imqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=crNOK3R3; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a056402351400b0043d67a7dd61si1893050edd.179.2022.08.26.12.09.32; Fri, 26 Aug 2022 12:09:58 -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=pass header.i=@google.com header.s=20210112 header.b=crNOK3R3; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344982AbiHZStY (ORCPT + 99 others); Fri, 26 Aug 2022 14:49:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58398 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233859AbiHZSss (ORCPT ); Fri, 26 Aug 2022 14:48:48 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0EDCAE926B for ; Fri, 26 Aug 2022 11:45:56 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id d16-20020a17090ad3d000b001fb42eb7467so1431701pjw.9 for ; Fri, 26 Aug 2022 11:45:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc; bh=ed1e9YFm1bkZbR55Fi4AhXJIeJ9QRqoxJ1lB8J6isug=; b=crNOK3R3j37Xfzsw7QfNA/TW9IqQ86Oi4O+K9vKqcNRVNnRTzE1oXlyg98BmhLviPJ KLHYIbkEOkvBDd1CAUcAro992fVQk+vABTN3+2WkuHttTBFSOXWL7HdLVGnMNkkGlzqh aLPSLCRKfUKHTR/OLGAc2hEERwQwipghOY/UpBheYsv7EHMtLiGGJziLMXC2peRxrUHF cHmb9c1lPOczty49iWiq1S0AezJ119qzmB/nm9yxkjrc0X9cBCkG4wMbtm3z6vizScOL mL6P55tmRz+wuKR7IF1Sis2CxD2sQYTuUpPxGvduoZg7KF2JCnPww4DF3z30H5LdM7UD AunQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc; bh=ed1e9YFm1bkZbR55Fi4AhXJIeJ9QRqoxJ1lB8J6isug=; b=3xvM5VBtX07SOEWDV/XbWyGJXL4BVd5I3k0Yar2zqyfZFYuLVuFNPS0AY9hj+U6hwc Wtz1Q1MEIZW7JBoa/hfqKACkF41wdtkiK3PFx9NnTqO5Zq33d0qPOmvL9dBibuG1aDWk q700NNz6q50Hb61gRg+7t5uvNj8qKqLw8f187etkqB/ERA4sTTlHL02r9zVgnK53H+Li rggXycYasdeTfPI8xEZz4YpAvm0GGn/7xTuhWuKzjbn0VuVY1ai9S7Jw0ET7l50XXQMy GVySh85rNlvgSht+PyCkNZI4b4mjbO0TT+AdhVc9DikrBgwzQsdALjHCYJD4rWk+k2sC FdiA== X-Gm-Message-State: ACgBeo0I9JP+kxnMUFXaxjKVeMtTDasdFrOywwR6189w65HdTbd0Xu9M PttQj3V5HVWBFlhW+CdR5Zy9BGq55Pr2 X-Received: from vipin.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:479f]) (user=vipinsh job=sendgmr) by 2002:a17:90a:c1:b0:1f4:f757:6b48 with SMTP id v1-20020a17090a00c100b001f4f7576b48mr5715558pjd.56.1661539555510; Fri, 26 Aug 2022 11:45:55 -0700 (PDT) Date: Fri, 26 Aug 2022 11:44:58 -0700 In-Reply-To: <20220826184500.1940077-1-vipinsh@google.com> Mime-Version: 1.0 References: <20220826184500.1940077-1-vipinsh@google.com> X-Mailer: git-send-email 2.37.2.672.g94769d06f0-goog Message-ID: <20220826184500.1940077-3-vipinsh@google.com> Subject: [PATCH v3 2/4] KVM: selftests: Put command line options in alphabetical order in dirty_log_perf_test From: Vipin Sharma To: seanjc@google.com, dmatlack@google.com, pbonzini@redhat.com Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Vipin Sharma Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL autolearn=ham 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 There are 13 command line options and they are not in any order. Put them in alphabetical order to make it easy to add new options. No functional change intended. Signed-off-by: Vipin Sharma --- .../selftests/kvm/dirty_log_perf_test.c | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/tools/testing/selftests/kvm/dirty_log_perf_test.c b/tools/testing/selftests/kvm/dirty_log_perf_test.c index a03db7f9f4c0..acf8b80c91d1 100644 --- a/tools/testing/selftests/kvm/dirty_log_perf_test.c +++ b/tools/testing/selftests/kvm/dirty_log_perf_test.c @@ -406,51 +406,53 @@ int main(int argc, char *argv[]) guest_modes_append_default(); - while ((opt = getopt(argc, argv, "eghi:p:m:nb:f:v:os:x:")) != -1) { + while ((opt = getopt(argc, argv, "b:ef:ghi:m:nop:s:v:x:")) != -1) { switch (opt) { + case 'b': + guest_percpu_mem_size = parse_size(optarg); + break; case 'e': /* 'e' is for evil. */ run_vcpus_while_disabling_dirty_logging = true; dirty_log_manual_caps = 0; break; + case 'f': + p.wr_fract = atoi(optarg); + TEST_ASSERT(p.wr_fract >= 1, + "Write fraction cannot be less than one"); + break; case 'g': dirty_log_manual_caps = 0; break; + case 'h': + help(argv[0]); + break; case 'i': p.iterations = atoi(optarg); break; - case 'p': - p.phys_offset = strtoull(optarg, NULL, 0); - break; case 'm': guest_modes_cmdline(optarg); break; case 'n': perf_test_args.nested = true; break; - case 'b': - guest_percpu_mem_size = parse_size(optarg); + case 'o': + p.partition_vcpu_memory_access = false; break; - case 'f': - p.wr_fract = atoi(optarg); - TEST_ASSERT(p.wr_fract >= 1, - "Write fraction cannot be less than one"); + case 'p': + p.phys_offset = strtoull(optarg, NULL, 0); + break; + case 's': + p.backing_src = parse_backing_src_type(optarg); break; case 'v': nr_vcpus = atoi(optarg); TEST_ASSERT(nr_vcpus > 0 && nr_vcpus <= max_vcpus, "Invalid number of vcpus, must be between 1 and %d", max_vcpus); break; - case 'o': - p.partition_vcpu_memory_access = false; - break; - case 's': - p.backing_src = parse_backing_src_type(optarg); - break; case 'x': p.slots = atoi(optarg); break; - case 'h': default: help(argv[0]); break; -- 2.37.2.672.g94769d06f0-goog