Sunday, 2021-10-24

kylellkcl, 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
kylelor perhaps I'm reading too much into your request.16:43
lkclkylel, the unit tests that need an expected state are already run in dual Simulator-HDL mode19:41
lkclthe original intent, when they were first written 18+ months ago, was that they would never be run in single (Simulator-only) mode19:42
lkclwith the proper introduction of the Test API, that's now changed.19:42
lkclbecause we *can*, thanks to the Test API, now put an ExpectedState in for every single test.19:43
lkclfollow the chain.... :)19:43
lkclbecause we already *know* that each of the alu_test_cases.py tests already pass when comparing Simulator-against-HDL,19:43
lkclwe 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
lkclthus19:44
lkclwhen running the alu_test_cases.py *in* single-only mode, they will, in fact, have an Expected State against which to compare19:44
lkcland, thus, will in fact be useful *to* run in a single-only mode19:45
lkclwhere, at the moment, because there *is* no Expected State, they are utterly useless to run in single-only mode19:45
lkclso 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
lkclbut that's ok: it's better than doing thousands of Expected State additions by hand20:00
cesarI guess you could set keep the expected state as the initial state, and note the values in the inevitable assertion error.20:42
programmerjakelkcl: check out my latest emails, I already solved a bunch of the problems your mulling over20:48
programmerjakei'll be busy with visiting family for the rest of today20:51
cesarOK, 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#l23621:19
cesar^kylel21:21
programmerjakelkcl, sorry, I'd happily help tomorrow when I'm not busy with other stuff21:25
kylelcesar,lkcl, that is what I was wondering as the cheat...to generate the code that can be plunked into test cases22:45

Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!