Skip to content

Another attempt at hardware discovery

Cyril Hrubis ltp 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest posting 2/20 of 5 patches 0 repliesNew
  2. v2 posting 1/25 patches 0 repliesSuperseded

Patches in v2 posting 2/2 No applies recorded yet

None of the 5 patches the cover letter announces are in this archive.

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [LTP] [PATCH v2 0/5] Another attempt at hardware discovery

Hi!

Quoted 10 lines

I think this has many advantages over the first edition, In out Internal Test??? we use a similar way to define the test prerequires as JSON structor.[1] here is My opinion, In the LTP testcase framework, we can set all the prerequires
in a JSONfile, these prerquires include CONFIGS, ABIs, devices-path(sys???proc,dev etc.),
the SETUP stage to check if the machine satisfy the defined-Json. at the same time??? we also need a scripts to generate a JSON-file from the current machine to collect all the prerequires list.
In this way, the benefit not just device-driver, but alse common testcase

We actually have something like this implemented. We generate a big JSON file on LTP build that describes the whole testsuite, but it includes more than just pre-requisites, have a look at docparse/metadata.json that is generated in recent LTP builds.

As for kernel config dependencies we have needs_kconfigs array, which is actually an array of boolean expressions on kernel config options where each of them has to be true in order for a test to continue. So to find out if we have a suitable kernel config for a test we have to check if all are true in:

"tests": {
	"test_name": {
		"needs_kconfigs": [
			"CONFIG_FOO=y | CONFIG_BAR=m",
			"!CONFIG_DAR=y"
		]
	}
}

We do not have the "file" part that would match the functionality you have in your code but that shouldn't be hard to add.

Signature · 2 lines
Cyril Hrubis
[email protected]