lkml.org 
[lkml]   [2022]   [Jun]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH] kunit: tool: Enable virtio/PCI by default on UML
On Tue, Jun 21, 2022 at 8:53 PM David Gow <davidgow@google.com> wrote:
>
> There are several tests which depend on PCI, and hence need a bunch of
> extra options to run under UML. This makes it awkward to give
> configuration instructions (whether in documentation, or as part of a
> .kunitconfig file), as two separate, incompatible sets of config options
> are required for UML and "most other architectures".
>
> For non-UML architectures, it's possible to add default kconfig options
> via the qemu_config python files, but there's no equivalent for UML. Add
> a new tools/testing/kunit/configs/arch_uml.config file containing extra
> kconfig options to use on UML.
>
> Signed-off-by: David Gow <davidgow@google.com>
> ---
>
> It's really ugly to have to type:
> --kconfig_add CONFIG_VIRTIO_UML=y
> --kconfig_add CONFIG_UML_PCI_OVER_VIRTIO=y
> when running many tests under UML, particularly since it isn't required
> on other architectures.
>
> This came up in discussion with Daniel this morning, and while the
> ability to repeat the --kunitconfig flag would go some way to alleviate
> this, having to add:
> --kunitconfig ./tools/testing/kunit/config/uml_pci.kunitconfig
> isn't all that much better.
>
> So it seems like adding something by default would be nice.
>
> This implementation is not perfect (in particular, there's no easy way
> of _disabling_ these options now, though [1] probably will help). The

I assume the missing link for [1] is
https://lore.kernel.org/linux-kselftest/20220520224200.3764027-1-dlatypov@google.com/
Note that we'll have to update one of these patches depending on the
order they go in.

[1] had to change make_arch_qemuconfig() to ensure that arch/qemu
configs have *lower* priority than user-specified overrides.
So we'll either need to do the same here or update [1] for this to work out.

> 'arch_uml.config' filename can be bikeshedded, too.
>
> Thoughts?

I was initially against effectively hard-coding these in, but it feels
like making CONFIG_PCI=y work by default on UML is worth it.

We've talked about architecture-specific options in kunitconfig files
and it's only ever been about PCI. Nothing else has come up yet, so
this patch would eliminate that concern for now.

\
 
 \ /
  Last update: 2022-06-22 18:02    [W:0.043 / U:0.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site