Message ID | 20230307112845.452053-1-alex.bennee@linaro.org |
---|---|
Headers | show |
Series | MTTCG sanity tests for ARM | expand |
On Tue, Mar 07, 2023 at 11:28:38AM +0000, Alex Bennée wrote: > I last had a go at getting these up-streamed at the end of 2021 so > its probably worth having another go. From the last iteration a > number of the groundwork patches did get merged: > > Subject: [kvm-unit-tests PATCH v9 0/9] MTTCG sanity tests for ARM > Date: Thu, 2 Dec 2021 11:53:43 +0000 > Message-Id: <20211202115352.951548-1-alex.bennee@linaro.org> > > So this leaves a minor gtags patch, adding the isaac RNG library which > would also be useful for other users, see: > > Subject: [kvm-unit-tests PATCH v3 11/27] lib: Add random number generator > Date: Tue, 22 Nov 2022 18:11:36 +0200 > Message-Id: <20221122161152.293072-12-mlevitsk@redhat.com> > > Otherwise there are a few minor checkpatch tweaks. > > I would still like to enable KVM unit tests inside QEMU as things like > the x86 APIC tests are probably a better fit for unit testing TCG > emulation than booting a whole OS with various APICs enabled. > > Alex Bennée (7): > Makefile: add GNU global tags support > add .gitpublish metadata > lib: add isaac prng library from CCAN > arm/tlbflush-code: TLB flush during code execution > arm/locking-tests: add comprehensive locking test > arm/barrier-litmus-tests: add simple mp and sal litmus tests > arm/tcg-test: some basic TCG exercising tests > > Makefile | 5 +- > arm/Makefile.arm | 2 + > arm/Makefile.arm64 | 2 + > arm/Makefile.common | 6 +- > lib/arm/asm/barrier.h | 19 ++ > lib/arm64/asm/barrier.h | 50 +++++ > lib/prng.h | 83 +++++++ > lib/prng.c | 163 ++++++++++++++ > arm/tcg-test-asm.S | 171 +++++++++++++++ > arm/tcg-test-asm64.S | 170 ++++++++++++++ > arm/barrier-litmus-test.c | 450 ++++++++++++++++++++++++++++++++++++++ > arm/locking-test.c | 321 +++++++++++++++++++++++++++ > arm/spinlock-test.c | 87 -------- > arm/tcg-test.c | 340 ++++++++++++++++++++++++++++ > arm/tlbflush-code.c | 209 ++++++++++++++++++ > arm/unittests.cfg | 170 ++++++++++++++ > .gitignore | 3 + > .gitpublish | 18 ++ > 18 files changed, 2180 insertions(+), 89 deletions(-) > create mode 100644 lib/prng.h > create mode 100644 lib/prng.c > create mode 100644 arm/tcg-test-asm.S > create mode 100644 arm/tcg-test-asm64.S > create mode 100644 arm/barrier-litmus-test.c > create mode 100644 arm/locking-test.c > delete mode 100644 arm/spinlock-test.c > create mode 100644 arm/tcg-test.c > create mode 100644 arm/tlbflush-code.c > create mode 100644 .gitpublish > > -- > 2.39.2 > I don't see any problem with the series, but I didn't review it closely. I think it's unlikely we'll get reviewers, but, as the tests are nodefault, then that's probably OK. Can you make sure all tests have a "tcg" type prefix when they are TCG-only, like the last patch does for its tests? That will help filter them out when building all tests as standalone tests. Someday mkstandalone could maybe learn how to build a directory hierarchy using the group names, e.g. tests/mttcg/tlb/all_other but I don't expect to have time for that myself anytime soon, so prefixes will likely have to do for now (or forever). Thanks, drew
Andrew Jones <andrew.jones@linux.dev> writes: > On Tue, Mar 07, 2023 at 11:28:38AM +0000, Alex Bennée wrote: >> I last had a go at getting these up-streamed at the end of 2021 so >> its probably worth having another go. From the last iteration a >> number of the groundwork patches did get merged: >> >> Subject: [kvm-unit-tests PATCH v9 0/9] MTTCG sanity tests for ARM >> Date: Thu, 2 Dec 2021 11:53:43 +0000 >> Message-Id: <20211202115352.951548-1-alex.bennee@linaro.org> >> >> So this leaves a minor gtags patch, adding the isaac RNG library which >> would also be useful for other users, see: >> >> Subject: [kvm-unit-tests PATCH v3 11/27] lib: Add random number generator >> Date: Tue, 22 Nov 2022 18:11:36 +0200 >> Message-Id: <20221122161152.293072-12-mlevitsk@redhat.com> >> >> Otherwise there are a few minor checkpatch tweaks. >> >> I would still like to enable KVM unit tests inside QEMU as things like >> the x86 APIC tests are probably a better fit for unit testing TCG >> emulation than booting a whole OS with various APICs enabled. >> >> Alex Bennée (7): >> Makefile: add GNU global tags support >> add .gitpublish metadata >> lib: add isaac prng library from CCAN >> arm/tlbflush-code: TLB flush during code execution >> arm/locking-tests: add comprehensive locking test >> arm/barrier-litmus-tests: add simple mp and sal litmus tests >> arm/tcg-test: some basic TCG exercising tests >> >> Makefile | 5 +- >> arm/Makefile.arm | 2 + >> arm/Makefile.arm64 | 2 + >> arm/Makefile.common | 6 +- >> lib/arm/asm/barrier.h | 19 ++ >> lib/arm64/asm/barrier.h | 50 +++++ >> lib/prng.h | 83 +++++++ >> lib/prng.c | 163 ++++++++++++++ >> arm/tcg-test-asm.S | 171 +++++++++++++++ >> arm/tcg-test-asm64.S | 170 ++++++++++++++ >> arm/barrier-litmus-test.c | 450 ++++++++++++++++++++++++++++++++++++++ >> arm/locking-test.c | 321 +++++++++++++++++++++++++++ >> arm/spinlock-test.c | 87 -------- >> arm/tcg-test.c | 340 ++++++++++++++++++++++++++++ >> arm/tlbflush-code.c | 209 ++++++++++++++++++ >> arm/unittests.cfg | 170 ++++++++++++++ >> .gitignore | 3 + >> .gitpublish | 18 ++ >> 18 files changed, 2180 insertions(+), 89 deletions(-) >> create mode 100644 lib/prng.h >> create mode 100644 lib/prng.c >> create mode 100644 arm/tcg-test-asm.S >> create mode 100644 arm/tcg-test-asm64.S >> create mode 100644 arm/barrier-litmus-test.c >> create mode 100644 arm/locking-test.c >> delete mode 100644 arm/spinlock-test.c >> create mode 100644 arm/tcg-test.c >> create mode 100644 arm/tlbflush-code.c >> create mode 100644 .gitpublish >> >> -- >> 2.39.2 >> > > I don't see any problem with the series, but I didn't review it closely. > I think it's unlikely we'll get reviewers, but, as the tests are > nodefault, then that's probably OK. Can you make sure all tests have a > "tcg" type prefix when they are TCG-only, like the last patch does for > its tests? That will help filter them out when building all tests as > standalone tests. tcg-tests is the only test that explicitly targets TCG behaviour (in the choice of loops and SMC). The other tests are architecture validation tests which should just be easy passes on real silicon. > Someday mkstandalone could maybe learn how to build > a directory hierarchy using the group names, e.g. > > tests/mttcg/tlb/all_other So nodefault isn't enough for this? > > but I don't expect to have time for that myself anytime soon, so prefixes > will likely have to do for now (or forever). > > Thanks, > drew
On Tue, Apr 11, 2023 at 08:43:49AM +0100, Alex Bennée wrote: > > Andrew Jones <andrew.jones@linux.dev> writes: ... > > Someday mkstandalone could maybe learn how to build > > a directory hierarchy using the group names, e.g. > > > > tests/mttcg/tlb/all_other > > So nodefault isn't enough for this? > nodefault is enough to avoid running a test with run_tests.sh, when its group hasn't been explicitly selected, i.e. ./run_tests.sh doesn't run the test ./run_tests.sh -g test-group-name does run the test. standalone test filtering is only done by filename (but potentially pathname), which is why I suggested we someday use the group names as directory names. Anyway, that's future work. This series just needs to ensure it gets its group names right. Thanks, drew