Skip to contentSkip to conversation

kvm-unit-tests: arm: Fail on unknown subtest

PATCH Superseded Christopher Covington 2 participants 4 messages Sep 29, 2015 – Oct 2, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm-unit-tests: arm: Fail on unknown subtest

---
 arm/selftest.c | 2 ++
 1 file changed, 2 insertions(+)
arm/selftest.c +2 -0
index fc9ec60..aa16a91 100644
@@ -376,6 +376,8 @@ int main(int argc, char **argv)
 		cpumask_set_cpu(0, &smp_reported);
 		while (!cpumask_full(&smp_reported))
 			cpu_relax();
+	} else {
+		report("Unknown subtest", false);
 	}
 
 	return report_summary();
Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#1 lore raw
Quoted 10 lines · Christopher Covington
---
 arm/selftest.c | 2 ++
 1 file changed, 2 insertions(+)
arm/selftest.c +0 -0
index fc9ec60..aa16a91 100644

arm/selftest.c int main(int argc, char **argv) · line 380

Quoted 5 lines
arm/selftest.c +2 -0
@@ -376,6 +376,8 @@ int main(int argc, char **argv)
 		cpumask_set_cpu(0, &smp_reported);
 		while (!cpumask_full(&smp_reported))
 			cpu_relax();
+	} else {
+		report("Unknown subtest", false);

I think

printf("Unknown subtest\n");
abort();

might be better. Also, please post kvm-unit-tests patches to the kvm mailing list.

Thanks,
drew

Quoted 8 lines
arm/selftest.c +0 -0
 	}
 
 	return report_summary();
Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
#2 lore raw

PATCH v2 1/1 arm: Fail on unknown subtest

---
 arm/selftest.c | 3 +++
 1 file changed, 3 insertions(+)
arm/selftest.c +3 -0
index fc9ec60..f4a5030 100644
@@ -376,6 +376,9 @@ int main(int argc, char **argv)
 		cpumask_set_cpu(0, &smp_reported);
 		while (!cpumask_full(&smp_reported))
 			cpu_relax();
+	} else {
+		printf("Unknown subtest\n");
+		abort();
 	}
 
 	return report_summary();
Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Reviewed-by on v2 1/1
#3 lore raw

Re: [Qemu-devel] [PATCHv2] arm: Fail on unknown subtest

Quoted 25 lines · Christopher Covington
---
 arm/selftest.c | 3 +++
 1 file changed, 3 insertions(+)
arm/selftest.c +3 -0
index fc9ec60..f4a5030 100644
@@ -376,6 +376,9 @@ int main(int argc, char **argv)
 		cpumask_set_cpu(0, &smp_reported);
 		while (!cpumask_full(&smp_reported))
 			cpu_relax();
+	} else {
+		printf("Unknown subtest\n");
+		abort();
 	}
 
 	return report_summary();
Signature · 3 lines
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

and applied to https://github.com/rhdrjones/kvm-unit-tests/tree/staging

Thanks,
drew