diff options
| author | David Matlack <dmatlack@google.com> | 2021-09-17 17:36:56 +0000 |
|---|---|---|
| committer | Paolo Bonzini <pbonzini@redhat.com> | 2021-09-22 10:33:14 -0400 |
| commit | 9f2fc5554a4093e80084389f760d0b06ec2ff782 (patch) | |
| tree | c6a96af3447a2151cffca0b715e39635d94906f1 /tools/testing/selftests/kvm/access_tracking_perf_test.c | |
| parent | KVM: selftests: Change backing_src flag to -s in demand_paging_test (diff) | |
| download | linux-9f2fc5554a4093e80084389f760d0b06ec2ff782.tar.gz linux-9f2fc5554a4093e80084389f760d0b06ec2ff782.zip | |
KVM: selftests: Refactor help message for -s backing_src
All selftests that support the backing_src option were printing their
own description of the flag and then calling backing_src_help() to dump
the list of available backing sources. Consolidate the flag printing in
backing_src_help() to align indentation, reduce duplicated strings, and
improve consistency across tests.
Note: Passing "-s" to backing_src_help is unnecessary since every test
uses the same flag. However I decided to keep it for code readability
at the call sites.
While here this opportunistically fixes the incorrectly interleaved
printing -x help message and list of backing source types in
dirty_log_perf_test.
Fixes: 609e6202ea5f ("KVM: selftests: Support multiple slots in dirty_log_perf_test")
Reviewed-by: Ben Gardon <bgardon@google.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: David Matlack <dmatlack@google.com>
Message-Id: <20210917173657.44011-3-dmatlack@google.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tools/testing/selftests/kvm/access_tracking_perf_test.c')
| -rw-r--r-- | tools/testing/selftests/kvm/access_tracking_perf_test.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/testing/selftests/kvm/access_tracking_perf_test.c b/tools/testing/selftests/kvm/access_tracking_perf_test.c index 71e277c7c3f3..5d95113c7b7c 100644 --- a/tools/testing/selftests/kvm/access_tracking_perf_test.c +++ b/tools/testing/selftests/kvm/access_tracking_perf_test.c @@ -371,9 +371,7 @@ static void help(char *name) printf(" -v: specify the number of vCPUs to run.\n"); printf(" -o: Overlap guest memory accesses instead of partitioning\n" " them into a separate region of memory for each vCPU.\n"); - printf(" -s: specify the type of memory that should be used to\n" - " back the guest data region.\n\n"); - backing_src_help(); + backing_src_help("-s"); puts(""); exit(0); } @@ -381,7 +379,7 @@ static void help(char *name) int main(int argc, char *argv[]) { struct test_params params = { - .backing_src = VM_MEM_SRC_ANONYMOUS, + .backing_src = DEFAULT_VM_MEM_SRC, .vcpu_memory_bytes = DEFAULT_PER_VCPU_MEM_SIZE, .vcpus = 1, }; |
