Am 09.12.2025 um 22:24 schrieb Ladislav Laska:
Hi!

I'll have a look and review the PR.

Dan, before you go and write a completely new system, I'd like to note
there already is a test suite for the decoders that would have covered
this:

https://github.com/sigrokproject/sigrok-test
https://github.com/sigrokproject/sigrok-dumps

Or did you have anything more elaborate in mind? I mean, the sigrok-test
itself could have some of the tests embedded, but the dumps can be
problematic...

Automation: the multiple repo scheme complicates things. There is
sigrok-build that I believe runs the tests. I was actually thingking a
bot that checks every new PR change in all repos and creates a new
integration branch/PR for it on the sigrok-build to run the tests
together. The output could possibly be also used for testing on
different platforms for reporters that don't have the ability to compile
their own (TBH it's a chore, especially on non-linux).


Helge, if you don't mind, I suggest to open a PR into these two
repositories as well, putting the dump into sigrok-dumps repository and
the test into sigrok-test repo.

Cheers,
Ladislav

Happy New Year to everybody!

I have added the requested dumps and tests on that repositories. And I created the pull request for these repositories:

https://github.com/sigrokproject/sigrok-dumps/pull/50
https://github.com/sigrokproject/sigrok-test/pull/27

You also wrote that you "don't like the approach taken. The issue is that self.state is manipulated from within the get_token_bits helper function. This is unexpected behavior from a helper function." My proposed approach was to fix the current state if an unexpected bus behavior occurs. I agreed that this is a bit unexpected as well as the bus behavior.

I provided a different state machine that first receives the entire bus token before it tries the call the appropriate handler function. It would be grate if we can look together on this approach and find a common solution. I introduced an additional branch *refactor_sdcard* in my public repository and hope that you can take a look on it.

https://github.com/harper23/libsigrokdecode/tree/refactor_sdcard

My intention is to merge it back to master when we found that it's a good solution.

Best regards,
Helge
_______________________________________________
sigrok-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sigrok-devel

Reply via email to