On Thu, Oct 24, 2019 at 04:39:44PM +0300, Kamal Heib wrote: > On Thu, Oct 24, 2019 at 09:39:09AM +0300, Leon Romanovsky wrote: > > On Wed, Oct 23, 2019 at 11:10:08PM +0300, Kamal Heib wrote: > > > On Wed, Oct 23, 2019 at 02:42:19PM -0300, Jason Gunthorpe wrote: > > > > On Wed, Oct 23, 2019 at 08:39:54PM +0300, Kamal Heib wrote: > > > > > Add a new directory to house the rdma specific tests and add the first > > > > > rdma_dev.sh test that checks the renaming and setting of adaptive > > > > > moderation using the rdma tool for the available RDMA devices in the > > > > > system. > > > > > > > > What is this actually testing? rdmatool? > > > > > > > > > > This is a very basic test that uses the rdmatool for checking two of the > > > RDMA devices functionalities. > > > > > > > This seems like a very strange kselftest to me. > > > > > > > > > > Basically, you can take a look into other subsystems selftests (e.g. > > > net) to see that it not that strange :-). > > > > Yeah, selftests is in-kernel dumpster, everything goes in. It doesn't > > mean we should follow this path too. The in-kernel tests are great to > > check interfaces and not external tools. > > > > OK, I see that you don't like the idea of using external/Userspace tools. > > So, what do you suggest?! You need to decide WHAT do you want to test. For rdma-core APIs, we have pyverbs, see this PR https://github.com/linux-rdma/rdma-core/pull/567 For sysfs API, shell scripts in selftest is a good place. For netlink/verbs API, you will need to write C-programs. <-- don't recommend this path. > > > > > > > Yes, the first test is very basic, but the idea behind it is to utilize > > > the kernel selftests infrastructure to test the rdma subsystem, I plan to > > > introduce more tests in the near future, hopefully other folks from the > > > community will join me too. > > > > You don't have any version checks, the idea that you can test latest > > kernel features with installed "rdmatool" in distro is a little bit over > > optimistic. > > > > > > > > Thanks, > > > Kamal > > > > > > > Jason