lkcl | Las[m], the heuristic for running appropriate unit tests i went through it with ghostmansd and kylel quite recently | 05:23 |
---|---|---|
lkcl | it needs becoming a bit familiar with the dependency hierarchy of the code, but basically the further up towards "unused" or "little-used" leaf node code, the less unit tests you need to run [with semi-confidence] | 05:25 |
lkcl | there's a few "big" tests (25 mins) and some REALLY big tests (several days) | 05:26 |
lkcl | the heuristics allow you to avoid running those on every single commit | 05:26 |
lkcl | one trick: | 05:27 |
lkcl | * write completely independent code that is totally isolated from all other code. | 05:27 |
lkcl | * commit it freely even without unit tests (not really encouraged, that) as long as it has no syntax errors | 05:28 |
lkcl | * write completely independent unit tests, again committing those freely without reservation | 05:28 |
lkcl | (i mean, *not* even using branches, because there's absolutely zero possibility of "damage") | 05:29 |
lkcl | * once and ONLY once you are happy that the (independent) code actually works, work out how to "hook" it into "live" code | 05:30 |
lkcl | this last part may need some preliminary / preparatory code-morphs before the "live" code is ready to "accept" the (up until then independent) code | 05:30 |
lkcl | it's an incremental process and it's one we're literally going through right now with the Test API | 05:31 |
lkcl | so if you track the commits made across the soc and openpower-isa repos here https://bugs.libre-soc.org/show_bug.cgi?id=686 | 05:32 |
lkcl | you can get a pretty clear idea of how *not* to need to use branches | 05:32 |
lkcl | which i detest | 05:32 |
lkcl | having had quite significant work *completely* disregarded, multiple times, because i was told "f*** off and use branches, moron" | 05:33 |
lkcl | i'm not about to inflict that onto anyone else. | 05:33 |
lkcl | that said, the XLEN work which required very careful review, used an xlen branch, and it worked extremely well. | 05:34 |
lkcl | that involved cherry-picking of something mad like *100* small commits, but it set up a good review process. similar to how gerrit works, but without needing a horror-show-of-web-service | 05:36 |
programmerjake | lkcl, if your still up, do the budget-sync changes sound good? (feel free to review/test tomorrow) | 05:42 |
lkcl | programmerjake, i'm a schrodinger cat at the moment :) | 05:43 |
programmerjake | hmm, sleep and look in the morning? | 05:44 |
cesar | lkcl: Could you please check that you have the latest pia? Maybe reinstall it? The error that I'm getting originates from pia. | 11:53 |
cesar | programmerjake: Commit 720517cf0ff588aebcf97a5eadc566ab680b0791 causes a regression in src/soc/fu/mul/test/test_pipe_caller.py | 12:04 |
cesar | ^ pia commit (in case it wasn't clear) | 12:08 |
lkcl | cesar, yes i have that commit. i'm not going to update pia in case it breaks | 12:15 |
lkcl | cesar, i have an idea, if you can submit a set of test values which fail we can check it manually and add a regression test which doesn't use pia. | 15:22 |
lkcl | kylel, neat trick with the sets | 15:26 |
kylel | thanks. you saved me some time leading to sets. quite fortunate how sets work for that application. I wanted to avoid a bunch of "if not in" type logic | 15:58 |
lkcl | shockingly, guido van rossum advocated for their removal about 8-10 years ago | 16:32 |
lkcl | Las[m], i meant to ask: what's the kinds of things you can do / have done? and of course, what would you *like* to do? | 16:57 |
lkcl | the idea being, there, to find you something useful you'd enjoy | 16:57 |
Las[m] | lkcl: It's wrt. Nix packaging | 16:58 |
lkcl | kylel, am just endeavouring to slice HDL away from Sim, first step, decouple Sim in setup_tst_memory by passing it the test.mem | 16:58 |
Las[m] | Preferably I'd upstream the code so more people can make use of it | 16:58 |
Las[m] | Related: I got my FPGA yesterday. It would be great if I could test the Libre-SOC on it. Is there a wiki page for this? | 16:58 |
lkcl | okaay | 16:59 |
lkcl | nice! which one? | 16:59 |
lkcl | ulx3s? | 16:59 |
Las[m] | Some ECP5 | 16:59 |
Las[m] | No, unfortunately not | 16:59 |
lkcl | excccellent | 16:59 |
Las[m] | Summer of Nix is a timed event, and that would ship in November | 16:59 |
lkcl | an orangecrab or something like that? | 16:59 |
Las[m] | Which is way too late | 16:59 |
Las[m] | let me check | 16:59 |
lkcl | it needs to be one that's supported by litex | 16:59 |
Las[m] | https://www.digikey.co.uk/en/products/detail/lattice-semiconductor-corporation/LFE5UM-45F-VERSA-EVNG/5222128 IIRC | 17:00 |
lkcl | ahhh exccellent | 17:00 |
lkcl | hey those were in stock again. great | 17:00 |
lkcl | ok then it's brain-dead simple | 17:00 |
Las[m] | Nice. | 17:00 |
lkcl | run the commands at lines 14 and 15 | 17:00 |
lkcl | https://git.libre-soc.org/?p=libresoc-litex.git;a=blob;f=README.txt;hb=HEAD | 17:01 |
Las[m] | How do I know it works though? | 17:01 |
lkcl | connect to the serial console with minicom | 17:01 |
lkcl | 1 sec | 17:01 |
lkcl | https://www.youtube.com/watch?v=72QmWro9BSE | 17:02 |
lkcl | if you see the litex bios on the serial console, you know it's good. | 17:02 |
lkcl | if you want to get a little bit more sophisticated, you can grab N.E.Other FT2322 and wire it up to the pins we're using for JTAG TAP | 17:03 |
lkcl | which... you can see all the Stuff On How To Do That at... | 17:03 |
lkcl | https://libre-soc.org/HDL_workflow/ECP5_FPGA/ | 17:05 |
lkcl | that's a *completely separate* FT232 from the one used *by* the actual VERSA_ECP5 | 17:05 |
lkcl | so you *will* end up with the two getting horribly confused when using openocd :) | 17:06 |
lkcl | because it goes, "oh, errr, you have *two* FT232s plugged in, i have no idea how to discern between them, which one's the programmer for uploading FPGA bitstreams and which one's for bit-banging JTAG to the Libre-SOC core? pffh, i have no idea, barf" | 17:07 |
lkcl | i solved that by, um, disconnecting one of them at a time :) | 17:07 |
lkcl | i now have a USB hub with individual power buttons | 17:07 |
lkcl | but, if you don't plan to run the JTAG TAP testing (which i have to say is kinda cool), then you don't need to be concerned about it | 17:08 |
lkcl | the FT232 on the VERSA_ECP5, you just run minicom -D /dev/ttyUSB0 and you're good. | 17:08 |
Las[m] | Thanks! | 17:13 |
Las[m] | I'll do that | 17:13 |
* lkcl thumbs-up | 17:15 | |
lkcl | ghostmansd, your daughter (and family) all ok? | 17:15 |
ghostmansd | Yes. My wife has returned and was able to pick up things as they were for two days more, but, frankly speaking, by the time she returned the daughter was already healthy. :-) They only had to wait for two days more until kindergarten allows them to return there. | 17:18 |
lkcl | :) | 17:18 |
ghostmansd | That said, I'm somewhat in a hurry at work after these two weeks. | 17:19 |
lkcl | yehyeh understandable | 17:19 |
ghostmansd | Things that deadline has been approaching to... Well, they're almost deadlined. :-) | 17:19 |
lkcl | whoops | 17:19 |
lkcl | well what are you talking to *me* for then?? :) | 17:19 |
ghostmansd | That's since a man for sure needs some other joys besides deadlines! :-D | 17:22 |
programmerjake | cesar: idk how that breaks it since all that commit does is add an implementation for mulli | 17:59 |
cesar | It is returning a ValueException, before it was returning an AttributeException. | 18:03 |
programmerjake | ah, the issue is that mulli needs immediate set in InstructionInput's constructor, the other mul ops have that input in rb instead | 18:04 |
programmerjake | before that commit test_pipe_caller.py was trying to call pia.mulli but it didn't exist hence the attributeerror | 18:06 |
programmerjake | i'll try to fix test_pipe_caller | 18:13 |
programmerjake | cesar lkcl: I fixed it! | 19:00 |
lkcl | wha-hey :) | 19:00 |
programmerjake | took longer than expected since I had to re-figure out how to extract the immediate from the decoder | 19:01 |
lkcl | doh | 19:01 |
lkcl | PowerDecoder2 is a biiig piece of work | 19:02 |
lkcl | which is why i don't want to be duplicating it in c | 19:03 |
lkcl | hence the nmigen-to-c compiler | 19:03 |
programmerjake | :) | 19:04 |
programmerjake | for #699 i don't know that giving all the money to luke and I is any better...anyone else have any opinions? cesar? | 19:06 |
kylel | lkcl, unit_test failure works. woot | 19:07 |
programmerjake | i asked cole about #699's budget and he said he doesn't care about getting money for it | 19:12 |
lkcl | ok that's a relief because i scaled everything and realised it'd be like, below EUR 30. so took everyone but you and i off | 19:20 |
lkcl | kylel, w00t :) | 19:20 |
cesar | I don't mind, I can't really approach the amount of work both of you put into this. Also, there is plenty of other funded work still. | 19:21 |
programmerjake | k, thx! | 19:22 |
* lkcl just realised i have an error in adde, no idea why, it's off by one, consistently | 19:22 | |
lkcl | thx cesar | 19:22 |
cesar | "There are 2 hard problems in computer science: cache invalidation, naming things, and off-by-1 errors." https://martinfowler.com/bliki/TwoHardThings.html | 19:26 |
lkcl | cesar, lol. someone put that into the bugzilla quips/quotes | 19:26 |
programmerjake | idk, it might already be there | 19:28 |
programmerjake | yeah, i added that quip when we first setup bugzilla | 19:29 |
jn | cesar: and DNS combines all of them :) | 19:37 |
lkcl | kylel, not-so-big split, kinda obvious now the other pieces are in place | 19:42 |
lkcl | https://git.libre-soc.org/?p=soc.git;a=commitdiff;h=f25faf58a3ed81573fc692780fa67df22b57f98f | 19:42 |
kylel | nice | 20:01 |
lkcl | split out the functions for HDL and ISACaller(Sim) | 20:20 |
* lkcl https://www.youtube.com/watch?v=3E-Zrg9CB_Q | 20:35 | |
* lkcl https://www.youtube.com/watch?v=Cv6tuzHUuuk | 20:53 | |
lkcl | on a bit of a youtube music video spree :) | 20:53 |
programmerjake | oh, well in that case: https://youtu.be/yiw6_JakZFc | 21:07 |
programmerjake | interesting video by Kurzgesagt | 21:08 |
lkcl | kylel, if you're good with the expectedFailure test (committed?) the next most logical incremental step would be to add an "ExpectedState" | 21:09 |
lkcl | programmerjake, informative | 21:09 |
lkcl | like, "hey uhh you can build all the electric cars you want, but that doesn't take care of the fact that the effing roads are made with bitumen!" | 21:10 |
* lkcl face-palm | 21:10 | |
kylel | lkcl, was just about to ask where you wanted test_states dumped into? openpower/test? | 21:11 |
lkcl | https://bugs.libre-soc.org/show_bug.cgi?id=686#c51 | 21:11 |
lkcl | test_states... ehn? :) | 21:11 |
lkcl | moo? | 21:11 |
lkcl | oh right | 21:11 |
lkcl | yes, if it's "general purpose", yes absolutely. | 21:12 |
lkcl | you saw what i did with soc simple/test/test_runner.py? 1 HDL 2 Simulator 3. Compare | 21:12 |
kylel | yes | 21:13 |
lkcl | 3. Compare needs to be what moves to openpower/test, yes | 21:13 |
lkcl | slowly though we need to morph towards being able to specify a command-line argument to all of test_caller.py *and* to test_issuer.py | 21:13 |
lkcl | merging them all and allowing "--sim", "--hdl", "--microwatt", "--qemu" etc etc etc etc | 21:14 |
programmerjake | does that work with unittest infrastructure? that's what I'm depending on to parallelize testing... | 21:18 |
lkcl | if you try to run qemu parallelised i'd consider that to be quite quite insane | 21:19 |
programmerjake | if the tests can't just be run by `python3 -m unittest`, that is problamatic | 21:19 |
lkcl | it would fire up multiple qemu instances which would quickly overwhelm system resources | 21:19 |
kylel | lol | 21:19 |
programmerjake | well...only if you have a small amount of ram... | 21:20 |
kylel | speaking of qemu, that will be interesting given how dang slow the controller is. | 21:20 |
programmerjake | if you have 32GB like I do you should easily be able to run several qemu at once | 21:20 |
lkcl | i suspect we need to do a close examination of pygdbmi | 21:21 |
lkcl | and a (temporary, hopefully) fork of it | 21:21 |
programmerjake | I'd expect each qemu to only need <1GB for just unit tests...if not we need to adjust qemu's ram allocation to more sane levels | 21:21 |
lkcl | it relies on a timeout for basic communication | 21:21 |
kylel | yeah, there is another library out there that does async gdb which I assume would be faster but haven't looked much into it. I was amazed I got it to work. | 21:21 |
programmerjake | well...timeouts work just fine with 24 parallel invocations... | 21:22 |
lkcl | rather than looking for an expected prompt and using proper buffering | 21:22 |
kylel | I think that one simple test I did took maybe around...wanna say a minute for one instruction. | 21:23 |
programmerjake | you may want to also look into lldb's api...iirc it can be directly used from python | 21:23 |
programmerjake | https://lldb.llvm.org/python_reference/ | 21:23 |
programmerjake | no need to parse stdio for that | 21:24 |
programmerjake | lldb should also be able to connect to qemu's built-in gdbserver | 21:26 |
lkcl | urrrr swig auto-generated. looovely :) | 21:27 |
lkcl | argh i'm breaking s***. | 21:32 |
lkcl | wow awesome! | 21:46 |
lkcl | an actual (severe) python 3.7 segfault! | 21:47 |
richardwilbur[m] | <lkcl> "split out the functions for..." <- youtube: “This video contains content from SME, who has blocked it in your country on copyright grounds.” | 21:47 |
lkcl | richardwilbur[m]: doh | 21:47 |
lkcl | greeeeat :) | 21:47 |
lkcl | i'm deeply impressed to have gotten an actual segfault out of python for something that should be "working" | 21:48 |
lkcl | i.e. not a 3rd party module | 21:48 |
programmerjake | well...getting a segfault is pretty easy...just mess with ctypes | 21:50 |
lkcl | yeah that's expected. | 21:50 |
programmerjake | or maybe with python's ir | 21:50 |
lkcl | like calling assembler and going "oh i fink i will just obliterate the stack and expect everyfink to be hunky dory" | 21:50 |
lkcl | this is an extremely rare refcounting error | 21:51 |
lkcl | thanks to crossing over from yield | 21:51 |
lkcl | meeting 8mins | 21:52 |
lkcl | cesar, lxo, programmerjake & | 21:53 |
programmerjake | yeah, just a min | 21:55 |
lkcl | ok, we're waiting for ya :) | 22:02 |
Generated by irclog2html.py 2.17.1 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!