Tao Tang <[email protected]> writes: > Add qtest-attrs-test to exercise qtest memory access commands with attrs > on both aarch64 and x86. > > The test covers: > - Arm virt,secure=on: scalar and bulk accesses across non-secure, > secure, and root spaces, plus negative coverage for realm and for > non-secure accesses into secure-only RAM > - x86 q35: normal accesses > - libqtest-single *_attrs shortcut wrappers > > Add reusable response assertion helpers and structured attrs failure > helpers to libqtest.
Can't you re-order patch 3/5 before 2/5 and put these generic changes in 2/5 as well? > Use the structured APIs for negative memory access > tests, while retaining raw protocol commands for malformed command > shapes that the typed APIs cannot express. > > On Arm, the test targets the virt machine's secure-only RAM window so > that the requested attrs must select the correct address space. > > Also wire qtest-attrs-test into the aarch64 and i386/x86_64 qtest > builds. > > Signed-off-by: Tao Tang <[email protected]> > --- > tests/qtest/libqtest.c | 156 +++++++++++++++++ > tests/qtest/libqtest.h | 111 ++++++++++++ > tests/qtest/meson.build | 7 +- > tests/qtest/qtest-attrs-test.c | 305 +++++++++++++++++++++++++++++++++ > 4 files changed, 577 insertions(+), 2 deletions(-) > create mode 100644 tests/qtest/qtest-attrs-test.c > > diff --git a/tests/qtest/libqtest.c b/tests/qtest/libqtest.c > index 37aa69e1297..533b6f34599 100644 > --- a/tests/qtest/libqtest.c > +++ b/tests/qtest/libqtest.c The repetition introduced in this part is annoying, but let's not suffer because of it, we can clean it up later. We could probably unify the attrs and non-attrs versions using variadic functions as with the qmp helpers. For libqtest: Reviewed-by: Fabiano Rosas <[email protected]>
