History log of /kvm-unit-tests/lib/util.h (Results 1 – 4 of 4)
Revision Date Author Comments
# cd5f2fb4 20-Sep-2023 Paolo Bonzini <pbonzini@redhat.com>

Merge tag 'kvm-x86-2023.09.01' of https://github.com/kvm-x86/kvm-unit-tests into HEAD

x86 fixes, cleanups, and new testcases, and a few generic changes

- Fix a bug in runtime.bash that caused it t

Merge tag 'kvm-x86-2023.09.01' of https://github.com/kvm-x86/kvm-unit-tests into HEAD

x86 fixes, cleanups, and new testcases, and a few generic changes

- Fix a bug in runtime.bash that caused it to mishandle "check" strings with
multiple entries, e.g. a test that depends on multiple module params
- Make the PMU tests depend on vPMU support being enabled in KVM
- Fix PMU's forced emulation test on CPUs with full-width writes
- Add a PMU testcase for measuring TSX transactional cycles
- Nested SVM testcase for virtual NMIs
- Move a pile of code to ASM_TRY() and "safe" helpers
- Set up the guest stack in the LBRV tests so that the tests don't fail if the
compiler decides to generate function calls in guest code
- Ignore the "mispredict" flag in nSVM's LBRV tests to fix false failures
- Clean up usage of helpers that disable interrupts, e.g. stop inserting
unnecessary nops
- Add helpers to dedup code for programming the APIC timer
- Fix a variety of bugs in nVMX testcases related to being a 64-bit host

show more ...


# f563c18d 07-Jun-2023 Sean Christopherson <seanjc@google.com>

lib: Expose a subset of VMX's assertion macros

Expose VMX's TEST_EXPECT_EQ() macros so that they can be used outside of
x86's nested VMX tests, e.g. in x86's nested SVM tests. Leave the "full"
asse

lib: Expose a subset of VMX's assertion macros

Expose VMX's TEST_EXPECT_EQ() macros so that they can be used outside of
x86's nested VMX tests, e.g. in x86's nested SVM tests. Leave the "full"
assert macros in vmx.h, as gracfeully bailing from an arbitrary point in a
test requires additional infrastructure, e.g. to do setjmp() and longjmp().

Link: https://lore.kernel.org/r/20230607210959.1577847-3-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>

show more ...


# f1df8658 29-Feb-2016 Paolo Bonzini <pbonzini@redhat.com>

Merge branch 'ppc64/initial-drop-v7' of https://github.com/rhdrjones/kvm-unit-tests into HEAD

This series brings basic setup; starts a test's C entry point, main(),
and printf, exit, and malloc work

Merge branch 'ppc64/initial-drop-v7' of https://github.com/rhdrjones/kvm-unit-tests into HEAD

This series brings basic setup; starts a test's C entry point, main(),
and printf, exit, and malloc work. Three more series should follow this
one which must bring; vector support, mmu support, and smp support, at
which point I believe the framework could just evolve with the creation
of unit tests.

Tested on TCG and a P8 kvm_pr machine, and Laurent has tested it on
both a PowerMac G5 (kvm_pr) and a kvm_hv machine. I'm looking forward
to hearing more testing feedback from others though.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

show more ...


# e7c68b43 24-Jul-2015 Andrew Jones <drjones@redhat.com>

lib: share arm-selftest utility functions

arm-selftest has a couple utility functions that could be useful
to other unit tests, even other architectures. So move them out.
split_var moves to lib/uti

lib: share arm-selftest utility functions

arm-selftest has a couple utility functions that could be useful
to other unit tests, even other architectures. So move them out.
split_var moves to lib/util, where we can add other random
utilities over time. assert_args inspires report_abort, which
allows us to report a message, using the current prefix, that
we're aborting (outputs ABORT vs. PASS/FAIL). This is useful
for cases when unit tests can't complete due to missing
dependencies of some sort, such as missing/invalid inputs from
the user.

Signed-off-by: Andrew Jones <drjones@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Tested-by: Laurent Vivier <lvivier@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>

show more ...