aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
AgeCommit message (Collapse)AuthorFilesLines
2022-07-22Fix string formatting in testlib.assertTrue()Tim Newsome1-1/+1
2022-06-23Another pylint upgrade. (#398)Tim Newsome1-148/+165
* Another pylint upgrade. Lots of format string changes, which are more readable. More files to come... * Satisfy pylint for two more files.
2022-05-31Fix GdbTest.disable_pmp failing on systems which support NAPOT but not TOR ↵Luke Wren1-2/+8
regions (#388)
2022-03-03With new OpenOCD, gdb prints thread info differently (#373)Tim Newsome1-1/+2
It includes the name in quotes: ```* 2 Thread 1 "Current Execution" (Name: Current Execution) 0x10000100 in main``` Just ignore that part.
2022-01-06Add gdb.interact() for debug tests. (#367)Tim Newsome1-0/+18
This feature lets you easily interact with the gdb after the test has run to a certain point.
2021-11-12Create DisconnectTest. (#364)Tim Newsome1-32/+38
Disconnects from gdb, and then reconnects, making sure that didn't change any of the registers. This test will start passing when https://github.com/riscv/riscv-openocd/pull/661 merges.
2021-10-05Remove slen. (#360)Tim Newsome1-4/+2
It's not an argument to spike anymore. Also switch testing the vector unit from multi-gdb to `-rtos hwthread`. This exposes a bug in OpenOCD (which is already fixed).
2021-06-08Tweaks for multispike. (#339)Tim Newsome1-5/+9
1. Don't run all tests in multi-spike. Extra coverage is negligible, and it just takes too long. 2. Increase a few timeouts.
2021-05-20Test multiple heterogeneous spike instances. (#338)Tim Newsome1-25/+24
2021-05-07Test daisy chained homogeneous spike instances. (#334)Tim Newsome1-32/+89
* Test debugging multiple spikes in a daisy chain. * Hugely speed up rbb_daisychain. Now 2 dual-hart spikes are less than 4x slower than a single dual-hart spike. * WIP * Test daisy chained homogeneous spike instances. For OpenOCD, this means we're checking that we can talk to multiple TAPs. Next up is heterogeneous testing. * Enable Sv48Test. Didn't mean to disable it with this commit. * Test authentication again. Another change I hadn't meant to push...
2021-04-13Add FreeRTOS smoke tests. (#333)Tim Newsome1-9/+26
* Add FreeRTOS smoke tests. Make sure that OpenOCD can access all threads in a FreeRTOS binary on single-hart RV32 and RV64. * Also test `-rtos FreeRTOS`.
2020-12-14Add tests for memory sampling feature. (#300)Tim Newsome1-1/+1
2020-07-01Make pylint happy. (#285)Tim Newsome1-0/+1
2020-06-25Create a more sophisticated vector test (#284)Tim Newsome1-8/+27
* WIP * WIP * Vector test seems to work well with spike. * Check a0 in case the program didn't work right. * Return not applicable if compile doesn't support V
2020-05-18Parse "cannot insert breakpoint" message. (#279)Tim Newsome1-1/+8
Also use sys.exit instead of exit, per new pylint's suggestion.
2020-03-26Improve address translation tests (#261)Tim Newsome1-0/+11
* Improve address translation tests. Check that the mode we're testing is supported by hardware before running the test. Test with high address bits set, which catches a bug in OpenOCD. * Turn off PMP for address translation test. Otherwise it doesn't pass on HiFive Unleashed. * Run TranslateTest on random hart. Once https://github.com/riscv/riscv-openocd/pull/459 merges that will work.
2020-03-26Write a NOP program in PrivRw test. (#260)Tim Newsome1-0/+6
Otherwise it only passes intermittently when I change _start, which is very confusing.
2020-03-18Spike changed --varch syntax (#257)Tim Newsome1-2/+2
This was changed by https://github.com/riscv/riscv-isa-sim/pull/417
2020-03-05Clean up gdb parsing code. (#247)Tim Newsome1-42/+32
Also fix bug in parsing nan.
2020-03-05Add a simple mechanism to skip tests on targets. (#251)Tim Newsome1-1/+2
2020-02-14Add tests for vector register access (#244)Tim Newsome1-24/+103
* WIP * Add vector register smoketest. Also redo the gdb value parsing code to accommodate the more complicated way that vector registers look. * Test vector access a little more thoroughly. * Revert unnecessary changes.
2020-02-11Run OpenOCD output through spike-dasm. (#239)Tim Newsome1-3/+9
If it's in the path, at least. This way you get human readable assembly in the log instead of hex values.
2020-01-15Force DMI busy in all tests. (#235)Tim Newsome1-6/+18
This catches more corner cases where this may be a problem.
2019-12-10Improve parallellism in debug test Makefile (#223)Tim Newsome1-8/+15
* Improve parallellism in debug test Makefile Now each test is an individual make target, so you can get the most out of however many cores you have. On my 12-core system, `make` went from 2m45s to 42s, and `make all` went from `3m25s` to `2m39s`. If you have few cores, this change may actually slow things down a bit, because ExamineTarget is run for every gdbserver.py invocation. * Remove test target.
2019-11-22Move to Python 3. (#218)Tim Newsome1-37/+38
The impetus for this was mostly that after my Ubuntu upgrade, pylint suddenly starting to apply python3 rules, and I suppose it's time to adopt python 3 now that it's been released for more than a decade.
2019-10-15Add support to run all tests against HiFive Unleashed. (#212)Tim Newsome1-1/+3
* Parse inf/nan floats. * Enable mstatus.fs in SimpleF18Test Also accept "unable to fetch" message when FPRs aren't supported. * Add config files for HiFive Unleashed. * Add configs to flash HiFive Unleashed. All tests pass.
2019-09-24Look for binaries in $PATH. (#208)Tim Newsome1-7/+4
Instead of relying on $RISCV. Using $RISCV was common in the early days, but nowadays many tools are simply installed alongside the rest of the system.
2019-08-02Miscellaneous minor test improvements (#199)Tim Newsome1-8/+9
* Let the debugger enable mstatus.F if necessary. * Ignore (some) gdb debug output. * Increase timeout. * Make newer version of pylint happy.
2019-07-15Make tests work with RV32E targets. (#196)Tim Newsome1-7/+1
2019-07-15Use work area in spike-1 to cover CRC algorithm. (#195)Tim Newsome1-1/+4
2019-06-14Work better with mainline gdb (#192)Tim Newsome1-15/+38
* Parse floats the way mainline gdb prints them. For 64-bit floats, it shows both float and double results. Now more tests pass using mainline gdb. * Disable ANSI when talking to gdb. Helps more tests pass with mainline gdb. * Parse {float=...,double=...} in "info registers" Makes tests work better with mainline gdb.
2019-05-16Cover with/without halt groups. (#191)Tim Newsome1-7/+14
Also work with the new command line options that were renamed in https://github.com/riscv/riscv-isa-sim/pull/299
2019-04-08Test lack of abstract CSR access. (#187)Tim Newsome1-2/+5
2019-04-04Test simultaneous resume using hasel. (#186)Tim Newsome1-1/+6
Passes on spike and Arty. Won't merge until https://github.com/riscv/riscv-openocd/pull/364 merges.
2019-03-11Add SmpSimultaneousRunHalt test. (#181)Tim Newsome1-10/+20
This test confirms that in SMP configurations OpenOCD halts the harts near-simulatenously. (It'll also check for resume, but that's not implemented yet so commented out for now.)
2019-02-14Test `-rtos hwthread` (#178)Tim Newsome1-11/+10
* WIP * Use hwthread everywhere. * Test `-rtos hwthread`. Also tweak timeouts a bit so that we don't have ridiculous timeouts for simple operations. * Tweak timeouts so tests pass on a loaded system.
2018-12-31Add testing of run-test/idle cases.Tim Newsome1-1/+10
2018-12-03Reduce download size a bit.Tim Newsome1-2/+1
Increase some timeouts in case memory access is slow.
2018-10-31Fix remaining tests to work from flash:Tim Newsome1-2/+5
TriggerDmode, ProgramHwWatchpoint, ProgramSwWatchpoint.
2018-10-29Tweak debug tests to run out of flash.Tim Newsome1-1/+3
Not all tests pass when run out of flash yet, but it's getting a lot closer. The ones still failing on HiFive1-flash are: DebugSymbols, Hwbp2, InstantHaltTest, TriggerDmode, TriggerLoadAddressInstant, and TriggerStoreAddressInstant.
2018-10-05Make HwWatchpoint test fail on incorrect result.hw_watchpointTim Newsome1-1/+1
Also tiny cleanups, making pylint happy.
2018-10-03Added tests for hw and sw watchpointscgsfv1-0/+15
2018-08-31Fix CustomRegisterTest.Tim Newsome1-4/+4
gdb in riscv-tools doesn't automatically create a "custom" group like mainline gdb does.
2018-08-29Add test case for `riscv expose_custom`.Tim Newsome1-0/+12
Only works against spike, where I've implemented some custom debug registers to test against.
2018-08-23Get all of the log into the final log fileTim Newsome1-6/+20
This allows me to see the final valgrind output on OpenOCD, so I can watch for memory leaks when using --server_cmd "valgrind --leak-check=full openocd".
2018-06-18Add reproduce line to the end of debug test logsTim Newsome1-0/+2
2018-05-18Fix MulticoreRunHaltStepiTestTim Newsome1-4/+9
The test actually wasn't checking interrupt counts at all. Fixing it required some other changes: Make sure all harts get to run Add some retries, since on a loaded machine against spike both harts might not get to run, even if you give spike a generous amount of time to do so.
2018-05-14Merge remote-tracking branch 'origin/downloadtest' into debug-tests-more-singleMegan Wachs1-4/+7
2018-05-14Make DownloadTest properly park other harts.Tim Newsome1-4/+7
2018-05-11debug: output some more useful info into the post-mortem dataMegan Wachs1-0/+5