kylel | lkcl, not sure I'm following your logic with dumping expected state. I understand the intent and what to do, I'm just a little confused on dumping values that wouldn't exist without setting them in the first place. | 16:42 |
---|---|---|
kylel | or perhaps I'm reading too much into your request. | 16:43 |
lkcl | kylel, the unit tests that need an expected state are already run in dual Simulator-HDL mode | 19:41 |
lkcl | the original intent, when they were first written 18+ months ago, was that they would never be run in single (Simulator-only) mode | 19:42 |
lkcl | with the proper introduction of the Test API, that's now changed. | 19:42 |
lkcl | because we *can*, thanks to the Test API, now put an ExpectedState in for every single test. | 19:43 |
lkcl | follow the chain.... :) | 19:43 |
lkcl | because we already *know* that each of the alu_test_cases.py tests already pass when comparing Simulator-against-HDL, | 19:43 |
lkcl | we can, in fact, rather than laboriously go through each damn one (of which there are probably several thousand in total), | 19:44 |
lkcl | *get the unit test to dump its own state out and use that as the Expected State* | 19:44 |
lkcl | thus | 19:44 |
lkcl | when running the alu_test_cases.py *in* single-only mode, they will, in fact, have an Expected State against which to compare | 19:44 |
lkcl | and, thus, will in fact be useful *to* run in a single-only mode | 19:45 |
lkcl | where, at the moment, because there *is* no Expected State, they are utterly useless to run in single-only mode | 19:45 |
lkcl | so it's a bit of a cheat, and there will be some tests that this trick won't work for (those which calculate their output from some computed input e.g. random numbers) | 19:59 |
lkcl | but that's ok: it's better than doing thousands of Expected State additions by hand | 20:00 |
cesar | I guess you could set keep the expected state as the initial state, and note the values in the inevitable assertion error. | 20:42 |
programmerjake | lkcl: check out my latest emails, I already solved a bunch of the problems your mulling over | 20:48 |
programmerjake | i'll be busy with visiting family for the rest of today | 20:51 |
cesar | OK, just read https://bugs.libre-soc.org/show_bug.cgi?id=730#c11 . I suspect the idea it to make a printout of last_sim (which is SimState, not ExpectedState), in https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=src/openpower/test/runner.py;h=dcd14e49368d6ed3657cbfb308d232fb4105f2bb;hb=4495f61303afca9790a9e2c3bab4cf8977c7de11#l236 | 21:19 |
cesar | ^kylel | 21:21 |
programmerjake | lkcl, sorry, I'd happily help tomorrow when I'm not busy with other stuff | 21:25 |
kylel | cesar,lkcl, that is what I was wondering as the cheat...to generate the code that can be plunked into test cases | 22:45 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!