[PATCH 0/3] Add two tests and improve SBIUnit

Ivan Orlov ivan.orlov0322 at gmail.com
Tue Apr 23 08:52:42 PDT 2024


This patch series intriduces two more tests for OpenSBI:

- spinlocks test (for functions from `riscv_locks.h`)
- atomics test (for functions from `riscv_atomic.h`)

Also, it adds a functionality of defining the init function for the
test suite. It allows us to initialize global variables used in the
multiple test cases (see the atomic test in this patch series).


Ivan Orlov (3):
  lib: tests: Add test suite init function
  lib: tests: Add test for atomic_t
  lib: tests: Add test for spinlocks

 include/sbi/sbi_unit_test.h       |   2 +
 lib/sbi/tests/objects.mk          |   6 ++
 lib/sbi/tests/riscv_atomic_test.c | 143 ++++++++++++++++++++++++++++++
 lib/sbi/tests/riscv_locks_test.c  |  41 +++++++++
 lib/sbi/tests/sbi_unit_test.c     |   3 +
 5 files changed, 195 insertions(+)
 create mode 100644 lib/sbi/tests/riscv_atomic_test.c
 create mode 100644 lib/sbi/tests/riscv_locks_test.c

-- 
2.34.1




More information about the opensbi mailing list