Re: [PATCH 2/2] samples: rust: add `SgTable` and `ScatterList` selftests
From: Boqun Feng
Date: Tue May 30 2023 - 14:34:27 EST
On Tue, May 30, 2023 at 08:31:26AM +0100, Greg KH wrote:
> On Tue, May 30, 2023 at 02:48:21PM +0800, Qingsong Chen wrote:
> > Add a selftest module to provide a temporary place to put "pure tests"
> > for Rust funtionality and wrappers.
>
> Is this for in-kernel tests, or userspace tests? If userspace, you
> should follow the proper test reporting protocol the rest of the kernel
> uses. If in-kernel, it should follow the format that the in-kernel test
> currently has to be consistent. From what I could tell here, you aren't
> following either, but I might be totally wrong.
>
It is for in-kernel tests, and you're right, we should follow the other
in-kernel test format.
Some explanation about the background: when I was working on this little
"test framework", the Github CI of Rust-for-Linux (ab)used sample/rust/
for testing, that's why it was put there.
Now my understanding is that Rust KUnit support is coming, so we should
use kunit tests if possible.
Despite where the tests are put, I'm personally happy that this patchset
comes up with some tests, which help the review ;-)
Regards,
Boqun
> thanks,
>
> greg k-h