Commit a1e638da authored by David Matlack's avatar David Matlack Committed by Paolo Bonzini

KVM: selftests: Change backing_src flag to -s in demand_paging_test

Every other KVM selftest uses -s for the backing_src, so switch
demand_paging_test to match.
Reviewed-by: default avatarBen Gardon <bgardon@google.com>
Reviewed-by: default avatarAndrew Jones <drjones@redhat.com>
Signed-off-by: default avatarDavid Matlack <dmatlack@google.com>
Message-Id: <20210917173657.44011-2-dmatlack@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 5b92b6ca
...@@ -416,7 +416,7 @@ static void help(char *name) ...@@ -416,7 +416,7 @@ static void help(char *name)
{ {
puts(""); puts("");
printf("usage: %s [-h] [-m vm_mode] [-u uffd_mode] [-d uffd_delay_usec]\n" printf("usage: %s [-h] [-m vm_mode] [-u uffd_mode] [-d uffd_delay_usec]\n"
" [-b memory] [-t type] [-v vcpus] [-o]\n", name); " [-b memory] [-s type] [-v vcpus] [-o]\n", name);
guest_modes_help(); guest_modes_help();
printf(" -u: use userfaultfd to handle vCPU page faults. Mode is a\n" printf(" -u: use userfaultfd to handle vCPU page faults. Mode is a\n"
" UFFD registration mode: 'MISSING' or 'MINOR'.\n"); " UFFD registration mode: 'MISSING' or 'MINOR'.\n");
...@@ -426,7 +426,7 @@ static void help(char *name) ...@@ -426,7 +426,7 @@ static void help(char *name)
printf(" -b: specify the size of the memory region which should be\n" printf(" -b: specify the size of the memory region which should be\n"
" demand paged by each vCPU. e.g. 10M or 3G.\n" " demand paged by each vCPU. e.g. 10M or 3G.\n"
" Default: 1G\n"); " Default: 1G\n");
printf(" -t: The type of backing memory to use. Default: anonymous\n"); printf(" -s: The type of backing memory to use. Default: anonymous\n");
backing_src_help(); backing_src_help();
printf(" -v: specify the number of vCPUs to run.\n"); printf(" -v: specify the number of vCPUs to run.\n");
printf(" -o: Overlap guest memory accesses instead of partitioning\n" printf(" -o: Overlap guest memory accesses instead of partitioning\n"
...@@ -446,7 +446,7 @@ int main(int argc, char *argv[]) ...@@ -446,7 +446,7 @@ int main(int argc, char *argv[])
guest_modes_append_default(); guest_modes_append_default();
while ((opt = getopt(argc, argv, "hm:u:d:b:t:v:o")) != -1) { while ((opt = getopt(argc, argv, "hm:u:d:b:s:v:o")) != -1) {
switch (opt) { switch (opt) {
case 'm': case 'm':
guest_modes_cmdline(optarg); guest_modes_cmdline(optarg);
...@@ -465,7 +465,7 @@ int main(int argc, char *argv[]) ...@@ -465,7 +465,7 @@ int main(int argc, char *argv[])
case 'b': case 'b':
guest_percpu_mem_size = parse_size(optarg); guest_percpu_mem_size = parse_size(optarg);
break; break;
case 't': case 's':
p.src_type = parse_backing_src_type(optarg); p.src_type = parse_backing_src_type(optarg);
break; break;
case 'v': case 'v':
...@@ -485,7 +485,7 @@ int main(int argc, char *argv[]) ...@@ -485,7 +485,7 @@ int main(int argc, char *argv[])
if (p.uffd_mode == UFFDIO_REGISTER_MODE_MINOR && if (p.uffd_mode == UFFDIO_REGISTER_MODE_MINOR &&
!backing_src_is_shared(p.src_type)) { !backing_src_is_shared(p.src_type)) {
TEST_FAIL("userfaultfd MINOR mode requires shared memory; pick a different -t"); TEST_FAIL("userfaultfd MINOR mode requires shared memory; pick a different -s");
} }
for_each_guest_mode(run_test, &p); for_each_guest_mode(run_test, &p);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment