[RFC PATCH v2] dts: skip test cases based on capabilities
Luca Vizzarro
Luca.Vizzarro at arm.com
Mon Jun 17 17:07:29 CEST 2024
On 12/06/2024 10:15, Juraj Linkeš wrote:
> On 11. 6. 2024 11:51, Luca Vizzarro wrote:
>> While working on my blocklist patch, I've just realised I forgot to
>> add another comment. I think it would be ideal to make capabilities a
>> generic class, and NicCapability a child of this. When collecting
>> capabilities we could group these by the final class, and let this
>> final class create the environment to test the support. For example:
>>
>
> I'm trying to wrap my head around this:
> 1. What do you mean group these by the final class?
The ultimate child of Capability, so NicCapability.
> 2. What is this addressing or improving?
It renders requirements more generic than just having to do with
testpmd. For example for the blocklist we could have a different kind of
"capability" and we could do:
@requires(TestbedCapability.min_port(2))
class TestSuite_blocklist(TestSuite):
Given the specific test requires a minimum of 2 ports. Albeit redundant
for DTS as we are always assuming minimum 2 ports right now, but it's an
example.
>> class Capability(ABC):
>> @staticmethod
>> @abstractmethod
>> def test_environment(node, capabilities):
>> """Overridable"
>>
>> class NicCapability(Capability):
>> def test_environment(node, capabilities):
>> shell = TestPmdShell(node)
>> # test capabilities against shell capabilities
>>
>
> I'm looking at this and I don't even know what to replace with this.
Replace with what? The intention of the original message was just not to
rely on a very concrete "NicCapability", but provide an abstract
Capability instead.
More information about the dev
mailing list