Dan Williams <dan.j.williams(a)intel.com> writes:
On Mon, Aug 12, 2019 at 1:45 PM Jeff Moyer <jmoyer(a)redhat.com>
wrote:
>
> Dan Williams <dan.j.williams(a)intel.com> writes:
>
> > If the 'kmem' module is missing skip the test to support running the
> > unit tests on older -stable kernels pre-v5.1.
> >
> > Signed-off-by: Dan Williams <dan.j.williams(a)intel.com>
>
> Note that the kernel module could also just not be configured.
Yes, but then the test would still report "SKIP" and the developer
could take a deeper look if they expected to see all "PASS".
Right, I see this as a good thing. I meant to point out that your
commit message was a bit misleading.
> > ---
> > test/daxctl-devices.sh | 7 +++++++
> > 1 file changed, 7 insertions(+)
> >
> > diff --git a/test/daxctl-devices.sh b/test/daxctl-devices.sh
> > index 04f53f7b13ab..4102fb6990ae 100755
> > --- a/test/daxctl-devices.sh
> > +++ b/test/daxctl-devices.sh
> > @@ -18,6 +18,13 @@ find_testdev()
> > {
> > local rc=77
> >
> > + # The kmem driver is needed to change the device mode, only
> > + # kernels >= v5.1 might have it available. Skip if not.
> > + if ! modinfo kmem; then
> > + "Unable to find kmem module"
>
> I think you need a printf, there.
Whoops, yes.
> Also, do you want the modinfo output in the test log?
Don't think it matters either way since it all ends up in the log.
It's tough to say whether it adds value, so sure, leave it in.
Cheers,
Jeff