Re: [PATCH v4 linux-kselftest-test 5/6] kunit: allow kunit to be loaded as a module

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

 



Quoting Alan Maguire (2019-11-15 02:16:11)
> diff --git a/lib/kunit/test.c b/lib/kunit/test.c
> index 87b5cf1..41ef71a 100644
> --- a/lib/kunit/test.c
> +++ b/lib/kunit/test.c
> @@ -486,3 +486,16 @@ void kunit_cleanup(struct kunit *test)
>         }
>  }
>  EXPORT_SYMBOL_GPL(kunit_cleanup);
> +
> +static int kunit_init(void)

Missing __init?

> +{
> +       return 0;
> +}
> +late_initcall(kunit_init);

It looks pretty weird that this doesn't do anything in the module init
or exit path. How does it work? And why does it need to be late init if
nothing is called from here?

> +
> +static void __exit kunit_exit(void)
> +{
> +}
> +module_exit(kunit_exit);
> +
> +MODULE_LICENSE("GPL");

I guess should be "GPL v2"?





[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux