selftests/powerpc: Give all tests 2 minutes timeoutEach of the powerpc selftests runs with a timeout of 2 minutes bydefault (see tools/testing/selftests/powerpc/harness.c).But when tests are run
selftests/powerpc: Give all tests 2 minutes timeoutEach of the powerpc selftests runs with a timeout of 2 minutes bydefault (see tools/testing/selftests/powerpc/harness.c).But when tests are run with run_kselftest.sh it uses a timeout of 45seconds, meaning some tests run OK standalone but fail when run with thetest runner.So tell run_kselftest.sh to give each test 130 seconds, that shouldallow the tests to complete, or be killed by the powerpc test harnessafter 2 minutes. If for some reason the harness fails, or for the fewtests that don't use the harness, the 130 second timeout should catchthem if they get stuck.Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>Link: https://patch.msgid.link/20241106130453.1741013-2-mpe@ellerman.id.au
show more ...
Merge tag 'powerpc-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linuxPull powerpc updates from Michael Ellerman: - Enable BPF Kernel Functions (kfuncs) in the powerpc BPF JIT.
Merge tag 'powerpc-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linuxPull powerpc updates from Michael Ellerman: - Enable BPF Kernel Functions (kfuncs) in the powerpc BPF JIT. - Allow per-process DEXCR (Dynamic Execution Control Register) settings via prctl, notably NPHIE which controls hashst/hashchk for ROP protection. - Install powerpc selftests in sub-directories. Note this changes the way run_kselftest.sh needs to be invoked for powerpc selftests. - Change fadump (Firmware Assisted Dump) to better handle memory add/remove. - Add support for passing additional parameters to the fadump kernel. - Add support for updating the kdump image on CPU/memory add/remove events. - Other small features, cleanups and fixes.Thanks to Andrew Donnellan, Andy Shevchenko, Aneesh Kumar K.V, ArndBergmann, Benjamin Gray, Bjorn Helgaas, Christian Zigotzky, ChristopheJaillet, Christophe Leroy, Colin Ian King, Cédric Le Goater, Dr. DavidAlan Gilbert, Erhard Furtner, Frank Li, GUO Zihua, Ganesh Goudar, GeoffLevand, Ghanshyam Agrawal, Greg Kurz, Hari Bathini, Joel Stanley, JustinStitt, Kunwu Chan, Li Yang, Lidong Zhong, Madhavan Srinivasan, MaheshSalgaonkar, Masahiro Yamada, Matthias Schiffer, Naresh Kamboju, NathanChancellor, Nathan Lynch, Naveen N Rao, Nicholas Miehlbradt, Ran Wang,Randy Dunlap, Ritesh Harjani, Sachin Sant, Shirisha Ganta, ShrikanthHegde, Sourabh Jain, Stephen Rothwell, sundar, Thorsten Blum, VaibhavJain, Xiaowei Bao, Yang Li, and Zhao Chenhui.* tag 'powerpc-6.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (85 commits) powerpc/fadump: Fix section mismatch warning powerpc/85xx: fix compile error without CONFIG_CRASH_DUMP powerpc/fadump: update documentation about bootargs_append powerpc/fadump: pass additional parameters when fadump is active powerpc/fadump: setup additional parameters for dump capture kernel powerpc/pseries/fadump: add support for multiple boot memory regions selftests/powerpc/dexcr: Fix spelling mistake "predicition" -> "prediction" KVM: PPC: Book3S HV nestedv2: Fix an error handling path in gs_msg_ops_kvmhv_nestedv2_config_fill_info() KVM: PPC: Fix documentation for ppc mmu caps KVM: PPC: code cleanup for kvmppc_book3s_irqprio_deliver KVM: PPC: Book3S HV nestedv2: Cancel pending DEC exception powerpc/xmon: Check cpu id in commands "c#", "dp#" and "dx#" powerpc/code-patching: Use dedicated memory routines for patching powerpc/code-patching: Test patch_instructions() during boot powerpc64/kasan: Pass virtual addresses to kasan_init_phys_region() powerpc: rename SPRN_HID2 define to SPRN_HID2_750FX powerpc: Fix typos powerpc/eeh: Fix spelling of the word "auxillary" and update comment macintosh/ams: Fix unused variable warning powerpc/Makefile: Remove bits related to the previous use of -mcmodel=large ...
selftests/powerpc: make sub-folders buildable on their ownBuild breaks when executing make with run_tests for sub-foldersunder powerpc. This is because, CFLAGS and GIT_VERSION macros aredefined i
selftests/powerpc: make sub-folders buildable on their ownBuild breaks when executing make with run_tests for sub-foldersunder powerpc. This is because, CFLAGS and GIT_VERSION macros aredefined in Makefile of toplevel powerpc folder. make: Entering directory '/home/maddy/linux/tools/testing/selftests/powerpc/mm' gcc hugetlb_vs_thp_test.c ../harness.c ../utils.c -o /home/maddy/selftest_output//hugetlb_vs_thp_test hugetlb_vs_thp_test.c:6:10: fatal error: utils.h: No such file or directory 6 | #include "utils.h" | ^~~~~~~~~ compilation terminated.Fix this by adding the flags.mk in each sub-folder Makefile. Also removethe CFLAGS and GIT_VERSION macros from powerpc/ folder Makefile sincethe same is definied in flags.mkSigned-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>Link: https://msgid.link/20240229093711.581230-3-maddy@linux.ibm.com
selftests/powerpc/papr-vpd: Fix missing variable initializationThe "close handle without consuming VPD" testcase has inconsistentresults because it fails to initialize the location code object it
selftests/powerpc/papr-vpd: Fix missing variable initializationThe "close handle without consuming VPD" testcase has inconsistentresults because it fails to initialize the location code object itpasses to ioctl() to create a VPD handle. Initialize the location codeto the empty string as intended.Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")Reported-by: Geetika Moolchandani <geetika@linux.ibm.com>Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>Link: https://msgid.link/20240404-papr-vpd-test-uninit-lc-v2-1-37bff46c65a5@linux.ibm.com
selftests/powerpc/papr_vpd: Check devfd before get_system_loc_code()Calling get_system_loc_code before checking devfd and errno fails the testwhen the device is not available, the expected behavio
selftests/powerpc/papr_vpd: Check devfd before get_system_loc_code()Calling get_system_loc_code before checking devfd and errno fails the testwhen the device is not available, the expected behaviour is a SKIP.Change the order of 'SKIP_IF_MSG' to correctly SKIP when the /dev/papr-vpd device is not available.Test output before: Test FAILED on line 271Test output after: [SKIP] Test skipped on line 266: /dev/papr-vpd not presentSigned-off-by: R Nageswara Sastry <rnsastry@linux.ibm.com>Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>Link: https://msgid.link/20240131130859.14968-1-rnsastry@linux.ibm.com
powerpc/selftests: Add test for papr-vpdAdd selftests for /dev/papr-vpd, exercising the common expected usecases:* Retrieve all VPD by passing an empty location code.* Retrieve the "system VPD"
powerpc/selftests: Add test for papr-vpdAdd selftests for /dev/papr-vpd, exercising the common expected usecases:* Retrieve all VPD by passing an empty location code.* Retrieve the "system VPD" by passing a location code derived from DT root node properties, as done by the vpdupdate command.The tests also verify that certain intended properties of the driverhold:* Passing an unterminated location code to PAPR_VPD_CREATE_HANDLE gets EINVAL.* Passing a NULL location code pointer to PAPR_VPD_CREATE_HANDLE gets EFAULT.* Closing the device node without first issuing a PAPR_VPD_CREATE_HANDLE command to it succeeds.* Releasing a handle without first consuming any data from it succeeds.* Re-reading the contents of a handle returns the same data as the first time.Some minimal validation of the returned data is performed.The tests are skipped on systems where the papr-vpd driver does notinitialize, making this useful only on PowerVM LPARs at this point.Signed-off-by: Nathan Lynch <nathanl@linux.ibm.com>Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-12-e9eafd0c8c6c@linux.ibm.com