riscv-non-isa/riscv-arch-test

Missing documentation in TestFormatSpec.adoc

cmuellner opened this issue · 3 comments

The following widely used elements are not documented in TestFormatSpec.adoc:

  • macro RVTEST_FP_ENABLE()
  • macro RVTEST_VALBASEUPD()
  • macro TEST_FPIO_OP()
  • the rvtest_mtrap_routine mechanism and how it has to be supported in the test files (label mtrap_sigptr
  • the canary mechanism (labels: sig_begin_canary, tsig_begin_canary, tsig_end_canary and macro CANARY)
  • the rvtest_gpr_save mechanism and how it has to be supported in the test files (label gpr_save)

Thanks for the response!

Test writers should acquaint themselves with those macros - none are terribly complicated.

Of course, I am able to read the macros, but this does not necessarily lead to answers:

  • Why is RVTEST_ISA() mandatory if it does nothing (even a comment in the code asks this question...)?
  • Why does code around the use of RVTEST_CODE_BEGIN duplicate the assembler directive that the macro expands to?
  • Why does code following RVTEST_DATA_BEGIN set the alignment when the macro already does that?
  • Why are the extension-specific test macros in test_macros.h not separated into separate files?
  • Why does test_macros.h not even have an include guard?
  • Why is there a huge amount of outdated and unmaintained code from Binutils in encoding.h?

Looking at existing (generated?) test code does not always help either:

  • flw-align-01.S defines useless-empty-newline labels test_dataset_0, test_dataset_1

The purpose of this list is not a request for support, but to document work items so they can be picked up.