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 <[email protected]>Link: https://patch.msgid.link/[email protected]
show more ...
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 <[email protected]>Signed-off-by: Michael Ellerman <[email protected]>Link: https://msgid.link/[email protected]
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 <[email protected]>Fixes: 9118c5d32bdd ("powerpc/selftests: Add test for papr-vpd")Reported-by: Geetika Moolchandani <[email protected]>Signed-off-by: Michael Ellerman <[email protected]>Link: https://msgid.link/[email protected]
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 <[email protected]>Signed-off-by: Michael Ellerman <[email protected]>Link: https://msgid.link/[email protected]
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 <[email protected]>Signed-off-by: Michael Ellerman <[email protected]>Link: https://msgid.link/20231212-papr-sys_rtas-vs-lockdown-v6-12-e9eafd0c8c6c@linux.ibm.com