Re: [PATCH v4 3/3] configfs: Add unit tests
From: Bart Van Assche
Date: Tue Aug 10 2021 - 23:13:38 EST
On 8/10/21 3:00 PM, Brendan Higgins wrote:
> On Mon, Aug 9, 2021 at 7:59 AM Christoph Hellwig <hch@xxxxxx> wrote:
>>
>>> text and binary attribute support. This is how I run these tests:
>>>
>>> set -e
>>> if [ -e .config ]; then
>>> make ARCH=um mrproper
>>> fi
>>> if [ ! -e .kunit/.kunitconfig ]; then
>>> cat <<EOF >.kunit/.kunitconfig
>>> CONFIG_CONFIGFS_FS=y
>>> CONFIG_CONFIGFS_KUNIT_TEST=y
>>> CONFIG_KUNIT=y
>>> CONFIG_PROVE_LOCKING=y
>>> CONFIG_SYSFS=y
>>> CONFIG_UBSAN=y
>>> EOF
>>> cp .kunit/.kunitconfig .kunit/.config
>>> fi
>>> ./tools/testing/kunit/kunit.py run
>>
>> This is very useful documentation, but shouldn't it go into a README.kunit
>> or similar instead of a commit message?
>
> You could also put this in a .kunitconfig specific to your subsystem
> like we did for ext4:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/fs/ext4/.kunitconfig
>
> You can then build using this .kunitconfig with something like:
>
> ./tools/testing/kunit/kunit.py run --kunitconfig=fs/ext4/.kunitconfig
Will look into this. Thanks for the feedback!
Bart.