xtf: integrate argo test
cover xtf: integrate argo test
The patch series integrates an XTF argo test available at [1].
Patch 1 is the original test.
Patch 2 adds fixups to run the test under QEMU environment in gitlab CI.
[1] https://github.com/dozylynx/meta-argo/blob/master/recipes-extended/xen/xtf/0001-Add-Argo-test.patch
Christopher Clark (1):
tests/argo: Add argo test suite
Denis Mukhin (1):
tests/argo: fixup for recent xen
docs/all-tests.dox | 2 + include/xen/argo.h | 259 +++++++++++++++++++++++++++++ include/xtf/hypercall.h | 1 + include/xtf/numbers.h | 5 + tests/argo/Makefile | 9 + tests/argo/main.c | 355 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 631 insertions(+) create mode 100644 include/xen/argo.h create mode 100644 tests/argo/Makefile create mode 100644 tests/argo/main.c
Signature · 1 line
2.34.1
PATCH 1/2 tests/argo: Add argo test suite
From: Christopher Clark <[email protected]>
From: Christopher Clark <[email protected]>
Simple test cases for the four Argo operations, register, unregister, sendv and notify exercised with a single test domain.
Add infrastructure to access Argo: a 5-argument hypercall, number 39.
---
Original XTF argo test:
https://github.com/dozylynx/meta-argo/blob/master/recipes-extended/xen/xtf/0001-Add-Argo-test.patch
--- docs/all-tests.dox | 2 + include/xen/argo.h | 259 +++++++++++++++++++++++++++++ include/xtf/hypercall.h | 1 + include/xtf/numbers.h | 5 + tests/argo/Makefile | 9 + tests/argo/main.c | 353 ++++++++++++++++++++++++++++++++++++++++ 6 files changed, 629 insertions(+) create mode 100644 include/xen/argo.h create mode 100644 tests/argo/Makefile create mode 100644 tests/argo/main.c
docs/all-tests.dox +2 -0
@@ -174,6 +174,8 @@ states. @section index-utility Utilities +@subpage test-argo - Argo functionality test + @subpage test-cpuid - Print CPUID information. @subpage test-fep - Test availability of HVM Forced Emulation Prefix.
include/xen/argo.h new file +259 -0
259 lines not on this page · raw message
include/xtf/hypercall.h +1 -0
@@ -33,6 +33,7 @@extern uint8_t hypercall_page[PAGE_SIZE ];/* All Xen ABI for includers convenience .*/ +#include <xen/argo.h> #include <xen/callback.h> #include <xen/elfnote.h> #include <xen/errno.h>
include/xtf/numbers.h +5 -0
@@ -52,6 +52,11 @@*/ #define _u (v) ((unsigned long)(v)) +/** +* Round up a number to the next integer +*/ +#define roundup (x, y) ((((x) + ((y) - 1)) / (y)) * (y)) +#endif /* !__ASSEMBLY__ */ #endif /* XTF_NUMBERS_H */
tests/argo/Makefile new file +9 -0
@@ -0,0 +1,9 @@ +include $(ROOT)/build/common.mk + +NAME := argo +CATEGORY := in-development +TEST-ENVS := $(ALL_ENVIRONMENTS) + +obj-perenv += main.o + +include $(ROOT)/build/gen.mk
tests/argo/main.c new file +353 -0
353 lines not on this page · raw message
Signature · 1 line
2.34.1
PATCH 2/2 tests/argo: fixup for recent xen
In reply to [email protected]From: Denis Mukhin <[email protected]>
Add fixup for own_domid under CONFIG_HAS_XENSTORE to make XTF argo test can pass under x86 QEMU.
---
Successful argo XTF run:
https://gitlab.com/xen-project/people/dmukhin/xen/-/jobs/9733329882
--- tests/argo/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
tests/argo/main.c +3 -1
@@ -301,14 +301,16 @@ static void clear_test_ring(void)void test_main (void ) { -int own_domid; +int own_domid =0 ;xen_argo_port_t test_aport =1 ;const char simple_text[] ="a simple thing to send\n" ;const unsigned int msg_type =0x12345678 ; +#if defined(CONFIG_HAS_XENSTORE ) own_domid =xtf_get_domid ();if ( own_domid <0 )return xtf_error ("Error: could not determine domid of the test domain\n" ); +#endif /* First test validates for Argo availability to gate further testing */ if (probe_for_argo (own_domid) )
Signature · 1 line
2.34.1