nlsandler / writing-a-c-compiler-tests

Test cases for Writing a C Compiler
https://nostarch.com/writing-c-compiler
Other
154 stars 19 forks source link

Test runner hangs and is killed #83

Open xqb64 opened 1 week ago

xqb64 commented 1 week ago

I'm working my way through the book. I'm at chapter 19, and I was about to test whether propagating copies works for part 2. I'm writing in Rust (so I doubt I have a leak somewhere).

alex@smartalex-pc:~/Repositories/ucc$ ./tests/test_compiler target/release/ucc --chapter 19 --propagate-copies
Killed
alex@smartalex-pc:~/Repositories/ucc$ ./tests/test_compiler target/release/ucc --chapter 19
Killed
alex@smartalex-pc:~/Repositories/ucc$ ./tests/test_compiler target/release/ucc --chapter 19 --propagate-copies --int-only
----------------------------------------------------------------------
Ran 379 tests in 15.456s

OK
alex@smartalex-pc:~/Repositories/ucc$ ./tests/test_compiler target/release/ucc --chapter 18
----------------------------------------------------------------------
Ran 946 tests in 36.618s

OK

I have no way of figuring out what's going wrong and where. I tried running each test file individually (automated it), and everything terminated, none of them hanged.

nlsandler commented 1 week ago

Thanks for reporting this! A few follow-up questions to help repro this:

  1. What platform are you on?

  2. Make sure the test suite is up-to-date, then try this command: ./tests/test_compiler target/release/ucc --chapter 19 --propagate-copies --latest-only -vv

    The -vv option should show us which test it's hanging on and --latest-only will skip the chapter 1-18 tests.

  3. Could you share the script or command you used to run each test individually? Maybe there's a discrepancy between that and what test_compiler is doing.