[LTP] [PATCH v1] kvm: main returns int

Edward Liaw edliaw@google.com
Tue Sep 13 22:28:53 CEST 2022


---
I think the test framework expects main to return int, is this correct?
---

Signed-off-by: Edward Liaw <edliaw@google.com>
---
 testcases/kernel/kvm/include/kvm_guest.h | 2 +-
 testcases/kernel/kvm/kvm_pagefault01.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/kvm/include/kvm_guest.h b/testcases/kernel/kvm/include/kvm_guest.h
index ec13c5845..4a4be3f39 100644
--- a/testcases/kernel/kvm/include/kvm_guest.h
+++ b/testcases/kernel/kvm/include/kvm_guest.h
@@ -15,7 +15,7 @@
 #undef TRERRNO
 
 #define TST_TEST_TCONF(message) \
-	void main(void) { tst_brk(TCONF, message); }
+	int main(void) { tst_brk(TCONF, message); }
 
 #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
 
diff --git a/testcases/kernel/kvm/kvm_pagefault01.c b/testcases/kernel/kvm/kvm_pagefault01.c
index e355fa448..dc92c7b66 100644
--- a/testcases/kernel/kvm/kvm_pagefault01.c
+++ b/testcases/kernel/kvm/kvm_pagefault01.c
@@ -45,7 +45,7 @@ int handle_page_fault(void *userdata, struct kvm_interrupt_frame *ifrm,
 	return 0;
 }
 
-void main(void)
+int main(void)
 {
 	uintptr_t tmp;
 	struct page_table_entry_pae *subpte, *pte = kvm_pagetable;
-- 
2.37.2.789.g6183377224-goog



More information about the ltp mailing list