Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/tests/modules



On Sat, 22 Feb 2020, Kamil Rytarowski wrote:

I have got no opinion. Please rearrange the directories as needed.

It's too much bother for now to move things around.  But for future
changes it would be good to put new "helper" modules in the same area
as the tests being helped.

While there, it would be good to implement modctl(MODCTL_MODSTAT,
&modstat) to check whether a specific module is loaded into the kernel
and retrieve modstat_t describing it.

modstat_t m;
strlcpy(&m.ms_name, "haxm", MAXMODNAME);
if (modctl(MODCTL_MODSTAT, &modstat) == -1)
   err(EXIT_FAILURE, "modctl: haxm");

I have got use-cases for these checks and I envision their wider usage
in future. We already have 3 use-cases in ATF tests.

I can probably do this fairly quickly.  But I'll have to look closer
at the argument/result passing, especially WRT the module's list of
"required" modules.


+--------------------+--------------------------+-----------------------+
| Paul Goyette       | PGP Key fingerprint:     | E-mail addresses:     |
| (Retired)          | FA29 0E3B 35AF E8AE 6651 | paul%whooppee.com@localhost     |
| Software Developer | 0786 F758 55DE 53BA 7731 | pgoyette%netbsd.org@localhost   |
+--------------------+--------------------------+-----------------------+


Home | Main Index | Thread Index | Old Index