kvm: main returns int
PATCH 1/1 kvm: main returns int
---
I think the test framework expects main to return int, is this correct?
---
Signed-off-by Edward Liaw <[email protected]>
--- testcases/kernel/kvm/include/kvm_guest.h | 2 +- testcases/kernel/kvm/kvm_pagefault01.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/kvm/include/kvm_guest.h +1 -1
@@ -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]))
testcases/kernel/kvm/kvm_pagefault01.c +1 -1
@@ -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;
Signature · 5 lines
2.37.2.789.g6183377224-goog -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 2 lines · Edward Liaw via ltp
---
I think the test framework expects main to return int, is this correct?
No, the test framework does not expect any return value from main(). This is also written in KVM test documentation in the last paragraph of "Basic KVM test structure":
https://github.com/linux-test-project/ltp/wiki/KVM-Test-API
Redefining the return type to int will not break anything but the value will be ignored. Test results are passed through a special memory buffer using tst_res() and tst_brk() functions.
Signature · 11 lines
Martin Doucha [email protected] QA Engineer for Software Maintenance SUSE LINUX, s.r.o. CORSO IIa Krizikova 148/34 186 00 Prague 8 Czech Republic -- Mailing list info: https://lists.linux.it/listinfo/ltp