diff --git a/.github/workflows/test_x86.yml b/.github/workflows/test_x86.yml index 2481bcea0..5b25f3dbe 100644 --- a/.github/workflows/test_x86.yml +++ b/.github/workflows/test_x86.yml @@ -93,6 +93,15 @@ jobs: - test_id: 'general-multiboot2-smp4' boot_protocol: 'multiboot2' smp: 4 + + # Linux Kernel Selftests (Linux EFI Handover) (Debug Build) + - test_id: 'kselftest-handover64-debug' + release: false + boot_protocol: 'linux-efi-handover64' + # SMP Linux Kernel Selftests (Multiboot2) + - test_id: 'kselftest-multiboot2-smp4' + boot_protocol: 'multiboot2' + smp: 4 fail-fast: false steps: - name: Free disk space @@ -103,6 +112,7 @@ jobs: uses: ./.github/actions/test with: auto_test: ${{ (startsWith(matrix.test_id, 'boot') && 'boot') || + (startsWith(matrix.test_id, 'kselftest') && 'kselftest') || (startsWith(matrix.test_id, 'syscall') && 'syscall') || 'test' }} release: ${{ !contains(matrix.release, 'false') }} enable_kvm: ${{ !contains(matrix.enable_kvm, 'false') }} @@ -118,6 +128,7 @@ jobs: uses: ./.github/actions/test with: auto_test: ${{ (startsWith(matrix.test_id, 'boot') && 'boot') || + (startsWith(matrix.test_id, 'kselftest') && 'kselftest') || (startsWith(matrix.test_id, 'syscall') && 'syscall') || 'test' }} release: ${{ !contains(matrix.release, 'false') }} enable_kvm: ${{ !contains(matrix.enable_kvm, 'false') }} diff --git a/.typos.toml b/.typos.toml index e498394cb..27f0edf9b 100644 --- a/.typos.toml +++ b/.typos.toml @@ -35,6 +35,8 @@ check-file = false # Files listed below are ignored to check. [files] extend-exclude = [ + "test/initramfs/src/kselftest/blocklists/damon", + "test/initramfs/build/initramfs/test/kselftest/blocklists/damon", "test/initramfs/src/syscall/gvisor/blocklists/pty_test", "test/initramfs/build/initramfs/opt/gvisor/blocklists/pty_test", "test/initramfs/src/syscall/gvisor/blocklists/sync_test", diff --git a/Makefile b/Makefile index 3abb2734a..7aa415710 100644 --- a/Makefile +++ b/Makefile @@ -96,6 +96,9 @@ CARGO_OSDK_BUILD_ARGS += --kcmd-args="SYSCALL_TEST_SUITE=$(SYSCALL_TEST_SUITE)" CARGO_OSDK_BUILD_ARGS += --kcmd-args="SYSCALL_TEST_WORKDIR=$(SYSCALL_TEST_WORKDIR)" CARGO_OSDK_BUILD_ARGS += --kcmd-args="EXTRA_BLOCKLISTS_DIRS=$(EXTRA_BLOCKLISTS_DIRS)" CARGO_OSDK_BUILD_ARGS += --init-args="/opt/syscall_test/run_syscall_test.sh" +else ifeq ($(AUTO_TEST), kselftest) +ENABLE_KSELFTEST_TEST := true +CARGO_OSDK_BUILD_ARGS += --init-args="/test/kselftest/run_kselftest.sh" else ifeq ($(AUTO_TEST), test) ENABLE_BASIC_TEST := true ifneq ($(SMP), 1) @@ -310,6 +313,9 @@ run_kernel: initramfs $(CARGO_OSDK) ifeq ($(AUTO_TEST), syscall) @tail --lines 100 qemu.log | grep -q "^All syscall tests passed." \ || (echo "Syscall test failed" && exit 1) +else ifeq ($(AUTO_TEST), kselftest) + @tail --lines 100 qemu.log | grep -q "^All kselftest tests passed." \ + || (echo "Kselftest test failed" && exit 1) else ifeq ($(AUTO_TEST), test) @tail --lines 100 qemu.log | grep -q "^All general tests passed." \ || (echo "General test failed" && exit 1) diff --git a/test/initramfs/Makefile b/test/initramfs/Makefile index c6d195f63..b95e0e658 100644 --- a/test/initramfs/Makefile +++ b/test/initramfs/Makefile @@ -6,6 +6,7 @@ VERBOSE ?= 1 SYSCALL_TEST_SUITE ?= ltp SYSCALL_TEST_WORKDIR ?= /tmp ENABLE_BASIC_TEST ?= false +ENABLE_KSELFTEST_TEST ?= false # Specify platform macros when building regression tests (supported: asterinas, linux). # - asterinas: Define both `__asterinas__` and `__linux__`. Tests may fail in Linux. # - linux: Define only `__linux__`. Tests may fail in Asterinas. @@ -69,6 +70,7 @@ $(INITRAMFS_IMAGE): $(INITRAMFS) --argstr basicTestPlatform $(BASIC_TEST_PLATFORM) \ --arg enableBenchmark $(ENABLE_BENCHMARK) \ --arg enableSyscallTest $(ENABLE_SYSCALL_TEST) \ + --arg enableKselfTest $(ENABLE_KSELFTEST_TEST) \ --argstr syscallTestSuite $(SYSCALL_TEST_SUITE) \ --argstr syscallTestWorkDir $(SYSCALL_TEST_WORKDIR) \ --argstr dnsServer ${DNS_SERVER} \ @@ -86,6 +88,7 @@ $(INITRAMFS): --argstr basicTestPlatform $(BASIC_TEST_PLATFORM) \ --arg enableBenchmark $(ENABLE_BENCHMARK) \ --arg enableSyscallTest $(ENABLE_SYSCALL_TEST) \ + --arg enableKselfTest $(ENABLE_KSELFTEST_TEST) \ --argstr syscallTestSuite $(SYSCALL_TEST_SUITE) \ --argstr syscallTestWorkDir $(SYSCALL_TEST_WORKDIR) \ --argstr dnsServer ${DNS_SERVER} \ diff --git a/test/initramfs/nix/default.nix b/test/initramfs/nix/default.nix index 02c779e3a..53216f78f 100644 --- a/test/initramfs/nix/default.nix +++ b/test/initramfs/nix/default.nix @@ -1,7 +1,7 @@ { target ? "x86_64", enableBasicTest ? false, basicTestPlatform ? "asterinas" -, enableBenchmark ? false, enableSyscallTest ? false, syscallTestSuite ? "ltp" -, syscallTestWorkDir ? "/tmp", dnsServer ? "none", smp ? 1 -, initramfsCompressed ? true, }: +, enableBenchmark ? false, enableSyscallTest ? false, enableKselfTest ? false +, syscallTestSuite ? "ltp", syscallTestWorkDir ? "/tmp", dnsServer ? "none" +, smp ? 1, initramfsCompressed ? true, }: let crossSystem.config = if target == "x86_64" then "x86_64-unknown-linux-gnu" @@ -26,6 +26,7 @@ in rec { apps = pkgs.callPackage ./apps.nix { testPlatform = basicTestPlatform; }; busybox = pkgs.busybox; benchmark = pkgs.callPackage ./benchmark { }; + kselftest = pkgs.callPackage ./kselftest.nix { }; syscall = pkgs.callPackage ./syscall { inherit smp; testSuite = syscallTestSuite; @@ -35,6 +36,7 @@ in rec { inherit busybox; apps = if enableBasicTest then apps else null; benchmark = if enableBenchmark then benchmark else null; + kselftest = if enableKselfTest then kselftest else null; syscall = if enableSyscallTest then syscall else null; dnsServer = dnsServer; }; diff --git a/test/initramfs/nix/initramfs.nix b/test/initramfs/nix/initramfs.nix index a2a0c095a..c3a4886d0 100644 --- a/test/initramfs/nix/initramfs.nix +++ b/test/initramfs/nix/initramfs.nix @@ -1,5 +1,5 @@ { lib, stdenvNoCC, fetchFromGitHub, hostPlatform, writeClosure, busybox, apps -, benchmark, syscall, dnsServer, pkgs }: +, benchmark, kselftest, syscall, dnsServer, pkgs }: let etc = lib.fileset.toSource { root = ./../src/etc; @@ -18,6 +18,7 @@ let all_pkgs = [ busybox etc resolv_conf ] ++ lib.optionals (apps != null) [ apps.package ] ++ lib.optionals (benchmark != null) [ benchmark.package ] + ++ lib.optionals (kselftest != null) [ kselftest.package ] ++ lib.optionals (syscall != null) [ syscall.package ] ++ lib.optionals is_evtest_included [ pkgs.evtest ]; in stdenvNoCC.mkDerivation { @@ -43,6 +44,10 @@ in stdenvNoCC.mkDerivation { cp -r ${apps.package}/* $out/test/ ''} + ${lib.optionalString (kselftest != null) '' + cp -r ${kselftest.package}/* $out/test/ + ''} + ${lib.optionalString (benchmark != null) '' cp -r "${benchmark.package}"/* $out/benchmark/ ''} diff --git a/test/initramfs/nix/kselftest.nix b/test/initramfs/nix/kselftest.nix new file mode 100644 index 000000000..9e0912714 --- /dev/null +++ b/test/initramfs/nix/kselftest.nix @@ -0,0 +1,90 @@ +{ lib, stdenv, fetchFromGitHub, replaceVarsWith, pkgsBuildBuild, pkgsBuildHost, +}: rec { + kselftest = stdenv.mkDerivation rec { + pname = "kselftest-bin"; + version = "6.18"; + src = fetchFromGitHub { + owner = "torvalds"; + repo = "linux"; + tag = "v${version}"; + hash = "sha256-F1vg95nMGiXk9zbUzg+/hUq+RjXdFmtN530b7QuqkMc"; + }; + + nativeBuildInputs = with pkgsBuildBuild; [ + bison + flex + gcc_multi + rsync + pkg-config + python312 + python312Packages.pyyaml + python312Packages.jsonschema + ]; + + buildInputs = with pkgsBuildHost; [ + alsa-lib.dev + elfutils.dev + fuse.dev + glibc_multi + glibc_multi.static + libcap.dev + libcap_ng.dev + libelf + libmnl + libnl.dev + liburing.dev + mbedtls + numactl.dev + openssl.dev + popt + zlib.dev + ]; + + configurePhase = '' + runHook preConfigure + + patchShebangs tools/net/ynl/pyynl + sed -i '206d' tools/testing/selftests/net/Makefile # FIXME: bpf build fails + sed -i '17d' tools/testing/selftests/cgroup/Makefile # FIXME: test_memcontrol build fails + make defconfig + + runHook postConfigure + ''; + + buildPhase = '' + runHook preBuild + + make kselftest-all + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + make KSFT_INSTALL_PATH=$out kselftest-install + + runHook postInstall + ''; + }; + + run_kselftest = replaceVarsWith { + src = ./../src/kselftest/run_kselftest.sh; + replacements = { inherit kselftest; }; + isExecutable = true; + }; + + package = stdenv.mkDerivation { + pname = "kselftest"; + version = "0.1.0"; + src = lib.fileset.toSource { + root = ./../src/kselftest; + fileset = ./../src/kselftest; + }; + buildCommand = '' + mkdir -p $out/kselftest + cp -r $src/blocklists $out/kselftest + cp ${run_kselftest} $out/kselftest/run_kselftest.sh + ''; + }; +} diff --git a/test/initramfs/src/kselftest/blocklists/acct b/test/initramfs/src/kselftest/blocklists/acct new file mode 100644 index 000000000..a45b6de40 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/acct @@ -0,0 +1 @@ +acct:acct_syscall \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/alsa b/test/initramfs/src/kselftest/blocklists/alsa new file mode 100644 index 000000000..b1c570e41 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/alsa @@ -0,0 +1,4 @@ +alsa:mixer-test +alsa:pcm-test +alsa:test-pcmtest-driver +alsa:utimer-test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/amd-pstate b/test/initramfs/src/kselftest/blocklists/amd-pstate new file mode 100644 index 000000000..835bda683 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/amd-pstate @@ -0,0 +1 @@ +amd-pstate:run.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/breakpoints b/test/initramfs/src/kselftest/blocklists/breakpoints new file mode 100644 index 000000000..65b33d93b --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/breakpoints @@ -0,0 +1 @@ +breakpoints:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/cachestat b/test/initramfs/src/kselftest/blocklists/cachestat new file mode 100644 index 000000000..0dea2237d --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/cachestat @@ -0,0 +1 @@ +cachestat:test_cachestat \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/capabilities b/test/initramfs/src/kselftest/blocklists/capabilities new file mode 100644 index 000000000..cc18cec90 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/capabilities @@ -0,0 +1 @@ +capabilities:test_execve \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/cgroup b/test/initramfs/src/kselftest/blocklists/cgroup new file mode 100644 index 000000000..1a59a49aa --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/cgroup @@ -0,0 +1,12 @@ +cgroup:test_core +cgroup:test_cpu +cgroup:test_cpuset +cgroup:test_freezer +cgroup:test_hugetlb_memcg +cgroup:test_kill +cgroup:test_kmem +cgroup:test_pids +cgroup:test_zswap +cgroup:test_stress.sh +cgroup:test_cpuset_prs.sh +cgroup:test_cpuset_v1_hp.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/clone3 b/test/initramfs/src/kselftest/blocklists/clone3 new file mode 100644 index 000000000..951f5c363 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/clone3 @@ -0,0 +1,4 @@ +clone3:clone3 +clone3:clone3_clear_sighand +clone3:clone3_set_tid +clone3:clone3_cap_checkpoint_restore \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/connector b/test/initramfs/src/kselftest/blocklists/connector new file mode 100644 index 000000000..7bb927125 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/connector @@ -0,0 +1 @@ +connector:proc_filter \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/core b/test/initramfs/src/kselftest/blocklists/core new file mode 100644 index 000000000..e11fee794 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/core @@ -0,0 +1,2 @@ +core:close_range_test +core:unshare_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/cpu-hotplug b/test/initramfs/src/kselftest/blocklists/cpu-hotplug new file mode 100644 index 000000000..4ffcaf10f --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/cpu-hotplug @@ -0,0 +1 @@ +cpu-hotplug:cpu-on-off-test.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/cpufreq b/test/initramfs/src/kselftest/blocklists/cpufreq new file mode 100644 index 000000000..20668c3b0 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/cpufreq @@ -0,0 +1 @@ +cpufreq:main.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/damon b/test/initramfs/src/kselftest/blocklists/damon new file mode 100644 index 000000000..ac04b412f --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/damon @@ -0,0 +1 @@ +damon:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/devices b/test/initramfs/src/kselftest/blocklists/devices new file mode 100644 index 000000000..e1e05e53f --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/devices @@ -0,0 +1,2 @@ +devices/error_logs:test_device_error_logs.py +devices/probe:test_discoverable_devices.py \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/dmabuf-heaps b/test/initramfs/src/kselftest/blocklists/dmabuf-heaps new file mode 100644 index 000000000..4c51a491a --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/dmabuf-heaps @@ -0,0 +1 @@ +dmabuf-heaps:dmabuf-heap \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/drivers b/test/initramfs/src/kselftest/blocklists/drivers new file mode 100644 index 000000000..b029b7fe7 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/drivers @@ -0,0 +1,7 @@ +drivers/dma-buf:* +drivers/ntsync:* +drivers/net:* +drivers/net/bonding:* +drivers/net/team:* +drivers/net/virtio_net:* +drivers/platform/x86/intel/ifs:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/efivarfs b/test/initramfs/src/kselftest/blocklists/efivarfs new file mode 100644 index 000000000..3d58fa005 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/efivarfs @@ -0,0 +1 @@ +efivarfs:efivarfs.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/exec b/test/initramfs/src/kselftest/blocklists/exec new file mode 100644 index 000000000..fcfe3d239 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/exec @@ -0,0 +1,6 @@ +exec:execveat +exec:non-regular +exec:null-argv +exec:check-exec +exec:binfmt_script.py +exec:check-exec-tests.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/fchmodat2 b/test/initramfs/src/kselftest/blocklists/fchmodat2 new file mode 100644 index 000000000..8e005da91 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/fchmodat2 @@ -0,0 +1 @@ +fchmodat2:fchmodat2_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/filesystems b/test/initramfs/src/kselftest/blocklists/filesystems new file mode 100644 index 000000000..d6659063b --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/filesystems @@ -0,0 +1,16 @@ +filesystems:devpts_pts +filesystems:file_stressor +filesystems:anon_inode_test +filesystems:kernfs_test +filesystems:fclog +filesystems/binderfs:binderfs_test +filesystems/epoll:epoll_wakeup_test +filesystems/fat:run_fat_tests.sh +filesystems/overlayfs:dev_in_maps +filesystems/overlayfs:set_layers_via_fds +filesystems/statmount:statmount_test +filesystems/statmount:statmount_test_ns +filesystems/statmount:listmount_test +filesystems/mount-notify:mount-notify_test +filesystems/mount-notify:mount-notify_test_ns +filesystems/fuse:fusectl_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/firmware b/test/initramfs/src/kselftest/blocklists/firmware new file mode 100644 index 000000000..53207d0cd --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/firmware @@ -0,0 +1 @@ +firmware:fw_run_tests.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/fpu b/test/initramfs/src/kselftest/blocklists/fpu new file mode 100644 index 000000000..95b03bb43 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/fpu @@ -0,0 +1,2 @@ +fpu:test_fpu +fpu:run_test_fpu.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/ftrace b/test/initramfs/src/kselftest/blocklists/ftrace new file mode 100644 index 000000000..e6bf92ee1 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/ftrace @@ -0,0 +1 @@ +ftrace:ftracetest-ktap \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/futex b/test/initramfs/src/kselftest/blocklists/futex new file mode 100644 index 000000000..b079eb297 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/futex @@ -0,0 +1 @@ +futex:run.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/gpio b/test/initramfs/src/kselftest/blocklists/gpio new file mode 100644 index 000000000..68fe7f603 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/gpio @@ -0,0 +1,3 @@ +gpio:gpio-mockup.sh +gpio:gpio-sim.sh +gpio:gpio-aggregator.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/intel_pstate b/test/initramfs/src/kselftest/blocklists/intel_pstate new file mode 100644 index 000000000..2f6840f9b --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/intel_pstate @@ -0,0 +1 @@ +intel_pstate:run.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/iommu b/test/initramfs/src/kselftest/blocklists/iommu new file mode 100644 index 000000000..71511ef73 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/iommu @@ -0,0 +1,2 @@ +iommu:iommufd +iommu:iommufd_fail_nth \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/ipc b/test/initramfs/src/kselftest/blocklists/ipc new file mode 100644 index 000000000..a31a31e10 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/ipc @@ -0,0 +1 @@ +ipc:msgque \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/ir b/test/initramfs/src/kselftest/blocklists/ir new file mode 100644 index 000000000..8dadfc05a --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/ir @@ -0,0 +1 @@ +ir:ir_loopback.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/kcmp b/test/initramfs/src/kselftest/blocklists/kcmp new file mode 100644 index 000000000..292118e8b --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/kcmp @@ -0,0 +1 @@ +kcmp:kcmp_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/kexec b/test/initramfs/src/kselftest/blocklists/kexec new file mode 100644 index 000000000..d54d48e4d --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/kexec @@ -0,0 +1 @@ +kexec:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/kselftest_harness b/test/initramfs/src/kselftest/blocklists/kselftest_harness new file mode 100644 index 000000000..dac33f27f --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/kselftest_harness @@ -0,0 +1 @@ +kselftest_harness:harness-selftest.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/kvm b/test/initramfs/src/kselftest/blocklists/kvm new file mode 100644 index 000000000..40cd55957 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/kvm @@ -0,0 +1 @@ +kvm:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/landlock b/test/initramfs/src/kselftest/blocklists/landlock new file mode 100644 index 000000000..f55bbb2a7 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/landlock @@ -0,0 +1,8 @@ +landlock:audit_test +landlock:base_test +landlock:fs_test +landlock:net_test +landlock:ptrace_test +landlock:scoped_abstract_unix_test +landlock:scoped_signal_test +landlock:scoped_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/lib b/test/initramfs/src/kselftest/blocklists/lib new file mode 100644 index 000000000..93563de40 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/lib @@ -0,0 +1 @@ +lib:bitmap.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/livepatch b/test/initramfs/src/kselftest/blocklists/livepatch new file mode 100644 index 000000000..2ef72dfa7 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/livepatch @@ -0,0 +1 @@ +livepatch:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/lkdtm b/test/initramfs/src/kselftest/blocklists/lkdtm new file mode 100644 index 000000000..1cdc30a93 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/lkdtm @@ -0,0 +1 @@ +lkdtm:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/lsm b/test/initramfs/src/kselftest/blocklists/lsm new file mode 100644 index 000000000..ecc03ece3 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/lsm @@ -0,0 +1,2 @@ +lsm:lsm_get_self_attr_test +lsm:lsm_list_modules_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/membarrier b/test/initramfs/src/kselftest/blocklists/membarrier new file mode 100644 index 000000000..70536ee55 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/membarrier @@ -0,0 +1,2 @@ +membarrier:membarrier_test_single_thread +membarrier:membarrier_test_multi_thread \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/memfd b/test/initramfs/src/kselftest/blocklists/memfd new file mode 100644 index 000000000..a45b18b0d --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/memfd @@ -0,0 +1,3 @@ +memfd:memfd_test +memfd:run_fuse_test.sh +memfd:run_hugetlbfs_test.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/memory-hotplug b/test/initramfs/src/kselftest/blocklists/memory-hotplug new file mode 100644 index 000000000..fbab72949 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/memory-hotplug @@ -0,0 +1 @@ +memory-hotplug:mem-on-off-test.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/mincore b/test/initramfs/src/kselftest/blocklists/mincore new file mode 100644 index 000000000..1a9b8108f --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/mincore @@ -0,0 +1 @@ +mincore:mincore_selftest \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/mm b/test/initramfs/src/kselftest/blocklists/mm new file mode 100644 index 000000000..392e81b8b --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/mm @@ -0,0 +1 @@ +mm:run_vmtests.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/mount b/test/initramfs/src/kselftest/blocklists/mount new file mode 100644 index 000000000..d3f1fa93e --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/mount @@ -0,0 +1,2 @@ +mount:run_unprivileged_remount.sh +mount:run_nosymfollow.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/mount_setattr b/test/initramfs/src/kselftest/blocklists/mount_setattr new file mode 100644 index 000000000..29244e969 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/mount_setattr @@ -0,0 +1 @@ +mount_setattr:mount_setattr_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/mqueue b/test/initramfs/src/kselftest/blocklists/mqueue new file mode 100644 index 000000000..e0ac221d3 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/mqueue @@ -0,0 +1,2 @@ +mqueue:mq_open_tests +mqueue:mq_perf_tests \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/mseal_system_mappings b/test/initramfs/src/kselftest/blocklists/mseal_system_mappings new file mode 100644 index 000000000..3d749fca1 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/mseal_system_mappings @@ -0,0 +1 @@ +mseal_system_mappings:sysmap_is_sealed \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/nci b/test/initramfs/src/kselftest/blocklists/nci new file mode 100644 index 000000000..01389870c --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/nci @@ -0,0 +1 @@ +nci:nci_dev \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/net b/test/initramfs/src/kselftest/blocklists/net new file mode 100644 index 000000000..a2462992b --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/net @@ -0,0 +1,416 @@ +net:bind_timewait +net:bind_wildcard +net:epoll_busy_poll +net:ipv6_fragmentation +net:proc_net_pktgen +net:reuseaddr_conflict +net:reuseport_bpf +net:reuseport_bpf_cpu +net:reuseport_bpf_numa +net:reuseport_dualstack +net:sk_bind_sendto_listen +net:sk_connect_zero_addr +net:sk_so_peek_off +net:so_incoming_cpu +net:tap +net:tcp_port_share +net:tls +net:tun +net:netlink-dumps +net:altnames.sh +net:amt.sh +net:arp_ndisc_evict_nocarrier.sh +net:arp_ndisc_untracked_subnets.sh +net:bareudp.sh +net:big_tcp.sh +net:bind_bhash.sh +net:bpf_offload.py +net:broadcast_ether_dst.sh +net:broadcast_pmtu.sh +net:busy_poll_test.sh +net:cmsg_ip.sh +net:cmsg_so_mark.sh +net:cmsg_so_priority.sh +net:cmsg_time.sh +net:drop_monitor_tests.sh +net:fcnal-ipv4.sh +net:fcnal-ipv6.sh +net:fcnal-other.sh +net:fdb_flush.sh +net:fdb_notify.sh +net:fib-onlink-tests.sh +net:fib_nexthop_multiprefix.sh +net:fib_nexthop_nongw.sh +net:fib_nexthops.sh +net:fib_rule_tests.sh +net:fib_tests.sh +net:fin_ack_lat.sh +net:fq_band_pktlimit.sh +net:gre_gso.sh +net:gre_ipv6_lladdr.sh +net:gro.sh +net:icmp.sh +net:icmp_redirect.sh +net:io_uring_zerocopy_tx.sh +net:ioam6.sh +net:ip6_gre_headroom.sh +net:ip_defrag.sh +net:ip_local_port_range.sh +net:ipv6_flowlabel.sh +net:ipv6_force_forwarding.sh +net:ipv6_route_update_soft_lockup.sh +net:l2_tos_ttl_inherit.sh +net:l2tp.sh +net:link_netns.py +net:lwt_dst_cache_ref_loop.sh +net:msg_zerocopy.sh +net:nat6to4.sh +net:ndisc_unsolicited_na_test.sh +net:netdev-l2addr.sh +net:netdevice.sh +net:netns-name.sh +net:netns-sysctl.sh +net:nl_netdev.py +net:pmtu.sh +net:psock_snd.sh +net:reuseaddr_ports_exhausted.sh +net:reuseport_addr_any.sh +net:route_hint.sh +net:route_localnet.sh +net:rps_default_mask.sh +net:rtnetlink.py +net:rtnetlink.sh +net:rtnetlink_notification.sh +net:run_afpackettests +net:run_netsocktests +net:rxtimestamp.sh +net:sctp_vrf.sh +net:skf_net_off.sh +net:so_txtime.sh +net:srv6_end_dt46_l3vpn_test.sh +net:srv6_end_dt4_l3vpn_test.sh +net:srv6_end_dt6_l3vpn_test.sh +net:srv6_end_dx4_netfilter_test.sh +net:srv6_end_dx6_netfilter_test.sh +net:srv6_end_flavors_test.sh +net:srv6_end_next_csid_l3vpn_test.sh +net:srv6_end_x_next_csid_l3vpn_test.sh +net:srv6_hencap_red_l3vpn_test.sh +net:srv6_hl2encap_red_l2vpn_test.sh +net:stress_reuseport_listen.sh +net:tcp_fastopen_backup_key.sh +net:test_bpf.sh +net:test_bridge_backup_port.sh +net:test_bridge_neigh_suppress.sh +net:test_ingress_egress_chaining.sh +net:test_neigh.sh +net:test_so_rcv.sh +net:test_vxlan_fdb_changelink.sh +net:test_vxlan_mdb.sh +net:test_vxlan_nh.sh +net:test_vxlan_nolocalbypass.sh +net:test_vxlan_under_vrf.sh +net:test_vxlan_vnifiltering.sh +net:tfo_passive.sh +net:traceroute.sh +net:txtimestamp.sh +net:udpgro.sh +net:udpgro_bench.sh +net:udpgro_frglist.sh +net:udpgro_fwd.sh +net:udpgso.sh +net:udpgso_bench.sh +net:unicast_extensions.sh +net:veth.sh +net:vlan_bridge_binding.sh +net:vlan_hw_filter.sh +net:vrf-xfrm-tests.sh +net:vrf_route_leaking.sh +net:vrf_strict_mode_test.sh +net:xfrm_policy.sh +net/af_unix:diag_uid +net/af_unix:msg_oob +net/af_unix:scm_inq +net/af_unix:scm_pidfd +net/af_unix:scm_rights +net/af_unix:so_peek_off +net/af_unix:unix_connect +net/can:test_raw_filter.sh +net/forwarding:bridge_activity_notify.sh +net/forwarding:bridge_fdb_learning_limit.sh +net/forwarding:bridge_fdb_local_vlan_0.sh +net/forwarding:bridge_igmp.sh +net/forwarding:bridge_locked_port.sh +net/forwarding:bridge_mdb.sh +net/forwarding:bridge_mdb_host.sh +net/forwarding:bridge_mdb_max.sh +net/forwarding:bridge_mdb_port_down.sh +net/forwarding:bridge_mld.sh +net/forwarding:bridge_port_isolation.sh +net/forwarding:bridge_sticky_fdb.sh +net/forwarding:bridge_vlan_aware.sh +net/forwarding:bridge_vlan_mcast.sh +net/forwarding:bridge_vlan_unaware.sh +net/forwarding:custom_multipath_hash.sh +net/forwarding:dual_vxlan_bridge.sh +net/forwarding:gre_custom_multipath_hash.sh +net/forwarding:gre_inner_v4_multipath.sh +net/forwarding:gre_inner_v6_multipath.sh +net/forwarding:gre_multipath.sh +net/forwarding:gre_multipath_nh.sh +net/forwarding:gre_multipath_nh_res.sh +net/forwarding:ip6_forward_instats_vrf.sh +net/forwarding:ip6gre_custom_multipath_hash.sh +net/forwarding:ip6gre_flat.sh +net/forwarding:ip6gre_flat_key.sh +net/forwarding:ip6gre_flat_keys.sh +net/forwarding:ip6gre_hier.sh +net/forwarding:ip6gre_hier_key.sh +net/forwarding:ip6gre_hier_keys.sh +net/forwarding:ip6gre_inner_v4_multipath.sh +net/forwarding:ip6gre_inner_v6_multipath.sh +net/forwarding:ipip_flat_gre.sh +net/forwarding:ipip_flat_gre_key.sh +net/forwarding:ipip_flat_gre_keys.sh +net/forwarding:ipip_hier_gre.sh +net/forwarding:ipip_hier_gre_key.sh +net/forwarding:ipip_hier_gre_keys.sh +net/forwarding:lib_sh_test.sh +net/forwarding:local_termination.sh +net/forwarding:min_max_mtu.sh +net/forwarding:mirror_gre.sh +net/forwarding:mirror_gre_bound.sh +net/forwarding:mirror_gre_bridge_1d.sh +net/forwarding:mirror_gre_bridge_1d_vlan.sh +net/forwarding:mirror_gre_bridge_1q.sh +net/forwarding:mirror_gre_bridge_1q_lag.sh +net/forwarding:mirror_gre_changes.sh +net/forwarding:mirror_gre_flower.sh +net/forwarding:mirror_gre_lag_lacp.sh +net/forwarding:mirror_gre_neigh.sh +net/forwarding:mirror_gre_nh.sh +net/forwarding:mirror_gre_vlan.sh +net/forwarding:mirror_gre_vlan_bridge_1q.sh +net/forwarding:mirror_vlan.sh +net/forwarding:no_forwarding.sh +net/forwarding:pedit_dsfield.sh +net/forwarding:pedit_ip.sh +net/forwarding:pedit_l4port.sh +net/forwarding:q_in_vni.sh +net/forwarding:q_in_vni_ipv6.sh +net/forwarding:router.sh +net/forwarding:router_bridge.sh +net/forwarding:router_bridge_1d.sh +net/forwarding:router_bridge_1d_lag.sh +net/forwarding:router_bridge_lag.sh +net/forwarding:router_bridge_pvid_vlan_upper.sh +net/forwarding:router_bridge_vlan.sh +net/forwarding:router_bridge_vlan_upper.sh +net/forwarding:router_bridge_vlan_upper_pvid.sh +net/forwarding:router_broadcast.sh +net/forwarding:router_mpath_nh.sh +net/forwarding:router_mpath_nh_res.sh +net/forwarding:router_mpath_seed.sh +net/forwarding:router_multicast.sh +net/forwarding:router_multipath.sh +net/forwarding:router_nh.sh +net/forwarding:router_vid_1.sh +net/forwarding:sch_ets.sh +net/forwarding:sch_red.sh +net/forwarding:sch_tbf_ets.sh +net/forwarding:sch_tbf_prio.sh +net/forwarding:sch_tbf_root.sh +net/forwarding:skbedit_priority.sh +net/forwarding:tc_actions.sh +net/forwarding:tc_chains.sh +net/forwarding:tc_flower.sh +net/forwarding:tc_flower_cfm.sh +net/forwarding:tc_flower_l2_miss.sh +net/forwarding:tc_flower_port_range.sh +net/forwarding:tc_flower_router.sh +net/forwarding:tc_mpls_l2vpn.sh +net/forwarding:tc_police.sh +net/forwarding:tc_shblocks.sh +net/forwarding:tc_tunnel_key.sh +net/forwarding:tc_vlan_modify.sh +net/forwarding:vxlan_asymmetric.sh +net/forwarding:vxlan_asymmetric_ipv6.sh +net/forwarding:vxlan_bridge_1d.sh +net/forwarding:vxlan_bridge_1d_ipv6.sh +net/forwarding:vxlan_bridge_1d_port_8472.sh +net/forwarding:vxlan_bridge_1d_port_8472_ipv6.sh +net/forwarding:vxlan_bridge_1q.sh +net/forwarding:vxlan_bridge_1q_ipv6.sh +net/forwarding:vxlan_bridge_1q_mc_ul.sh +net/forwarding:vxlan_bridge_1q_port_8472.sh +net/forwarding:vxlan_bridge_1q_port_8472_ipv6.sh +net/forwarding:vxlan_reserved.sh +net/forwarding:vxlan_symmetric.sh +net/forwarding:vxlan_symmetric_ipv6.sh +net/hsr:hsr_ping.sh +net/hsr:hsr_redbox.sh +net/mptcp:diag.sh +net/mptcp:mptcp_connect.sh +net/mptcp:mptcp_connect_checksum.sh +net/mptcp:mptcp_connect_mmap.sh +net/mptcp:mptcp_connect_sendfile.sh +net/mptcp:mptcp_join.sh +net/mptcp:mptcp_sockopt.sh +net/mptcp:pm_netlink.sh +net/mptcp:simult_flows.sh +net/mptcp:userspace_pm.sh +net/netfilter:br_netfilter.sh +net/netfilter:br_netfilter_queue.sh +net/netfilter:bridge_brouter.sh +net/netfilter:conntrack_clash.sh +net/netfilter:conntrack_dump_flush.sh +net/netfilter:conntrack_icmp_related.sh +net/netfilter:conntrack_ipip_mtu.sh +net/netfilter:conntrack_resize.sh +net/netfilter:conntrack_reverse_clash.sh +net/netfilter:conntrack_sctp_collision.sh +net/netfilter:conntrack_tcp_unreplied.sh +net/netfilter:conntrack_vrf.sh +net/netfilter:ipvs.sh +net/netfilter:nf_conntrack_packetdrill.sh +net/netfilter:nf_nat_edemux.sh +net/netfilter:nft_audit.sh +net/netfilter:nft_concat_range.sh +net/netfilter:nft_conntrack_helper.sh +net/netfilter:nft_fib.sh +net/netfilter:nft_flowtable.sh +net/netfilter:nft_interface_stress.sh +net/netfilter:nft_meta.sh +net/netfilter:nft_nat.sh +net/netfilter:nft_nat_zones.sh +net/netfilter:nft_queue.sh +net/netfilter:nft_synproxy.sh +net/netfilter:nft_tproxy_tcp.sh +net/netfilter:nft_tproxy_udp.sh +net/netfilter:nft_zones_many.sh +net/netfilter:rpath.sh +net/netfilter:vxlan_mtu_frag.sh +net/netfilter:xt_string.sh +net/openvswitch:openvswitch.sh +net/ovpn:test-chachapoly.sh +net/ovpn:test-close-socket-tcp.sh +net/ovpn:test-close-socket.sh +net/ovpn:test-float.sh +net/ovpn:test-large-mtu.sh +net/ovpn:test-tcp.sh +net/ovpn:test.sh +net/packetdrill:tcp_blocking_blocking-accept.pkt +net/packetdrill:tcp_blocking_blocking-connect.pkt +net/packetdrill:tcp_blocking_blocking-read.pkt +net/packetdrill:tcp_blocking_blocking-write.pkt +net/packetdrill:tcp_close_close-local-close-then-remote-fin.pkt +net/packetdrill:tcp_close_close-on-syn-sent.pkt +net/packetdrill:tcp_close_close-remote-fin-then-close.pkt +net/packetdrill:tcp_close_no_rst.pkt +net/packetdrill:tcp_dsack_mult.pkt +net/packetdrill:tcp_ecn_ecn-uses-ect0.pkt +net/packetdrill:tcp_eor_no-coalesce-large.pkt +net/packetdrill:tcp_eor_no-coalesce-retrans.pkt +net/packetdrill:tcp_eor_no-coalesce-small.pkt +net/packetdrill:tcp_eor_no-coalesce-subsequent.pkt +net/packetdrill:tcp_fast_recovery_prr-ss-10pkt-lost-1.pkt +net/packetdrill:tcp_fast_recovery_prr-ss-30pkt-lost-1_4-11_16.pkt +net/packetdrill:tcp_fast_recovery_prr-ss-30pkt-lost1_4.pkt +net/packetdrill:tcp_fast_recovery_prr-ss-ack-below-snd_una-cubic.pkt +net/packetdrill:tcp_fastopen_server_basic-cookie-not-reqd.pkt +net/packetdrill:tcp_fastopen_server_basic-no-setsockopt.pkt +net/packetdrill:tcp_fastopen_server_basic-non-tfo-listener.pkt +net/packetdrill:tcp_fastopen_server_basic-pure-syn-data.pkt +net/packetdrill:tcp_fastopen_server_basic-rw.pkt +net/packetdrill:tcp_fastopen_server_basic-zero-payload.pkt +net/packetdrill:tcp_fastopen_server_client-ack-dropped-then-recovery-ms-timestamps.pkt +net/packetdrill:tcp_fastopen_server_experimental_option.pkt +net/packetdrill:tcp_fastopen_server_fin-close-socket.pkt +net/packetdrill:tcp_fastopen_server_icmp-before-accept.pkt +net/packetdrill:tcp_fastopen_server_reset-after-accept.pkt +net/packetdrill:tcp_fastopen_server_reset-before-accept.pkt +net/packetdrill:tcp_fastopen_server_reset-close-with-unread-data.pkt +net/packetdrill:tcp_fastopen_server_reset-non-tfo-socket.pkt +net/packetdrill:tcp_fastopen_server_sockopt-fastopen-key.pkt +net/packetdrill:tcp_fastopen_server_trigger-rst-listener-closed.pkt +net/packetdrill:tcp_fastopen_server_trigger-rst-reconnect.pkt +net/packetdrill:tcp_fastopen_server_trigger-rst-unread-data-closed.pkt +net/packetdrill:tcp_inq_client.pkt +net/packetdrill:tcp_inq_server.pkt +net/packetdrill:tcp_limited_transmit_limited-transmit-no-sack.pkt +net/packetdrill:tcp_limited_transmit_limited-transmit-sack.pkt +net/packetdrill:tcp_md5_md5-only-on-client-ack.pkt +net/packetdrill:tcp_nagle_https_client.pkt +net/packetdrill:tcp_nagle_sendmsg_msg_more.pkt +net/packetdrill:tcp_nagle_sockopt_cork_nodelay.pkt +net/packetdrill:tcp_ooo-before-and-after-accept.pkt +net/packetdrill:tcp_ooo_rcv_mss.pkt +net/packetdrill:tcp_rcv_big_endseq.pkt +net/packetdrill:tcp_rcv_toobig.pkt +net/packetdrill:tcp_sack_sack-route-refresh-ip-tos.pkt +net/packetdrill:tcp_sack_sack-shift-sacked-2-6-8-3-9-nofack.pkt +net/packetdrill:tcp_sack_sack-shift-sacked-7-3-4-8-9-fack.pkt +net/packetdrill:tcp_sack_sack-shift-sacked-7-5-6-8-9-fack.pkt +net/packetdrill:tcp_sendfile_sendfile-simple.pkt +net/packetdrill:tcp_slow_start_slow-start-ack-per-1pkt.pkt +net/packetdrill:tcp_slow_start_slow-start-ack-per-2pkt-send-5pkt.pkt +net/packetdrill:tcp_slow_start_slow-start-ack-per-2pkt-send-6pkt.pkt +net/packetdrill:tcp_slow_start_slow-start-ack-per-2pkt.pkt +net/packetdrill:tcp_slow_start_slow-start-ack-per-4pkt.pkt +net/packetdrill:tcp_slow_start_slow-start-after-idle.pkt +net/packetdrill:tcp_slow_start_slow-start-after-win-update.pkt +net/packetdrill:tcp_slow_start_slow-start-app-limited-9-packets-out.pkt +net/packetdrill:tcp_slow_start_slow-start-app-limited.pkt +net/packetdrill:tcp_slow_start_slow-start-fq-ack-per-2pkt.pkt +net/packetdrill:tcp_splice_tcp_splice_loop_test.pkt +net/packetdrill:tcp_syscall_bad_arg_fastopen-invalid-buf-ptr.pkt +net/packetdrill:tcp_syscall_bad_arg_sendmsg-empty-iov.pkt +net/packetdrill:tcp_syscall_bad_arg_syscall-invalid-buf-ptr.pkt +net/packetdrill:tcp_tcp_info_tcp-info-last_data_recv.pkt +net/packetdrill:tcp_tcp_info_tcp-info-rwnd-limited.pkt +net/packetdrill:tcp_tcp_info_tcp-info-sndbuf-limited.pkt +net/packetdrill:tcp_timestamping_client-only-last-byte.pkt +net/packetdrill:tcp_timestamping_partial.pkt +net/packetdrill:tcp_timestamping_server.pkt +net/packetdrill:tcp_ts_recent_fin_tsval.pkt +net/packetdrill:tcp_ts_recent_invalid_ack.pkt +net/packetdrill:tcp_ts_recent_reset_tsval.pkt +net/packetdrill:tcp_user_timeout_user-timeout-probe.pkt +net/packetdrill:tcp_user_timeout_user_timeout.pkt +net/packetdrill:tcp_validate_validate-established-no-flags.pkt +net/packetdrill:tcp_zerocopy_basic.pkt +net/packetdrill:tcp_zerocopy_batch.pkt +net/packetdrill:tcp_zerocopy_client.pkt +net/packetdrill:tcp_zerocopy_closed.pkt +net/packetdrill:tcp_zerocopy_epoll_edge.pkt +net/packetdrill:tcp_zerocopy_epoll_exclusive.pkt +net/packetdrill:tcp_zerocopy_epoll_oneshot.pkt +net/packetdrill:tcp_zerocopy_fastopen-client.pkt +net/packetdrill:tcp_zerocopy_fastopen-server.pkt +net/packetdrill:tcp_zerocopy_maxfrags.pkt +net/packetdrill:tcp_zerocopy_small.pkt +net/rds:run.sh +net/tcp_ao:bench-lookups_ipv4 +net/tcp_ao:connect_ipv4 +net/tcp_ao:connect-deny_ipv4 +net/tcp_ao:icmps-accept_ipv4 +net/tcp_ao:icmps-discard_ipv4 +net/tcp_ao:key-management_ipv4 +net/tcp_ao:restore_ipv4 +net/tcp_ao:rst_ipv4 +net/tcp_ao:self-connect_ipv4 +net/tcp_ao:seq-ext_ipv4 +net/tcp_ao:setsockopt-closed_ipv4 +net/tcp_ao:unsigned-md5_ipv4 +net/tcp_ao:bench-lookups_ipv6 +net/tcp_ao:connect_ipv6 +net/tcp_ao:connect-deny_ipv6 +net/tcp_ao:icmps-accept_ipv6 +net/tcp_ao:icmps-discard_ipv6 +net/tcp_ao:key-management_ipv6 +net/tcp_ao:restore_ipv6 +net/tcp_ao:rst_ipv6 +net/tcp_ao:self-connect_ipv6 +net/tcp_ao:seq-ext_ipv6 +net/tcp_ao:setsockopt-closed_ipv6 +net/tcp_ao:unsigned-md5_ipv6 \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/nolibc b/test/initramfs/src/kselftest/blocklists/nolibc new file mode 100644 index 000000000..7a73cbf4a --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/nolibc @@ -0,0 +1 @@ +nolibc:nolibc-test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/openat2 b/test/initramfs/src/kselftest/blocklists/openat2 new file mode 100644 index 000000000..f7081a5c9 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/openat2 @@ -0,0 +1,3 @@ +openat2:openat2_test +openat2:resolve_test +openat2:rename_attack_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/pci_endpoint b/test/initramfs/src/kselftest/blocklists/pci_endpoint new file mode 100644 index 000000000..7604de4d5 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/pci_endpoint @@ -0,0 +1 @@ +pci_endpoint:pci_endpoint_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/pcie_bwctrl b/test/initramfs/src/kselftest/blocklists/pcie_bwctrl new file mode 100644 index 000000000..bfdd7d00b --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/pcie_bwctrl @@ -0,0 +1 @@ +pcie_bwctrl:set_pcie_cooling_state.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/perf_events b/test/initramfs/src/kselftest/blocklists/perf_events new file mode 100644 index 000000000..3bc8db5e0 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/perf_events @@ -0,0 +1,3 @@ +perf_events:sigtrap_threads +perf_events:remove_on_exec +perf_events:mmap \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/pid_namespace b/test/initramfs/src/kselftest/blocklists/pid_namespace new file mode 100644 index 000000000..58b9a9fe9 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/pid_namespace @@ -0,0 +1,2 @@ +pid_namespace:regression_enomem +pid_namespace:pid_max \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/pidfd b/test/initramfs/src/kselftest/blocklists/pidfd new file mode 100644 index 000000000..3cbfeac5d --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/pidfd @@ -0,0 +1,12 @@ +pidfd:pidfd_test +pidfd:pidfd_fdinfo_test +pidfd:pidfd_open_test +pidfd:pidfd_poll_test +pidfd:pidfd_wait +pidfd:pidfd_getfd_test +pidfd:pidfd_setns_test +pidfd:pidfd_file_handle_test +pidfd:pidfd_bind_mount +pidfd:pidfd_info_test +pidfd:pidfd_xattr_test +pidfd:pidfd_setattr_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/power_supply b/test/initramfs/src/kselftest/blocklists/power_supply new file mode 100644 index 000000000..1fe4720d9 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/power_supply @@ -0,0 +1 @@ +power_supply:test_power_supply_properties.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/prctl b/test/initramfs/src/kselftest/blocklists/prctl new file mode 100644 index 000000000..0ea094ad6 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/prctl @@ -0,0 +1,5 @@ +prctl:disable-tsc-ctxt-sw-stress-test +prctl:disable-tsc-on-off-stress-test +prctl:disable-tsc-test +prctl:set-anon-vma-name-test +prctl:set-process-name \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/proc b/test/initramfs/src/kselftest/blocklists/proc new file mode 100644 index 000000000..c4c214e12 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/proc @@ -0,0 +1,22 @@ +proc:fd-001-lookup +proc:fd-002-posix-eq +proc:fd-003-kthread +proc:proc-2-is-kthread +proc:proc-loadavg-001 +proc:proc-maps-race +proc:proc-net-dev-lseek +proc:proc-empty-vm +proc:proc-pid-vm +proc:proc-self-map-files-001 +proc:proc-self-map-files-002 +proc:proc-self-isnt-kthread +proc:proc-self-syscall +proc:proc-self-wchan +proc:proc-subset-pid +proc:proc-uptime-001 +proc:proc-uptime-002 +proc:setns-dcache +proc:setns-sysvipc +proc:proc-multiple-procfs +proc:proc-fsconfig-hidepid +proc:proc-pidns \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/pstore b/test/initramfs/src/kselftest/blocklists/pstore new file mode 100644 index 000000000..34719052e --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/pstore @@ -0,0 +1,2 @@ +pstore:pstore_tests +pstore:pstore_post_reboot_tests \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/ptrace b/test/initramfs/src/kselftest/blocklists/ptrace new file mode 100644 index 000000000..b4df7a3fe --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/ptrace @@ -0,0 +1,5 @@ +ptrace:get_syscall_info +ptrace:set_syscall_info +ptrace:peeksiginfo +ptrace:vmaccess +ptrace:get_set_sud \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/resctrl b/test/initramfs/src/kselftest/blocklists/resctrl new file mode 100644 index 000000000..bb87202f4 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/resctrl @@ -0,0 +1 @@ +resctrl:resctrl_tests \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/rlimits b/test/initramfs/src/kselftest/blocklists/rlimits new file mode 100644 index 000000000..0a828f455 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/rlimits @@ -0,0 +1 @@ +rlimits:rlimits-per-userns \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/rseq b/test/initramfs/src/kselftest/blocklists/rseq new file mode 100644 index 000000000..509c5dbe0 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/rseq @@ -0,0 +1 @@ +rseq:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/rtc b/test/initramfs/src/kselftest/blocklists/rtc new file mode 100644 index 000000000..dd651f6a9 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/rtc @@ -0,0 +1 @@ +rtc:rtctest \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/rust b/test/initramfs/src/kselftest/blocklists/rust new file mode 100644 index 000000000..57795c125 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/rust @@ -0,0 +1 @@ +rust:test_probe_samples.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/seccomp b/test/initramfs/src/kselftest/blocklists/seccomp new file mode 100644 index 000000000..7431b544c --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/seccomp @@ -0,0 +1,2 @@ +seccomp:seccomp_bpf +seccomp:seccomp_benchmark \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/sgx b/test/initramfs/src/kselftest/blocklists/sgx new file mode 100644 index 000000000..96d90fd8a --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/sgx @@ -0,0 +1 @@ +sgx:test_sgx \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/signal b/test/initramfs/src/kselftest/blocklists/signal new file mode 100644 index 000000000..d4dc1f8bb --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/signal @@ -0,0 +1 @@ +signal:mangle_uc_sigmask \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/smp b/test/initramfs/src/kselftest/blocklists/smp new file mode 100644 index 000000000..6021794f4 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/smp @@ -0,0 +1 @@ +timers:threadtest \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/splice b/test/initramfs/src/kselftest/blocklists/splice new file mode 100644 index 000000000..7cca7871c --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/splice @@ -0,0 +1 @@ +splice:short_splice_read.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/static_keys b/test/initramfs/src/kselftest/blocklists/static_keys new file mode 100644 index 000000000..6c92fb416 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/static_keys @@ -0,0 +1 @@ +static_keys:test_static_keys.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/sync b/test/initramfs/src/kselftest/blocklists/sync new file mode 100644 index 000000000..ab080b004 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/sync @@ -0,0 +1 @@ +sync:sync_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/syscall_user_dispatch b/test/initramfs/src/kselftest/blocklists/syscall_user_dispatch new file mode 100644 index 000000000..e6089ab16 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/syscall_user_dispatch @@ -0,0 +1,2 @@ +syscall_user_dispatch:sud_test +syscall_user_dispatch:sud_benchmark \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/sysctl b/test/initramfs/src/kselftest/blocklists/sysctl new file mode 100644 index 000000000..ddac3cd0d --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/sysctl @@ -0,0 +1 @@ +sysctl:sysctl.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/tc-testing b/test/initramfs/src/kselftest/blocklists/tc-testing new file mode 100644 index 000000000..d40e277ad --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/tc-testing @@ -0,0 +1 @@ +tc-testing:tdc.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/tdx b/test/initramfs/src/kselftest/blocklists/tdx new file mode 100644 index 000000000..805d0bfdb --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/tdx @@ -0,0 +1 @@ +tdx:tdx_guest_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/thermal b/test/initramfs/src/kselftest/blocklists/thermal new file mode 100644 index 000000000..6f641a331 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/thermal @@ -0,0 +1,2 @@ +thermal/intel/power_floor:power_floor_test +thermal/intel/workload_hint:workload_hint_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/timens b/test/initramfs/src/kselftest/blocklists/timens new file mode 100644 index 000000000..a72801e42 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/timens @@ -0,0 +1,8 @@ +timens:timens +timens:timerfd +timens:timer +timens:clock_nanosleep +timens:procfs +timens:exec +timens:futex +timens:vfork_exec \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/timers b/test/initramfs/src/kselftest/blocklists/timers new file mode 100644 index 000000000..219644156 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/timers @@ -0,0 +1,7 @@ +timers:posix_timers +timers:nanosleep +timers:set-timer-lat +timers:mqueue-lat +timers:inconsistency-check +timers:raw_skew +timers:rtcpie \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/tmpfs b/test/initramfs/src/kselftest/blocklists/tmpfs new file mode 100644 index 000000000..fd9dca81d --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/tmpfs @@ -0,0 +1 @@ +tmpfs:bug-link-o-tmpfile \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/tpm2 b/test/initramfs/src/kselftest/blocklists/tpm2 new file mode 100644 index 000000000..567dd9958 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/tpm2 @@ -0,0 +1 @@ +tpm2:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/tty b/test/initramfs/src/kselftest/blocklists/tty new file mode 100644 index 000000000..ed20b7279 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/tty @@ -0,0 +1 @@ +tty:tty_tstamp_update \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/ublk b/test/initramfs/src/kselftest/blocklists/ublk new file mode 100644 index 000000000..7e7bc921c --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/ublk @@ -0,0 +1 @@ +ublk:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/uevent b/test/initramfs/src/kselftest/blocklists/uevent new file mode 100644 index 000000000..13cc946d1 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/uevent @@ -0,0 +1 @@ +uevent:uevent_filtering \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/user_events b/test/initramfs/src/kselftest/blocklists/user_events new file mode 100644 index 000000000..a4474f3f2 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/user_events @@ -0,0 +1,4 @@ +user_events:ftrace_test +user_events:dyn_test +user_events:perf_test +user_events:abi_test \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/vDSO b/test/initramfs/src/kselftest/blocklists/vDSO new file mode 100644 index 000000000..f6674ba35 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/vDSO @@ -0,0 +1,3 @@ +vDSO:vdso_test_abi +vDSO:vdso_test_correctness +vDSO:vdso_test_getrandom \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/vfio b/test/initramfs/src/kselftest/blocklists/vfio new file mode 100644 index 000000000..87a047f11 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/vfio @@ -0,0 +1 @@ +vfio:* \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/x86 b/test/initramfs/src/kselftest/blocklists/x86 new file mode 100644 index 000000000..d0d2e040e --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/x86 @@ -0,0 +1,52 @@ +x86:single_step_syscall_32 +x86:sysret_ss_attrs_32 +x86:syscall_nt_32 +x86:test_mremap_vdso_32 +x86:check_initial_reg_state_32 +x86:sigreturn_32 +x86:iopl_32 +x86:ioperm_32 +x86:test_vsyscall_32 +x86:mov_ss_trap_32 +x86:sigtrap_loop_32 +x86:syscall_arg_fault_32 +x86:fsgsbase_restore_32 +x86:sigaltstack_32 +x86:nx_stack_32 +x86:entry_from_vm86_32 +x86:test_syscall_vdso_32 +x86:unwind_vdso_32 +x86:test_FCMOV_32 +x86:test_FCOMI_32 +x86:test_FISTTP_32 +x86:vdso_restorer_32 +x86:ldt_gdt_32 +x86:ptrace_syscall_32 +x86:single_step_syscall_64 +x86:sysret_ss_attrs_64 +x86:syscall_nt_64 +x86:test_mremap_vdso_64 +x86:check_initial_reg_state_64 +x86:sigreturn_64 +x86:iopl_64 +x86:ioperm_64 +x86:test_vsyscall_64 +x86:mov_ss_trap_64 +x86:sigtrap_loop_64 +x86:syscall_arg_fault_64 +x86:fsgsbase_restore_64 +x86:fsgsbase_64 +x86:sysret_rip_64 +x86:syscall_numbering_64 +x86:corrupt_xstate_header_64 +x86:amx_64 +x86:lam_64 +x86:test_shadow_stack_64 +x86:avx_64 +x86:apx_64 +x86:ldt_gdt_64 +x86:ptrace_syscall_64 +x86/bugs:its_sysfs.py +x86/bugs:its_permutations.py +x86/bugs:its_indirect_alignment.py +x86/bugs:its_ret_alignment.py \ No newline at end of file diff --git a/test/initramfs/src/kselftest/blocklists/zram b/test/initramfs/src/kselftest/blocklists/zram new file mode 100644 index 000000000..48e67bf99 --- /dev/null +++ b/test/initramfs/src/kselftest/blocklists/zram @@ -0,0 +1 @@ +zram:zram.sh \ No newline at end of file diff --git a/test/initramfs/src/kselftest/run_kselftest.sh b/test/initramfs/src/kselftest/run_kselftest.sh new file mode 100644 index 000000000..1b3e44d94 --- /dev/null +++ b/test/initramfs/src/kselftest/run_kselftest.sh @@ -0,0 +1,102 @@ +#!/bin/sh + +# SPDX-License-Identifier: MPL-2.0 + +echo "=== Kselftest Runner Started ===" + +BASE_DIR=@kselftest@ + +TESTS="$BASE_DIR"/kselftest-list.txt +if [ ! -r "$TESTS" ] ; then + echo "$0: Could not find list of tests to run ($TESTS)" >&2 + available="" +else + available="$(cat "$TESTS")" + echo "Found $(echo "$available" | grep -v '^$' | wc -l) available test cases" +fi + +echo "Processing blocklists..." +blocklists="" +BLOCKLISTS_DIR="$(dirname $0)/blocklists" +for blocklist_file in "$BLOCKLISTS_DIR"/*; do + while IFS= read -r line || [ -n "$line" ]; do + line=$(echo "$line" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//') + case "$line" in + "#"*) + continue ;; + *:*) + collection=$(echo "$line" | cut -d: -f1) + test=$(echo "$line" | cut -d: -f2) + if [ "$test" = "*" ]; then + matched_lines=$(echo "$available" | grep "^$collection:") + blocklists="$blocklists $matched_lines" + else + blocklists="$blocklists $line" + fi + ;; + *) + echo "Warning: Invalid format in blocklist: $line" >&2 + continue ;; + esac + done < "$blocklist_file" +done +blocklists="$(echo "$blocklists" | tr ' ' '\n' | grep -v '^$' | sort | uniq)" +blocked_count=$(echo "$blocklists" | wc -l) +echo "Total blocklist entries processed: $blocked_count" + +testcases="$(echo "$available" | grep -vxF "$blocklists" | grep -v '^$')" +run_count=$(echo "$testcases" | wc -l) +echo "Test cases to be executed: $run_count" +if [ $run_count -eq 0 ]; then + echo "No tests to run after applying blocklists" + exit 0 +fi + +echo "================================" + +GREEN='\033[0;32m' +RED='\033[0;31m' +NC='\033[0m' +total_tests=$run_count +passed_tests=0 +failed_tests=0 +failed_list="" + +collections=$(echo "$testcases" | cut -d: -f1 | sort | uniq) +for collection in $collections ; do + echo "Running tests in collection: $collection" + tests=$(echo "$testcases" | grep "^$collection:" | cut -d: -f2) + for test in $tests ; do + echo "[ PROCESS ]: $collection:$test" + if [ -d "$BASE_DIR/$collection" ] && [ -x "$BASE_DIR/$collection/$test" ]; then + (cd "$BASE_DIR/$collection" && ./"$test") + exit_code=$? + + if [ $exit_code -eq 0 ]; then + echo -e "[ ${GREEN}PASSED${NC} ]: $collection:$test" + passed_tests=$((passed_tests + 1)) + else + echo -e "[ ${RED}FAILED${NC} ]: $collection:$test (exit code: $exit_code)" + failed_tests=$((failed_tests + 1)) + failed_list="$failed_list$collection:$test\n" + fi + else + echo -e "[ ${RED}FAILED${NC} ]: $collection:$test (executable not found)" + failed_tests=$((failed_tests + 1)) + failed_list="$failed_list$collection:$test\n" + fi + done +done + +echo "" +echo "=========== Summary ============" +echo -e "$GREEN$passed_tests$NC of $GREEN$total_tests$NC test cases passed." +if [ $failed_tests -gt 0 ]; then + echo -e "The $RED$failed_tests$NC failed test cases are as follows:" + echo -e "$failed_list" + exit 1 +else + echo "" + echo "All kselftest tests passed." + exit 0 +fi