Testsuite driver crashes bady when trying to run a non-existent test
If you try
hadrian/build test --only=T11111
where T11111
is a non-existent test, you get the unhelpful output below. It looks like an outright crash in driver, and I reported it as such in this email thread.
But it's not: I had simply asked to run a non-existent test, as @wz1000 helpful pointed out in a reply to my email.
Could the error be improved please? It really stalled me for a bit :-(.
Unhelpful output
bash$ ./hadrian/build test --only=T11111
Up to date
]0;Starting...| Run Testsuite GetExtraDeps: none
Command line: /usr/bin/python3 -Wdefault testsuite/driver/runtests.py --rootdir=testsuite/tests --rootdir=libraries/directory/tests --rootdir=libraries/filepath/tests --rootdir=libraries/ghc-heap/tests --rootdir=libraries/os-string/tests --rootdir=libraries/array/tests --rootdir=libraries/base/tests --rootdir=libraries/binary/tests --rootdir=libraries/bytestring/tests --rootdir=libraries/deepseq/tests --rootdir=libraries/exceptions/tests --rootdir=libraries/ghc-compact/tests --rootdir=libraries/ghc-prim/tests --rootdir=libraries/haskeline/tests --rootdir=libraries/pretty/tests --rootdir=libraries/stm/tests --rootdir=libraries/template-haskell/tests --rootdir=libraries/text/tests --rootdir=libraries/unix/tests --top /home/simonpj/code/HEAD/testsuite -e windows=False -e darwin=False -e config.local=False -e config.cleanup=True -e config.accept=False -e config.accept_platform=False -e config.accept_os=False -e 'config.exeext='\'''\''' -e config.compiler_debugged=False -e config.debug_rts=False -e ghc_with_native_codegen=True -e config.have_ncg=True -e config.have_llvm=False -e config.compiler_profiled=False -e config.have_RTS_linker=True -e 'config.package_conf_cache_file="/home/simonpj/code/HEAD/_build/stage1/lib/package.conf.d/package.cache"' -e 'config.libdir="/home/simonpj/code/HEAD/_build/stage1/lib"' -e config.have_interp=True -e config.unregisterised=False -e config.tables_next_to_code=True -e 'ghc_compiler_always_flags='\'' -dcore-lint -dstg-lint -dcmm-lint -no-user-package-db -fno-dump-with-ways -fprint-error-index-links=never -rtsopts -fno-warn-missed-specialisations -fshow-warning-groups -fdiagnostics-color=never -fno-diagnostics-show-caret -Werror=compat -dno-debug-output'\''' -e ghc_with_dynamic_rts=True -e config.ghc_with_threaded_rts=True -e config.have_fast_bignum=True -e target_with_smp=True -e config.ghc_dynamic=True -e config.leading_underscore=False -e 'config.wordsize="64"' -e 'config.os="linux"' -e 'config.arch="x86_64"' -e 'config.platform="x86_64-unknown-linux"' -e config.stage=2 --config gs=gs --config 'timeout_prog="/home/simonpj/code/HEAD/_build/testsuite/timeout/install-inplace/bin/timeout"' --config stats_files_dir=_build/stage1/haddock-timing-files --threads=1 --config-file=testsuite/config/ghc --only=T11111 -e config.speed=1 --summary-file=testsuite_summary.txt --verbose=2 --config 'compiler="/home/simonpj/code/HEAD/_build/stage1/bin/ghc"' --config 'ghc_pkg="/home/simonpj/code/HEAD/_build/stage1/bin/ghc-pkg"' --config 'haddock="/home/simonpj/code/HEAD/_build/stage1/bin/haddock"' --config 'hp2ps="/home/simonpj/code/HEAD/_build/stage1/bin/hp2ps"' --config 'hpc="/home/simonpj/code/HEAD/_build/stage1/bin/hpc"' -e config.in_tree_compiler=True --only-report-hadrian-deps /tmp/extra-file-12981364330425-12285-0
===> Command failed with error code: 1
/usr/lib/python3/dist-packages/apport/report.py:13: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
import fnmatch, glob, traceback, errno, sys, atexit, imp, stat
Traceback (most recent call last):
File "testsuite/driver/runtests.py", line 470, in <module>
framework_fail(name, None, 'test not found')
File "/home/simonpj/code/HEAD/testsuite/driver/testlib.py", line 1545, in framework_fail
directory = re.sub(r'^\.[/\\]', '', str(opts.testdir))
File "/home/simonpj/code/HEAD/testsuite/driver/testglobals.py", line 468, in testdir
raise Exception('testdir not initialized')
Exception: testdir not initialized
Timeout is 300
Known ways: hpc, prof, normal_h, prof_hc_hb, prof_hb, prof_hd, prof_hy, prof_hr, sanity, threaded1_ls, threaded2_hT, threaded2_sanity, debug_numa, llvm, debugllvm, profllvm, profoptllvm, profthreadedllvm, debug, ghci-ext, ghci-ext-prof, ext-interp, nonmoving, nonmoving_thr, nonmoving_thr_sanity, nonmoving_thr_ghc, compacting_gc
Run ways: normal, optasm, ghci, ghci-opt, threaded1, threaded2, dyn, hpc
Compile ways: normal, optasm, hpc
Allowing performance changes in:
Found 593 .T files...
Beginning test run at Mon Apr 29 12:46:44 2024
Detected CPU features: {'smap', 'tsc', 'fxsr', 'pge', 'pdpe1gb', 'movbe', 'f16c', 'adx', 'sep', 'fsgsbase', 'tsc_reliable', 'arat', 'avx2', 'xsavec', 'de', 'cpuid', 'fxsr_opt', 'sse2', 'mca', 'syscall', 'extd_apicid', 'sse', 'cr8_legacy', 'vmmcall', '3dnowprefetch', 'msr', 'pse', 'cmov', 'rdtscp', 'mmxext', 'abm', 'umip', 'mmx', ':', 'xgetbv1', 'bmi1', 'stibp', 'cmp_legacy', 'rdrand', 'osvw', 'avx', 'sse4a', 'fpu', 'xsave', 'lahf_lm', 'ssbd', 'fma', 'aes', 'xsaveopt', 'topoext', 'pae', 'nopl', 'pse36', 'cx8', 'flags', 'pat', 'rep_good', 'clflushopt', 'sha_ni', 'rdpid', 'nx', 'virt_ssbd', 'misalignsse', 'lm', 'mtrr', 'clzero', 'sse4_1', 'nonstop_tsc', 'sse4_2', 'cx16', 'popcnt', 'ht', 'hypervisor', 'pclmulqdq', 'bmi2', 'xsaveerptr', 'mce', 'ssse3', 'ibpb', 'constant_tsc', 'smep', 'sse3', 'rdseed', 'clwb', 'vme', 'clflush', 'apic'}
Found CPU features: smap tsc fxsr pge pdpe1gb movbe f16c adx sep fsgsbase tsc_reliable arat avx2 xsavec de cpuid fxsr_opt sse2 mca syscall extd_apicid sse cr8_legacy vmmcall 3dnowprefetch msr pse cmov rdtscp mmxext abm umip mmx : xgetbv1 bmi1 stibp cmp_legacy rdrand osvw avx sse4a fpu xsave lahf_lm ssbd fma aes xsaveopt topoext pae nopl pse36 cx8 flags pat rep_good clflushopt sha_ni rdpid nx virt_ssbd misalignsse lm mtrr clzero sse4_1 nonstop_tsc sse4_2 cx16 popcnt ht hypervisor pclmulqdq bmi2 xsaveerptr mce ssse3 ibpb constant_tsc smep sse3 rdseed clwb vme clflush apic
]0;Finished in 1.81sCommand failed
Build failed.