On Thu, Dec 01, 2022 at 06:42:22PM +0100, Jaroslav Kysela wrote: > The current code allows to override "test.time1 {} test.time2 {}" blocks in > the configuration files which is equivalent to "test { time1 {} time2 {} }". Right, I was leaving that in place but just renaming so that the intent of the test was clearer and expanding the standard coverage - trying to make it clearer what the test was trying to accomplish when someone comes along trying to do something later on. It did however cross my mind that we might be better off having the tests read from the config file be in addition to the standard tests rather than overriding them, I think that'd work out a lot clearer in the end. > This changeset will introduce configuration lookups like > "pcm.0.0.PLAYBACK.44k1.2.big {}" which creates another configuration > structure. The '.' (compound level delimiter) should not be used in the test > name. I see, we could use another delimiter there easily enough (though if we segregated the built in and loaded test configurations I'm not sure it'd matter so much). > My original idea for the next improvement was to parse the > "pcm.0.0.PLAYBACK.test" compound and gather the tests for the given pcm. If > this compound is missing, we can continue with the hard-coded defaults. While it is useful to be able to specify additional tests through configuration I don't think we should be relying on that for coverage, we should have a more substantial baseline of tests so that systems like KernelCI get reasonable coverage without having to get changes individually integrated for boards (and then wait for them to filter out into the trees being tested). It doesn't scale out so well over the number of systems that we might be running on, especially if we come up with new tests and have to loop back over existing boards, and isn't really idiomatic for kselftest. I'm also a bit worried about the way we currently override the built in tests, it creates additional potential for confusion when looking at results if the test might've been turned into something different by the configuration file. > About the skips - the test should probably keep to support also the exact > parameters. For example - if the hardware must support 6 channels, it should > not be a skip but an error. Everything may be broken, including the PCM > configuration refining. Yes, there's a tension there between hard coded tests and the explicitly specified per board ones. I think the solution here is to add two tests for things we read from the configuration file rather than just adding by default, one verifying that we managed to configure the settings we asked for and one for the actual test. > I just sent the patch with my changes for comments [1]. It's just the base > code which may be extended with your requirements. The skips may be > implemented using configuration field like 'skip_if_rate_error yes' or so. > Let me know, if I can stack your changes on top, or perhaps, you may be > willing to adapt them.