aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/powerpc/nx-gzip
AgeCommit message (Collapse)AuthorFilesLines
2024-04-29selftests/powerpc: make sub-folders buildable on their ownMadhavan Srinivasan1-0/+1
Build breaks when executing make with run_tests for sub-folders under powerpc. This is because, CFLAGS and GIT_VERSION macros are defined 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 remove the CFLAGS and GIT_VERSION macros from powerpc/ folder Makefile since the same is definied in flags.mk Signed-off-by: Madhavan Srinivasan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
2024-04-29selftests/powerpc: Re-order *FLAGS to follow lib.mkMadhavan Srinivasan1-2/+2
In some powerpc/ sub-folder Makefiles, CFLAGS are defined before lib.mk include. Clean it up by re-ordering the flags to follow after the mk include. This is needed to support sub-folders in powerpc/ buildable on its own. Signed-off-by: Madhavan Srinivasan <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://msgid.link/[email protected]
2023-02-09selftests/powerpc: Add automatically allocating read_fileBenjamin Gray1-37/+1
A couple of tests roll their own auto-allocating file read logic. Add a generic implementation and convert them to use it. Signed-off-by: Benjamin Gray <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2023-02-09selftests/powerpc: Add generic read/write file utilBenjamin Gray1-30/+18
File read/write is reimplemented in about 5 different ways in the various PowerPC selftests. This indicates it should be a common util. Add a common read_file / write_file implementation and convert users to it where (easily) possible. Signed-off-by: Benjamin Gray <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-06-25selftests/powerpc: Use req_max_processed_len from sysfs NX capabilitiesHaren Myneni2-4/+17
On PowerVM, the hypervisor defines the maximum buffer length for each NX request and the kernel exported this value via sysfs. This patch reads this value if the sysfs entry is available and is used to limit the request length. Signed-off-by: Haren Myneni <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2021-04-23selftests/powerpc: remove unneeded semicolonYang Li1-1/+1
Eliminate the following coccicheck warning: ./tools/testing/selftests/powerpc/nx-gzip/gzfht_test.c:327:4-5: Unneeded semicolon Reported-by: Abaci Robot <[email protected]> Signed-off-by: Yang Li <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-12-04selftests/powerpc: update .gitignoreDaniel Axtens1-0/+3
I did an in-place build of the self-tests and found that it left the tree dirty. Add missed test binaries to .gitignore Signed-off-by: Daniel Axtens <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-07-15selftests/powerpc: Use proper error code to check fault addressHaren Myneni2-4/+4
ERR_NX_TRANSLATION(CSB.CC=5) is for internal to VAS for fault handling and should not used by OS. ERR_NX_AT_FAULT(CSB.CC=250) is the proper error code should be reported by OS when NX encounters address translation failure. This patch uses CC=250 to determine the fault address when the request is not successful. Signed-off-by: Haren Myneni <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-04-21selftests/powerpc: Add README for GZIP engine testsRaphael Moreira Zinsly2-0/+46
Include a README file with the instructions to use the testcases at selftests/powerpc/nx-gzip. Signed-off-by: Bulent Abali <[email protected]> Signed-off-by: Raphael Moreira Zinsly <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-04-21selftests/powerpc: Add NX-GZIP engine decompress testcaseRaphael Moreira Zinsly3-1/+1030
Include a decompression testcase for the powerpc NX-GZIP engine. Signed-off-by: Bulent Abali <[email protected]> Signed-off-by: Raphael Moreira Zinsly <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-04-21selftests/powerpc: Add NX-GZIP engine compress testcaseRaphael Moreira Zinsly4-0/+802
Add a compression testcase for the powerpc NX-GZIP engine. Signed-off-by: Bulent Abali <[email protected]> Signed-off-by: Raphael Moreira Zinsly <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-04-21selftests/powerpc: Add header files for NX compresion/decompressionRaphael Moreira Zinsly3-0/+801
Add files to be able to compress and decompress files using the powerpc NX-GZIP engine. Signed-off-by: Bulent Abali <[email protected]> Signed-off-by: Raphael Moreira Zinsly <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]
2020-04-21selftests/powerpc: Add header files for GZIP engine testRaphael Moreira Zinsly3-0/+194
Add files to access the powerpc NX-GZIP engine in user space. Signed-off-by: Bulent Abali <[email protected]> Signed-off-by: Raphael Moreira Zinsly <[email protected]> Signed-off-by: Michael Ellerman <[email protected]> Link: https://lore.kernel.org/r/[email protected]