[llvm-dev] Help with RISCV and QEMU in llvm testsuite lit testing

Mohamed Shafi via llvm-dev llvm-dev at lists.llvm.org
Fri Sep 27 11:41:06 PDT 2019


On Thu, 26 Sep 2019 at 23:02, Michael Kruse <llvmdev at meinersbur.de> wrote:
>
> Am Mi., 25. Sept. 2019 um 17:04 Uhr schrieb Mohamed Shafi via llvm-dev
> <llvm-dev at lists.llvm.org>:
> > I am not sure who is responsible for the *.test.out file. I am assuming that this should be generated by QEMU. But I see that there is "exit 0" in the reference files that are not produced in the QEMU output. Should qemu be run via a wrapper that captures the output and "exit 0" in a *.test.out file ?
>
> The "exit 0" should be produced by the tools/timeit.sh (since you are
> using  -DTEST_SUITE_USE_PERF=ON) and has a cmdline switch
> --append-exitstatus. The command line for it is produced by
> litsupport/modules/timeit.py. No idea why it does not work in your
> case, but I hope this help for looking into the issue.
>
> Michael

Thanks for the response. What you have pointed out is correct. Since i
have enabled TEST_SUITE_USER_MODE_EMULATION the comparison with the
reference file is done with a *.out file rather than with the
simulator output directly. The appropriate out file with the simulator
output and the exit code will get generated if timeit.sh is invoked
with --append-exitstatus and --redirect-output options. timeit.sh gets
invoked by the timeit.py file with these options when
config.traditional_output is true. Interestingly lit.local.cfg in
test-suite\SingleSource has this enabled. But for some reason which i
still haven't found out, timeit.sh is invoked as though
config.traditional_output is false. From what i see this issue should
crop up when RISCV target (or a QEMU target for that matter) is tested
with llvm test suite. It would be of great help if some one could
point out what i am doing wrong.

Regards,
Shafi


More information about the llvm-dev mailing list