From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Subject: Re: [PATCH v3 3/7] kunit: tests for stats_fs API References: <20200526110318.69006-1-eesposit@redhat.com> <20200526110318.69006-4-eesposit@redhat.com> From: Emanuele Giuseppe Esposito Message-ID: <7178ea00-cee5-d5e9-a7aa-58aa46ee416a@redhat.com> Date: Wed, 27 May 2020 15:26:55 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kselftest-owner@vger.kernel.org List-ID: To: Alan Maguire Cc: kvm@vger.kernel.org, Christian Borntraeger , Paolo Bonzini , Jim Mattson , Alexander Viro , Emanuele Giuseppe Esposito , David Rientjes , Jonathan Adams , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mips@vger.kernel.org, kvm-ppc@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-s390@vger.kernel.org, linux-fsdevel@vger.kernel.org, netdev@vger.kernel.org, brendanhiggins@google.com, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com >> In order to run them, the kernel .config must set CONFIG_KUNIT=y >> and a new .kunitconfig file must be created with CONFIG_STATS_FS=y >> and CONFIG_STATS_FS_TEST=y >> > > It looks like CONFIG_STATS_FS is built-in, but it exports > much of the functionality you are testing. However could the > tests also be built as a module (i.e. make CONFIG_STATS_FS_TEST > a tristate variable)? To test this you'd need to specify > CONFIG_KUNIT=m and CONFIG_STATS_FS_TEST=m, and testing would > simply be a case of "modprobe"ing the stats fs module and collecting > results in /sys/kernel/debug/kunit/ (rather > than running kunit.py). Are you relying on unexported internals in > the the tests that would prevent building them as a module? > I haven't checked it yet, but tests should work as separate module. I will look into it, thanks. Emanuele