On 2025-02-28 at 11:06:50 +0100, Janusz Krzysztofik wrote: > > > While looking for similar cases, I've found commit 51104c19d857 ("kunit: test: > > > Add vm_mmap() allocation resource manager") that seems to have resolved a > > > similar issue for then newly added kunit tests accessing current->mm. Maybe > > > the approach used there is worth of reusing it for i915 selftests. > > > > > > Thanks, > > > Janusz > > > > I've seen commit you found. It sadly uses symbols that aren't exported > > outside of mm module and kunit tests > > and so I can't replicate it in our > > selftest. > > > > MikoÅ?aj > > Well, strictly speaking, those core symbols were also not available to kunit, > and that patch exported them to kunit namespace. While i915 selftests are not > kunit, they are still in-kernel tests, then maybe it would be acceptable to > import the kunit namespace as needed to our selftests and use those symbols > for the same purpose as intended. CI already runs kunit tests, then builds > the kernels with CONFIG_KUNIT=y. The code of i915 selftest that will depend > on those symbols may then just check for CONFIG_KUNIT defined and be skipped > if not. Andi, what do you think about setting selftest as kunit to have access to exported symbols? MikoÅ?aj