diff mbox series

[bpf-next] selftests/bpf: consolidate VIRTIO/9P configs in the generic config file

Message ID 20231027212304.3354504-1-chantr4@gmail.com (mailing list archive)
State Changes Requested
Delegated to: BPF
Headers show
Series [bpf-next] selftests/bpf: consolidate VIRTIO/9P configs in the generic config file | expand

Checks

Context Check Description
bpf/vmtest-bpf-next-PR success PR summary
bpf/vmtest-bpf-next-VM_Test-0 success Logs for Lint
bpf/vmtest-bpf-next-VM_Test-1 success Logs for ShellCheck
bpf/vmtest-bpf-next-VM_Test-2 success Logs for Validate matrix.py
bpf/vmtest-bpf-next-VM_Test-3 success Logs for aarch64-gcc / build / build for aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-8 success Logs for aarch64-gcc / veristat
bpf/vmtest-bpf-next-VM_Test-9 pending Logs for s390x-gcc / build / build for s390x with gcc
bpf/vmtest-bpf-next-VM_Test-10 success Logs for set-matrix
bpf/vmtest-bpf-next-VM_Test-7 success Logs for aarch64-gcc / test (test_verifier, false, 360) / test_verifier on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-6 fail Logs for aarch64-gcc / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-4 success Logs for aarch64-gcc / test (test_maps, false, 360) / test_maps on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-5 fail Logs for aarch64-gcc / test (test_progs, false, 360) / test_progs on aarch64 with gcc
bpf/vmtest-bpf-next-VM_Test-12 success Logs for x86_64-gcc / test (test_maps, false, 360) / test_maps on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-13 fail Logs for x86_64-gcc / test (test_progs, false, 360) / test_progs on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-11 success Logs for x86_64-gcc / build / build for x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-16 success Logs for x86_64-gcc / test (test_progs_parallel, true, 30) / test_progs_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-14 fail Logs for x86_64-gcc / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-15 success Logs for x86_64-gcc / test (test_progs_no_alu32_parallel, true, 30) / test_progs_no_alu32_parallel on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-20 success Logs for x86_64-llvm-16 / test (test_maps, false, 360) / test_maps on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-17 success Logs for x86_64-gcc / test (test_verifier, false, 360) / test_verifier on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-22 fail Logs for x86_64-llvm-16 / test (test_progs_no_alu32, false, 360) / test_progs_no_alu32 on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-18 success Logs for x86_64-gcc / veristat / veristat on x86_64 with gcc
bpf/vmtest-bpf-next-VM_Test-19 success Logs for x86_64-llvm-16 / build / build for x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-23 success Logs for x86_64-llvm-16 / test (test_verifier, false, 360) / test_verifier on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-21 fail Logs for x86_64-llvm-16 / test (test_progs, false, 360) / test_progs on x86_64 with llvm-16
bpf/vmtest-bpf-next-VM_Test-24 success Logs for x86_64-llvm-16 / veristat
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for bpf-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 9 this patch: 9
netdev/cc_maintainers warning 4 maintainers not CCed: shuah@kernel.org mykolal@fb.com yonghong.song@linux.dev linux-kselftest@vger.kernel.org
netdev/build_clang success Errors and warnings before: 9 this patch: 9
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 9 this patch: 9
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 128 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Manu Bretelle Oct. 27, 2023, 9:23 p.m. UTC
Those configs are needed to be able to run VM somewhat consistently.
For instance, ATM, s390x is missing the `CONFIG_VIRTIO_CONSOLE` which
prevents s390x kernels built in CI to leverage qemu-guest-agent.

By moving them to `config`, we should have selftest kernels which are
equal in term of functionalities.

The set of config unabled were picked using

    grep -h -E '(_9P|_VIRTIO)' config.x86_64 config | sort | uniq

added to `config` and then
    grep -vE '(_9P|_VIRTIO)' config.{x86_64,aarch64,s390x}

as a side-effect, some config may have disappeared to the aarch64 and
s390x kernels, but they should not be needed. CI will tell.

Signed-off-by: Manu Bretelle <chantr4@gmail.com>
---
 tools/testing/selftests/bpf/config         | 13 +++++++++++++
 tools/testing/selftests/bpf/config.aarch64 | 16 ----------------
 tools/testing/selftests/bpf/config.s390x   |  9 ---------
 tools/testing/selftests/bpf/config.x86_64  | 12 ------------
 4 files changed, 13 insertions(+), 37 deletions(-)

Comments

Song Liu Oct. 27, 2023, 9:33 p.m. UTC | #1
On Fri, Oct 27, 2023 at 2:23 PM Manu Bretelle <chantr4@gmail.com> wrote:
>
> Those configs are needed to be able to run VM somewhat consistently.
> For instance, ATM, s390x is missing the `CONFIG_VIRTIO_CONSOLE` which
> prevents s390x kernels built in CI to leverage qemu-guest-agent.
>
> By moving them to `config`, we should have selftest kernels which are
> equal in term of functionalities.
>
> The set of config unabled were picked using
>
>     grep -h -E '(_9P|_VIRTIO)' config.x86_64 config | sort | uniq
>
> added to `config` and then
>     grep -vE '(_9P|_VIRTIO)' config.{x86_64,aarch64,s390x}
>
> as a side-effect, some config may have disappeared to the aarch64 and
> s390x kernels, but they should not be needed. CI will tell.
>
> Signed-off-by: Manu Bretelle <chantr4@gmail.com>
> ---
>  tools/testing/selftests/bpf/config         | 13 +++++++++++++
>  tools/testing/selftests/bpf/config.aarch64 | 16 ----------------
>  tools/testing/selftests/bpf/config.s390x   |  9 ---------
>  tools/testing/selftests/bpf/config.x86_64  | 12 ------------
>  4 files changed, 13 insertions(+), 37 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> index 3ec5927ec3e5..c22a068bc1de 100644
> --- a/tools/testing/selftests/bpf/config
> +++ b/tools/testing/selftests/bpf/config
> @@ -86,3 +86,16 @@ CONFIG_VXLAN=y
>  CONFIG_XDP_SOCKETS=y
>  CONFIG_XFRM_INTERFACE=y
>  CONFIG_VSOCKETS=y
> +# VIRTIO/9P configs to run in VMs
> +CONFIG_9P_FS_POSIX_ACL=y
> +CONFIG_9P_FS_SECURITY=y
> +CONFIG_9P_FS=y
> +CONFIG_CRYPTO_DEV_VIRTIO=y
> +CONFIG_NET_9P_VIRTIO=y
> +CONFIG_NET_9P=y
> +CONFIG_VIRTIO_BALLOON=y
> +CONFIG_VIRTIO_BLK=y
> +CONFIG_VIRTIO_CONSOLE=y
> +CONFIG_VIRTIO_NET=y
> +CONFIG_VIRTIO_PCI=y
> +CONFIG_VIRTIO_VSOCKETS_COMMON=y

Please keep these in alphabetical order.

Thanks,
Song
Andrii Nakryiko Oct. 27, 2023, 9:38 p.m. UTC | #2
On Fri, Oct 27, 2023 at 2:23 PM Manu Bretelle <chantr4@gmail.com> wrote:
>
> Those configs are needed to be able to run VM somewhat consistently.
> For instance, ATM, s390x is missing the `CONFIG_VIRTIO_CONSOLE` which
> prevents s390x kernels built in CI to leverage qemu-guest-agent.
>
> By moving them to `config`, we should have selftest kernels which are
> equal in term of functionalities.
>
> The set of config unabled were picked using
>
>     grep -h -E '(_9P|_VIRTIO)' config.x86_64 config | sort | uniq
>
> added to `config` and then
>     grep -vE '(_9P|_VIRTIO)' config.{x86_64,aarch64,s390x}
>
> as a side-effect, some config may have disappeared to the aarch64 and
> s390x kernels, but they should not be needed. CI will tell.
>
> Signed-off-by: Manu Bretelle <chantr4@gmail.com>
> ---
>  tools/testing/selftests/bpf/config         | 13 +++++++++++++
>  tools/testing/selftests/bpf/config.aarch64 | 16 ----------------
>  tools/testing/selftests/bpf/config.s390x   |  9 ---------
>  tools/testing/selftests/bpf/config.x86_64  | 12 ------------
>  4 files changed, 13 insertions(+), 37 deletions(-)
>
> diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> index 3ec5927ec3e5..c22a068bc1de 100644
> --- a/tools/testing/selftests/bpf/config
> +++ b/tools/testing/selftests/bpf/config

This config is meant to specify configuration necessary to run
selftests in general, not necessarily in BPF CI. So it's confusing and
unnecessary to add 9P_FS here, as strictly speaking that's not a
dependency.

So perhaps instead we should just have a "config.ci" file with all the
common configuration options necessary for BPF CI workflows to work?


> @@ -86,3 +86,16 @@ CONFIG_VXLAN=y
>  CONFIG_XDP_SOCKETS=y
>  CONFIG_XFRM_INTERFACE=y
>  CONFIG_VSOCKETS=y
> +# VIRTIO/9P configs to run in VMs
> +CONFIG_9P_FS_POSIX_ACL=y
> +CONFIG_9P_FS_SECURITY=y
> +CONFIG_9P_FS=y
> +CONFIG_CRYPTO_DEV_VIRTIO=y
> +CONFIG_NET_9P_VIRTIO=y
> +CONFIG_NET_9P=y
> +CONFIG_VIRTIO_BALLOON=y
> +CONFIG_VIRTIO_BLK=y
> +CONFIG_VIRTIO_CONSOLE=y
> +CONFIG_VIRTIO_NET=y
> +CONFIG_VIRTIO_PCI=y
> +CONFIG_VIRTIO_VSOCKETS_COMMON=y
> diff --git a/tools/testing/selftests/bpf/config.aarch64 b/tools/testing/selftests/bpf/config.aarch64
> index 253821494884..fa8ecf626c73 100644
> --- a/tools/testing/selftests/bpf/config.aarch64
> +++ b/tools/testing/selftests/bpf/config.aarch64
> @@ -1,4 +1,3 @@
> -CONFIG_9P_FS=y
>  CONFIG_ARCH_VEXPRESS=y
>  CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
>  CONFIG_ARM_SMMU_V3=y
> @@ -46,7 +45,6 @@ CONFIG_DEBUG_SG=y
>  CONFIG_DETECT_HUNG_TASK=y
>  CONFIG_DEVTMPFS_MOUNT=y
>  CONFIG_DEVTMPFS=y
> -CONFIG_DRM_VIRTIO_GPU=y
>  CONFIG_DRM=y
>  CONFIG_DUMMY=y
>  CONFIG_EXPERT=y
> @@ -67,7 +65,6 @@ CONFIG_HAVE_KRETPROBES=y
>  CONFIG_HEADERS_INSTALL=y
>  CONFIG_HIGH_RES_TIMERS=y
>  CONFIG_HUGETLBFS=y
> -CONFIG_HW_RANDOM_VIRTIO=y
>  CONFIG_HW_RANDOM=y
>  CONFIG_HZ_100=y
>  CONFIG_IDLE_PAGE_TRACKING=y
> @@ -99,8 +96,6 @@ CONFIG_MEMCG=y
>  CONFIG_MEMORY_HOTPLUG=y
>  CONFIG_MEMORY_HOTREMOVE=y
>  CONFIG_NAMESPACES=y
> -CONFIG_NET_9P_VIRTIO=y
> -CONFIG_NET_9P=y
>  CONFIG_NET_ACT_BPF=y
>  CONFIG_NET_ACT_GACT=y
>  CONFIG_NETDEVICES=y
> @@ -140,7 +135,6 @@ CONFIG_SCHED_TRACER=y
>  CONFIG_SCSI_CONSTANTS=y
>  CONFIG_SCSI_LOGGING=y
>  CONFIG_SCSI_SCAN_ASYNC=y
> -CONFIG_SCSI_VIRTIO=y
>  CONFIG_SCSI=y
>  CONFIG_SECURITY_NETWORK=y
>  CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
> @@ -167,16 +161,6 @@ CONFIG_UPROBES=y
>  CONFIG_USELIB=y
>  CONFIG_USER_NS=y
>  CONFIG_VETH=y
> -CONFIG_VIRTIO_BALLOON=y
> -CONFIG_VIRTIO_BLK=y
> -CONFIG_VIRTIO_CONSOLE=y
> -CONFIG_VIRTIO_FS=y
> -CONFIG_VIRTIO_INPUT=y
> -CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
> -CONFIG_VIRTIO_MMIO=y
> -CONFIG_VIRTIO_NET=y
> -CONFIG_VIRTIO_PCI=y
> -CONFIG_VIRTIO_VSOCKETS_COMMON=y
>  CONFIG_VLAN_8021Q=y
>  CONFIG_VSOCKETS=y
>  CONFIG_VSOCKETS_LOOPBACK=y
> diff --git a/tools/testing/selftests/bpf/config.s390x b/tools/testing/selftests/bpf/config.s390x
> index 2ba92167be35..e93330382849 100644
> --- a/tools/testing/selftests/bpf/config.s390x
> +++ b/tools/testing/selftests/bpf/config.s390x
> @@ -1,4 +1,3 @@
> -CONFIG_9P_FS=y
>  CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
>  CONFIG_AUDIT=y
>  CONFIG_BLK_CGROUP=y
> @@ -84,8 +83,6 @@ CONFIG_MEMORY_HOTPLUG=y
>  CONFIG_MEMORY_HOTREMOVE=y
>  CONFIG_NAMESPACES=y
>  CONFIG_NET=y
> -CONFIG_NET_9P=y
> -CONFIG_NET_9P_VIRTIO=y
>  CONFIG_NET_ACT_BPF=y
>  CONFIG_NET_ACT_GACT=y
>  CONFIG_NET_KEY=y
> @@ -114,7 +111,6 @@ CONFIG_SAMPLE_SECCOMP=y
>  CONFIG_SAMPLES=y
>  CONFIG_SCHED_TRACER=y
>  CONFIG_SCSI=y
> -CONFIG_SCSI_VIRTIO=y
>  CONFIG_SECURITY_NETWORK=y
>  CONFIG_STACK_TRACER=y
>  CONFIG_STATIC_KEYS_SELFTEST=y
> @@ -136,11 +132,6 @@ CONFIG_UPROBES=y
>  CONFIG_USELIB=y
>  CONFIG_USER_NS=y
>  CONFIG_VETH=y
> -CONFIG_VIRTIO_BALLOON=y
> -CONFIG_VIRTIO_BLK=y
> -CONFIG_VIRTIO_NET=y
> -CONFIG_VIRTIO_PCI=y
> -CONFIG_VIRTIO_VSOCKETS_COMMON=y
>  CONFIG_VLAN_8021Q=y
>  CONFIG_VSOCKETS=y
>  CONFIG_VSOCKETS_LOOPBACK=y
> diff --git a/tools/testing/selftests/bpf/config.x86_64 b/tools/testing/selftests/bpf/config.x86_64
> index 2e70a6048278..f7bfb2b09c82 100644
> --- a/tools/testing/selftests/bpf/config.x86_64
> +++ b/tools/testing/selftests/bpf/config.x86_64
> @@ -1,6 +1,3 @@
> -CONFIG_9P_FS=y
> -CONFIG_9P_FS_POSIX_ACL=y
> -CONFIG_9P_FS_SECURITY=y
>  CONFIG_AGP=y
>  CONFIG_AGP_AMD64=y
>  CONFIG_AGP_INTEL=y
> @@ -45,7 +42,6 @@ CONFIG_CPU_IDLE_GOV_LADDER=y
>  CONFIG_CPUSETS=y
>  CONFIG_CRC_T10DIF=y
>  CONFIG_CRYPTO_BLAKE2B=y
> -CONFIG_CRYPTO_DEV_VIRTIO=y
>  CONFIG_CRYPTO_SEQIV=y
>  CONFIG_CRYPTO_XXHASH=y
>  CONFIG_DCB=y
> @@ -145,8 +141,6 @@ CONFIG_MEMORY_FAILURE=y
>  CONFIG_MINIX_SUBPARTITION=y
>  CONFIG_NAMESPACES=y
>  CONFIG_NET=y
> -CONFIG_NET_9P=y
> -CONFIG_NET_9P_VIRTIO=y
>  CONFIG_NET_ACT_BPF=y
>  CONFIG_NET_CLS_CGROUP=y
>  CONFIG_NET_EMATCH=y
> @@ -228,12 +222,6 @@ CONFIG_USER_NS=y
>  CONFIG_VALIDATE_FS_PARSER=y
>  CONFIG_VETH=y
>  CONFIG_VIRT_DRIVERS=y
> -CONFIG_VIRTIO_BALLOON=y
> -CONFIG_VIRTIO_BLK=y
> -CONFIG_VIRTIO_CONSOLE=y
> -CONFIG_VIRTIO_NET=y
> -CONFIG_VIRTIO_PCI=y
> -CONFIG_VIRTIO_VSOCKETS_COMMON=y
>  CONFIG_VLAN_8021Q=y
>  CONFIG_VSOCKETS=y
>  CONFIG_VSOCKETS_LOOPBACK=y
> --
> 2.39.3
>
Manu Bretelle Oct. 28, 2023, 12:48 a.m. UTC | #3
On Fri, Oct 27, 2023 at 02:38:36PM -0700, Andrii Nakryiko wrote:
> On Fri, Oct 27, 2023 at 2:23 PM Manu Bretelle <chantr4@gmail.com> wrote:
> >
> > Those configs are needed to be able to run VM somewhat consistently.
> > For instance, ATM, s390x is missing the `CONFIG_VIRTIO_CONSOLE` which
> > prevents s390x kernels built in CI to leverage qemu-guest-agent.
> >
> > By moving them to `config`, we should have selftest kernels which are
> > equal in term of functionalities.
> >
> > The set of config unabled were picked using
> >
> >     grep -h -E '(_9P|_VIRTIO)' config.x86_64 config | sort | uniq
> >
> > added to `config` and then
> >     grep -vE '(_9P|_VIRTIO)' config.{x86_64,aarch64,s390x}
> >
> > as a side-effect, some config may have disappeared to the aarch64 and
> > s390x kernels, but they should not be needed. CI will tell.
> >
> > Signed-off-by: Manu Bretelle <chantr4@gmail.com>
> > ---
> >  tools/testing/selftests/bpf/config         | 13 +++++++++++++
> >  tools/testing/selftests/bpf/config.aarch64 | 16 ----------------
> >  tools/testing/selftests/bpf/config.s390x   |  9 ---------
> >  tools/testing/selftests/bpf/config.x86_64  | 12 ------------
> >  4 files changed, 13 insertions(+), 37 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> > index 3ec5927ec3e5..c22a068bc1de 100644
> > --- a/tools/testing/selftests/bpf/config
> > +++ b/tools/testing/selftests/bpf/config
> 
> This config is meant to specify configuration necessary to run
> selftests in general, not necessarily in BPF CI. So it's confusing and
> unnecessary to add 9P_FS here, as strictly speaking that's not a
> dependency.
> 

BPF CI is one, but there is also the *not so well maintained* vmtest.sh [0]
that relies on running in a VM.

> So perhaps instead we should just have a "config.ci" file with all the
> common configuration options necessary for BPF CI workflows to work?
> 
> 
That being said, I am fine moving it to a `config.ci` or `config.vm` and
updating vmtest.sh to include it if this is more desirable.

[0] https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/vmtest.sh?h=for-next&id=6808918343a8b4b6970ba52ba2d1d511a0976748

> > @@ -86,3 +86,16 @@ CONFIG_VXLAN=y
> >  CONFIG_XDP_SOCKETS=y
> >  CONFIG_XFRM_INTERFACE=y
> >  CONFIG_VSOCKETS=y
> > +# VIRTIO/9P configs to run in VMs
> > +CONFIG_9P_FS_POSIX_ACL=y
> > +CONFIG_9P_FS_SECURITY=y
> > +CONFIG_9P_FS=y
> > +CONFIG_CRYPTO_DEV_VIRTIO=y
> > +CONFIG_NET_9P_VIRTIO=y
> > +CONFIG_NET_9P=y
> > +CONFIG_VIRTIO_BALLOON=y
> > +CONFIG_VIRTIO_BLK=y
> > +CONFIG_VIRTIO_CONSOLE=y
> > +CONFIG_VIRTIO_NET=y
> > +CONFIG_VIRTIO_PCI=y
> > +CONFIG_VIRTIO_VSOCKETS_COMMON=y
> > diff --git a/tools/testing/selftests/bpf/config.aarch64 b/tools/testing/selftests/bpf/config.aarch64
> > index 253821494884..fa8ecf626c73 100644
> > --- a/tools/testing/selftests/bpf/config.aarch64
> > +++ b/tools/testing/selftests/bpf/config.aarch64
> > @@ -1,4 +1,3 @@
> > -CONFIG_9P_FS=y
> >  CONFIG_ARCH_VEXPRESS=y
> >  CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
> >  CONFIG_ARM_SMMU_V3=y
> > @@ -46,7 +45,6 @@ CONFIG_DEBUG_SG=y
> >  CONFIG_DETECT_HUNG_TASK=y
> >  CONFIG_DEVTMPFS_MOUNT=y
> >  CONFIG_DEVTMPFS=y
> > -CONFIG_DRM_VIRTIO_GPU=y
> >  CONFIG_DRM=y
> >  CONFIG_DUMMY=y
> >  CONFIG_EXPERT=y
> > @@ -67,7 +65,6 @@ CONFIG_HAVE_KRETPROBES=y
> >  CONFIG_HEADERS_INSTALL=y
> >  CONFIG_HIGH_RES_TIMERS=y
> >  CONFIG_HUGETLBFS=y
> > -CONFIG_HW_RANDOM_VIRTIO=y
> >  CONFIG_HW_RANDOM=y
> >  CONFIG_HZ_100=y
> >  CONFIG_IDLE_PAGE_TRACKING=y
> > @@ -99,8 +96,6 @@ CONFIG_MEMCG=y
> >  CONFIG_MEMORY_HOTPLUG=y
> >  CONFIG_MEMORY_HOTREMOVE=y
> >  CONFIG_NAMESPACES=y
> > -CONFIG_NET_9P_VIRTIO=y
> > -CONFIG_NET_9P=y
> >  CONFIG_NET_ACT_BPF=y
> >  CONFIG_NET_ACT_GACT=y
> >  CONFIG_NETDEVICES=y
> > @@ -140,7 +135,6 @@ CONFIG_SCHED_TRACER=y
> >  CONFIG_SCSI_CONSTANTS=y
> >  CONFIG_SCSI_LOGGING=y
> >  CONFIG_SCSI_SCAN_ASYNC=y
> > -CONFIG_SCSI_VIRTIO=y
> >  CONFIG_SCSI=y
> >  CONFIG_SECURITY_NETWORK=y
> >  CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
> > @@ -167,16 +161,6 @@ CONFIG_UPROBES=y
> >  CONFIG_USELIB=y
> >  CONFIG_USER_NS=y
> >  CONFIG_VETH=y
> > -CONFIG_VIRTIO_BALLOON=y
> > -CONFIG_VIRTIO_BLK=y
> > -CONFIG_VIRTIO_CONSOLE=y
> > -CONFIG_VIRTIO_FS=y
> > -CONFIG_VIRTIO_INPUT=y
> > -CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
> > -CONFIG_VIRTIO_MMIO=y
> > -CONFIG_VIRTIO_NET=y
> > -CONFIG_VIRTIO_PCI=y
> > -CONFIG_VIRTIO_VSOCKETS_COMMON=y
> >  CONFIG_VLAN_8021Q=y
> >  CONFIG_VSOCKETS=y
> >  CONFIG_VSOCKETS_LOOPBACK=y
> > diff --git a/tools/testing/selftests/bpf/config.s390x b/tools/testing/selftests/bpf/config.s390x
> > index 2ba92167be35..e93330382849 100644
> > --- a/tools/testing/selftests/bpf/config.s390x
> > +++ b/tools/testing/selftests/bpf/config.s390x
> > @@ -1,4 +1,3 @@
> > -CONFIG_9P_FS=y
> >  CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
> >  CONFIG_AUDIT=y
> >  CONFIG_BLK_CGROUP=y
> > @@ -84,8 +83,6 @@ CONFIG_MEMORY_HOTPLUG=y
> >  CONFIG_MEMORY_HOTREMOVE=y
> >  CONFIG_NAMESPACES=y
> >  CONFIG_NET=y
> > -CONFIG_NET_9P=y
> > -CONFIG_NET_9P_VIRTIO=y
> >  CONFIG_NET_ACT_BPF=y
> >  CONFIG_NET_ACT_GACT=y
> >  CONFIG_NET_KEY=y
> > @@ -114,7 +111,6 @@ CONFIG_SAMPLE_SECCOMP=y
> >  CONFIG_SAMPLES=y
> >  CONFIG_SCHED_TRACER=y
> >  CONFIG_SCSI=y
> > -CONFIG_SCSI_VIRTIO=y
> >  CONFIG_SECURITY_NETWORK=y
> >  CONFIG_STACK_TRACER=y
> >  CONFIG_STATIC_KEYS_SELFTEST=y
> > @@ -136,11 +132,6 @@ CONFIG_UPROBES=y
> >  CONFIG_USELIB=y
> >  CONFIG_USER_NS=y
> >  CONFIG_VETH=y
> > -CONFIG_VIRTIO_BALLOON=y
> > -CONFIG_VIRTIO_BLK=y
> > -CONFIG_VIRTIO_NET=y
> > -CONFIG_VIRTIO_PCI=y
> > -CONFIG_VIRTIO_VSOCKETS_COMMON=y
> >  CONFIG_VLAN_8021Q=y
> >  CONFIG_VSOCKETS=y
> >  CONFIG_VSOCKETS_LOOPBACK=y
> > diff --git a/tools/testing/selftests/bpf/config.x86_64 b/tools/testing/selftests/bpf/config.x86_64
> > index 2e70a6048278..f7bfb2b09c82 100644
> > --- a/tools/testing/selftests/bpf/config.x86_64
> > +++ b/tools/testing/selftests/bpf/config.x86_64
> > @@ -1,6 +1,3 @@
> > -CONFIG_9P_FS=y
> > -CONFIG_9P_FS_POSIX_ACL=y
> > -CONFIG_9P_FS_SECURITY=y
> >  CONFIG_AGP=y
> >  CONFIG_AGP_AMD64=y
> >  CONFIG_AGP_INTEL=y
> > @@ -45,7 +42,6 @@ CONFIG_CPU_IDLE_GOV_LADDER=y
> >  CONFIG_CPUSETS=y
> >  CONFIG_CRC_T10DIF=y
> >  CONFIG_CRYPTO_BLAKE2B=y
> > -CONFIG_CRYPTO_DEV_VIRTIO=y
> >  CONFIG_CRYPTO_SEQIV=y
> >  CONFIG_CRYPTO_XXHASH=y
> >  CONFIG_DCB=y
> > @@ -145,8 +141,6 @@ CONFIG_MEMORY_FAILURE=y
> >  CONFIG_MINIX_SUBPARTITION=y
> >  CONFIG_NAMESPACES=y
> >  CONFIG_NET=y
> > -CONFIG_NET_9P=y
> > -CONFIG_NET_9P_VIRTIO=y
> >  CONFIG_NET_ACT_BPF=y
> >  CONFIG_NET_CLS_CGROUP=y
> >  CONFIG_NET_EMATCH=y
> > @@ -228,12 +222,6 @@ CONFIG_USER_NS=y
> >  CONFIG_VALIDATE_FS_PARSER=y
> >  CONFIG_VETH=y
> >  CONFIG_VIRT_DRIVERS=y
> > -CONFIG_VIRTIO_BALLOON=y
> > -CONFIG_VIRTIO_BLK=y
> > -CONFIG_VIRTIO_CONSOLE=y
> > -CONFIG_VIRTIO_NET=y
> > -CONFIG_VIRTIO_PCI=y
> > -CONFIG_VIRTIO_VSOCKETS_COMMON=y
> >  CONFIG_VLAN_8021Q=y
> >  CONFIG_VSOCKETS=y
> >  CONFIG_VSOCKETS_LOOPBACK=y
> > --
> > 2.39.3
> >
Manu Bretelle Oct. 28, 2023, 12:53 a.m. UTC | #4
On Fri, Oct 27, 2023 at 02:33:34PM -0700, Song Liu wrote:
> On Fri, Oct 27, 2023 at 2:23 PM Manu Bretelle <chantr4@gmail.com> wrote:
> >
> > Those configs are needed to be able to run VM somewhat consistently.
> > For instance, ATM, s390x is missing the `CONFIG_VIRTIO_CONSOLE` which
> > prevents s390x kernels built in CI to leverage qemu-guest-agent.
> >
> > By moving them to `config`, we should have selftest kernels which are
> > equal in term of functionalities.
> >
> > The set of config unabled were picked using
> >
> >     grep -h -E '(_9P|_VIRTIO)' config.x86_64 config | sort | uniq
> >
> > added to `config` and then
> >     grep -vE '(_9P|_VIRTIO)' config.{x86_64,aarch64,s390x}
> >
> > as a side-effect, some config may have disappeared to the aarch64 and
> > s390x kernels, but they should not be needed. CI will tell.
> >
> > Signed-off-by: Manu Bretelle <chantr4@gmail.com>
> > ---
> >  tools/testing/selftests/bpf/config         | 13 +++++++++++++
> >  tools/testing/selftests/bpf/config.aarch64 | 16 ----------------
> >  tools/testing/selftests/bpf/config.s390x   |  9 ---------
> >  tools/testing/selftests/bpf/config.x86_64  | 12 ------------
> >  4 files changed, 13 insertions(+), 37 deletions(-)
> >
> > diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
> > index 3ec5927ec3e5..c22a068bc1de 100644
> > --- a/tools/testing/selftests/bpf/config
> > +++ b/tools/testing/selftests/bpf/config
> > @@ -86,3 +86,16 @@ CONFIG_VXLAN=y
> >  CONFIG_XDP_SOCKETS=y
> >  CONFIG_XFRM_INTERFACE=y
> >  CONFIG_VSOCKETS=y
> > +# VIRTIO/9P configs to run in VMs
> > +CONFIG_9P_FS_POSIX_ACL=y
> > +CONFIG_9P_FS_SECURITY=y
> > +CONFIG_9P_FS=y
> > +CONFIG_CRYPTO_DEV_VIRTIO=y
> > +CONFIG_NET_9P_VIRTIO=y
> > +CONFIG_NET_9P=y
> > +CONFIG_VIRTIO_BALLOON=y
> > +CONFIG_VIRTIO_BLK=y
> > +CONFIG_VIRTIO_CONSOLE=y
> > +CONFIG_VIRTIO_NET=y
> > +CONFIG_VIRTIO_PCI=y
> > +CONFIG_VIRTIO_VSOCKETS_COMMON=y
> 
> Please keep these in alphabetical order.
> 

ACK, I wanted to keep those related configs together, but by moving it to a
different file, per Andrii comment, that will address 2 birds with one stone.

While at it, I can probably sort the current files, which seem out of order
(per sort result).

> Thanks,
> Song
diff mbox series

Patch

diff --git a/tools/testing/selftests/bpf/config b/tools/testing/selftests/bpf/config
index 3ec5927ec3e5..c22a068bc1de 100644
--- a/tools/testing/selftests/bpf/config
+++ b/tools/testing/selftests/bpf/config
@@ -86,3 +86,16 @@  CONFIG_VXLAN=y
 CONFIG_XDP_SOCKETS=y
 CONFIG_XFRM_INTERFACE=y
 CONFIG_VSOCKETS=y
+# VIRTIO/9P configs to run in VMs
+CONFIG_9P_FS_POSIX_ACL=y
+CONFIG_9P_FS_SECURITY=y
+CONFIG_9P_FS=y
+CONFIG_CRYPTO_DEV_VIRTIO=y
+CONFIG_NET_9P_VIRTIO=y
+CONFIG_NET_9P=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_VIRTIO_NET=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_VSOCKETS_COMMON=y
diff --git a/tools/testing/selftests/bpf/config.aarch64 b/tools/testing/selftests/bpf/config.aarch64
index 253821494884..fa8ecf626c73 100644
--- a/tools/testing/selftests/bpf/config.aarch64
+++ b/tools/testing/selftests/bpf/config.aarch64
@@ -1,4 +1,3 @@ 
-CONFIG_9P_FS=y
 CONFIG_ARCH_VEXPRESS=y
 CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
 CONFIG_ARM_SMMU_V3=y
@@ -46,7 +45,6 @@  CONFIG_DEBUG_SG=y
 CONFIG_DETECT_HUNG_TASK=y
 CONFIG_DEVTMPFS_MOUNT=y
 CONFIG_DEVTMPFS=y
-CONFIG_DRM_VIRTIO_GPU=y
 CONFIG_DRM=y
 CONFIG_DUMMY=y
 CONFIG_EXPERT=y
@@ -67,7 +65,6 @@  CONFIG_HAVE_KRETPROBES=y
 CONFIG_HEADERS_INSTALL=y
 CONFIG_HIGH_RES_TIMERS=y
 CONFIG_HUGETLBFS=y
-CONFIG_HW_RANDOM_VIRTIO=y
 CONFIG_HW_RANDOM=y
 CONFIG_HZ_100=y
 CONFIG_IDLE_PAGE_TRACKING=y
@@ -99,8 +96,6 @@  CONFIG_MEMCG=y
 CONFIG_MEMORY_HOTPLUG=y
 CONFIG_MEMORY_HOTREMOVE=y
 CONFIG_NAMESPACES=y
-CONFIG_NET_9P_VIRTIO=y
-CONFIG_NET_9P=y
 CONFIG_NET_ACT_BPF=y
 CONFIG_NET_ACT_GACT=y
 CONFIG_NETDEVICES=y
@@ -140,7 +135,6 @@  CONFIG_SCHED_TRACER=y
 CONFIG_SCSI_CONSTANTS=y
 CONFIG_SCSI_LOGGING=y
 CONFIG_SCSI_SCAN_ASYNC=y
-CONFIG_SCSI_VIRTIO=y
 CONFIG_SCSI=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
@@ -167,16 +161,6 @@  CONFIG_UPROBES=y
 CONFIG_USELIB=y
 CONFIG_USER_NS=y
 CONFIG_VETH=y
-CONFIG_VIRTIO_BALLOON=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIRTIO_CONSOLE=y
-CONFIG_VIRTIO_FS=y
-CONFIG_VIRTIO_INPUT=y
-CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
-CONFIG_VIRTIO_MMIO=y
-CONFIG_VIRTIO_NET=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_VIRTIO_VSOCKETS_COMMON=y
 CONFIG_VLAN_8021Q=y
 CONFIG_VSOCKETS=y
 CONFIG_VSOCKETS_LOOPBACK=y
diff --git a/tools/testing/selftests/bpf/config.s390x b/tools/testing/selftests/bpf/config.s390x
index 2ba92167be35..e93330382849 100644
--- a/tools/testing/selftests/bpf/config.s390x
+++ b/tools/testing/selftests/bpf/config.s390x
@@ -1,4 +1,3 @@ 
-CONFIG_9P_FS=y
 CONFIG_ARCH_WANT_DEFAULT_BPF_JIT=y
 CONFIG_AUDIT=y
 CONFIG_BLK_CGROUP=y
@@ -84,8 +83,6 @@  CONFIG_MEMORY_HOTPLUG=y
 CONFIG_MEMORY_HOTREMOVE=y
 CONFIG_NAMESPACES=y
 CONFIG_NET=y
-CONFIG_NET_9P=y
-CONFIG_NET_9P_VIRTIO=y
 CONFIG_NET_ACT_BPF=y
 CONFIG_NET_ACT_GACT=y
 CONFIG_NET_KEY=y
@@ -114,7 +111,6 @@  CONFIG_SAMPLE_SECCOMP=y
 CONFIG_SAMPLES=y
 CONFIG_SCHED_TRACER=y
 CONFIG_SCSI=y
-CONFIG_SCSI_VIRTIO=y
 CONFIG_SECURITY_NETWORK=y
 CONFIG_STACK_TRACER=y
 CONFIG_STATIC_KEYS_SELFTEST=y
@@ -136,11 +132,6 @@  CONFIG_UPROBES=y
 CONFIG_USELIB=y
 CONFIG_USER_NS=y
 CONFIG_VETH=y
-CONFIG_VIRTIO_BALLOON=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIRTIO_NET=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_VIRTIO_VSOCKETS_COMMON=y
 CONFIG_VLAN_8021Q=y
 CONFIG_VSOCKETS=y
 CONFIG_VSOCKETS_LOOPBACK=y
diff --git a/tools/testing/selftests/bpf/config.x86_64 b/tools/testing/selftests/bpf/config.x86_64
index 2e70a6048278..f7bfb2b09c82 100644
--- a/tools/testing/selftests/bpf/config.x86_64
+++ b/tools/testing/selftests/bpf/config.x86_64
@@ -1,6 +1,3 @@ 
-CONFIG_9P_FS=y
-CONFIG_9P_FS_POSIX_ACL=y
-CONFIG_9P_FS_SECURITY=y
 CONFIG_AGP=y
 CONFIG_AGP_AMD64=y
 CONFIG_AGP_INTEL=y
@@ -45,7 +42,6 @@  CONFIG_CPU_IDLE_GOV_LADDER=y
 CONFIG_CPUSETS=y
 CONFIG_CRC_T10DIF=y
 CONFIG_CRYPTO_BLAKE2B=y
-CONFIG_CRYPTO_DEV_VIRTIO=y
 CONFIG_CRYPTO_SEQIV=y
 CONFIG_CRYPTO_XXHASH=y
 CONFIG_DCB=y
@@ -145,8 +141,6 @@  CONFIG_MEMORY_FAILURE=y
 CONFIG_MINIX_SUBPARTITION=y
 CONFIG_NAMESPACES=y
 CONFIG_NET=y
-CONFIG_NET_9P=y
-CONFIG_NET_9P_VIRTIO=y
 CONFIG_NET_ACT_BPF=y
 CONFIG_NET_CLS_CGROUP=y
 CONFIG_NET_EMATCH=y
@@ -228,12 +222,6 @@  CONFIG_USER_NS=y
 CONFIG_VALIDATE_FS_PARSER=y
 CONFIG_VETH=y
 CONFIG_VIRT_DRIVERS=y
-CONFIG_VIRTIO_BALLOON=y
-CONFIG_VIRTIO_BLK=y
-CONFIG_VIRTIO_CONSOLE=y
-CONFIG_VIRTIO_NET=y
-CONFIG_VIRTIO_PCI=y
-CONFIG_VIRTIO_VSOCKETS_COMMON=y
 CONFIG_VLAN_8021Q=y
 CONFIG_VSOCKETS=y
 CONFIG_VSOCKETS_LOOPBACK=y