forked from mpe/ci-scripts
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
156 changed files
with
1,958 additions
and
773 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -149,3 +149,72 @@ $ make rebuild-image@ppc64le@ubuntu | |
|
||
Note that the build mounts the source tree read-only, so nothing it does can | ||
affect your source tree. | ||
|
||
Bisecting the kernel vs a selftest | ||
---------------------------------- | ||
|
||
Build the selftests using a version of the test that's known good. Usually | ||
there's no reason to rebuild the tests on every kernel revision. | ||
|
||
These examples are run from the kernel directory, not the ci-scripts directory. | ||
It can be done either way, but it's more natural to run from the kernel | ||
directory when bisectting the kernel. This assumes Linux is in `~/linux` and | ||
these scripts are in `~/ci-scripts`, adapt as appropriate. | ||
|
||
``` | ||
$ cd ~/linux | ||
``` | ||
|
||
``` | ||
$ make SRC=$PWD -C ~/ci-scripts/build QUIET=1 JFACTOR=$(nproc) ppctests@ppc64le@[email protected] INSTALL=1 | ||
``` | ||
|
||
:rotating_light: Using an old Ubuntu image uses an older libc, which is more | ||
likely to be present on the guest root filesystem. Another option is to build | ||
the selftests statically. | ||
|
||
Tar up the selftests into the current directory, the qemu scripts will detect them: | ||
|
||
``` | ||
$ tar -czf selftests.tar.gz -C $HOME/ci-scripts/build/output/selftests_powerpc@ppc64le@[email protected]/ install | ||
``` | ||
|
||
``` | ||
$ ~/ci-scripts/scripts/boot/qemu-pseries+kvm --callback "run_selftests(powerpc/mm:wild_bctr)" | ||
... | ||
INFO: Running 'qemu-system-ppc64 -nographic -vga none -M pseries -smp 8 -m 4G -accel kvm ... | ||
... | ||
/ # INFO: Running individual selftests powerpc/mm:wild_bctr | ||
/var/tmp/selftests/run_kselftest.sh -t powerpc/mm:wild_bctr | ||
[ 2.783761][ T201] kselftest: Running tests in powerpc | ||
TAP version 13 | ||
1..1 | ||
# timeout set to 300 | ||
# selftests: powerpc/mm: wild_bctr | ||
# test: wild_bctr | ||
# tags: git_version:v6.8-rc6-2555-gfe559db | ||
# Everything is OK in here. | ||
... | ||
# success: wild_bctr | ||
ok 1 selftests: powerpc/mm: wild_bctr | ||
/ # poweroff | ||
/ # Stopping network: [ 3.104385][ T274] ip (274) used greatest stack depth: 10912 bytes left | ||
OK | ||
Saving random seed: OK | ||
Stopping klogd: OK | ||
Stopping syslogd: OK | ||
umount: devtmpfs busy - remounted read-only | ||
umount: can't unmount /: Invalid argument | ||
The system is going down NOW! | ||
Sent SIGTERM to all processes | ||
Sent SIGKILL to all processes | ||
Requesting system poweroff | ||
[ 5.152672][ T293] reboot: Power down | ||
INFO: Test completed OK | ||
``` | ||
|
||
More than one selftest can be run by passing multiple arguments to | ||
`run_selftests` or by passing multiple `--callback` options. | ||
|
||
From there the bisection can either be run by hand, or fully automated by | ||
creating a script to build the kernel and run the qemu test. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# Shared config fragments etc. | ||
|
||
guest_configs = [ | ||
'arch/powerpc/configs/guest.config', | ||
'netconsole-n', | ||
'ibmveth', # For PowerVM LPARs | ||
'kuap', | ||
'criu', # For seccomp tests | ||
'user-ns', # For seccomp tests | ||
'lkdtm', # Because it's useful | ||
'ptdump', # Because it's useful | ||
'strict-rwx', # Get some test coverage | ||
'kfence', | ||
'srr-debug', | ||
'irq-soft-mask-debug', | ||
'printk-index', | ||
'debug-atomic-sleep', | ||
'secure-boot', | ||
'debug-vm', | ||
'btrfs-y', # Needed for F39 | ||
'vfat-y', # Needed for F39 | ||
'zram', # Needed for F39 | ||
] | ||
|
||
guest_configs_4k = guest_configs + ['4k-pages'] | ||
guest_configs_maxsmp = guest_configs + ['nr-cpus-8192'] | ||
|
||
legacy_guest_configs = [ | ||
'arch/powerpc/configs/guest.config', | ||
'netconsole-n', | ||
'ibmveth', # For PowerVM LPARs | ||
'ibmehea', # Needed for Power7 | ||
'strict-rwx-off', # Bloats image too much for netboot to work w/128MB RMA | ||
'nr-cpus-64', # Shrink kernel size | ||
'ftrace-n', # Shrink kernel size | ||
] | ||
|
||
pmac32_configs = [ | ||
'pmaczilog', | ||
'devtmpfs', | ||
'debugfs', | ||
'ptdump', | ||
'debug-atomic-sleep', | ||
'cgroups-y', | ||
'arch/powerpc/configs/guest.config', | ||
] | ||
|
||
g5_configs = [ | ||
'pmaczilog', | ||
'debugfs', | ||
'ptdump', | ||
'pstore', | ||
'kvm-pr-y', | ||
'agp-uninorth-y', | ||
] | ||
|
||
cell_configs = [ | ||
'cell', | ||
'lockdep-y', | ||
'debug-atomic-sleep', | ||
'xmon-non-default', | ||
] | ||
|
||
powernv_configs = [ | ||
'tools/testing/selftests/ftrace/config', | ||
'tools/testing/selftests/bpf/config', | ||
'criu', # needed for selftests-seccomp | ||
'igb', # Needed on some machines | ||
'xfs-y', # Needed on some machines | ||
'bridge-y', # Needed on some machines | ||
'ahci-y', # Needed on some machines | ||
'i40e-y', # Needed on some machines | ||
'kvm-pr-m', | ||
'strict-rwx', | ||
'debug-atomic-sleep', | ||
'selftests', | ||
'pci-iov', | ||
'page-poisoning-y', | ||
'srr-debug', # Get some test coverage | ||
'livepatch', | ||
'secure-boot', | ||
'zram', | ||
'ptdump', | ||
'amdgpu-y', | ||
'drm-aspeed-y', # Aspeed DRM driver for /dev/fb0 on powernv machines | ||
'fb-y', # Enable frame buffer for /dev/fb0 & alignment test | ||
'xmon-non-default', # Better oopses in logs | ||
'xmon-rw', | ||
'selinux', # Avoid selinux relabeling on Fedora machines | ||
'vfio-y', # Test coverage of VFIO | ||
'cgroups-y', # So podman can run | ||
'gup-test-y', # Enable selftest | ||
] | ||
|
||
powernv_lockdep_configs = powernv_configs + ['lockdep-y'] | ||
|
||
corenet64_configs = [ | ||
'debug-info-n', | ||
'ppc64e-qemu', | ||
'arch/powerpc/configs/guest.config', | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_PPC_4K_PAGES=n | ||
CONFIG_PPC_64K_PAGES=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
CONFIG_AGP_UNINORTH=y | ||
CONFIG_AGP=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_DEBUG_INFO_BTF=n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_BTRFS_FS=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
CONFIG_CGROUPS=y | ||
CONFIG_BLK_CGROUP=y | ||
CONFIG_CGROUP_PIDS=y | ||
CONFIG_CGROUP_RDMA=y | ||
CONFIG_CGROUP_HUGETLB=y | ||
CONFIG_CGROUP_MISC=y | ||
CONFIG_CGROUP_DEBUG=y | ||
CONFIG_NET_CLS_CGROUP=y | ||
CONFIG_CGROUP_NET_PRIO=y | ||
CONFIG_CGROUP_NET_CLASSID=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_GCC_PLUGINS=n |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_GUP_TEST=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_I40E=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_NR_CPUS=8192 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
CONFIG_CRASH_DUMP=n | ||
CONFIG_RELOCATABLE=n | ||
CONFIG_STRICT_KERNEL_RWX=y | ||
CONFIG_STRICT_MODULE_RWX=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
CONFIG_VFAT_FS=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
CONFIG_VFIO=y | ||
CONFIG_VFIO_GROUP=y | ||
CONFIG_VFIO_CONTAINER=y | ||
CONFIG_VFIO_IOMMU_SPAPR_TCE=y | ||
CONFIG_VFIO_PCI_CORE=y | ||
CONFIG_VFIO_PCI_MMAP=y | ||
CONFIG_VFIO_PCI_INTX=y | ||
CONFIG_VFIO_PCI=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
CONFIG_ZRAM=y | ||
CONFIG_ZSMALLOC=y | ||
CONFIG_CRYPTO_LZO=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
QEMU_VERSION = '9.0.2' | ||
|
||
DEFAULT_OLD_IMAGE = '[email protected]' | ||
DEFAULT_NEW_IMAGE = 'fedora' | ||
DEFAULT_IMAGES = [DEFAULT_OLD_IMAGE, DEFAULT_NEW_IMAGE] | ||
|
||
CLANG_IMAGES = ['fedora', 'ubuntu'] | ||
SPARSE_IMAGES = ['fedora', 'ubuntu'] |
Oops, something went wrong.