]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/mm: skip virtual_address_range tests on riscv
authorChunyan Zhang <zhangchunyan@iscas.ac.cn>
Tue, 8 Oct 2024 09:41:41 +0000 (17:41 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 11 Nov 2024 21:09:42 +0000 (13:09 -0800)
RISC-V doesn't currently have the behavior of restricting the virtual
address space which virtual_address_range tests check, this will
cause the tests fail. So lets disable the whole test suite for riscv64
for now, not build it and run_vmtests.sh will skip it if it is not present.

Link: https://lkml.kernel.org/r/20241008094141.549248-5-zhangchunyan@iscas.ac.cn
Signed-off-by: Chunyan Zhang <zhangchunyan@iscas.ac.cn>
Reviewed-by: Charlie Jenkins <charlie@rivosinc.com>
Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
Cc: Alexandre Ghiti <alex@ghiti.fr>
Cc: Paul Walmsley <paul.walmsley@sifive.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/mm/Makefile
tools/testing/selftests/mm/run_vmtests.sh

index 15c734d6cfec5755a647e7208b62a14a3f70f7ab..00c6fc694633846db051283ef267667f267f0a5b 100644 (file)
@@ -116,7 +116,9 @@ endif
 
 ifneq (,$(filter $(ARCH),arm64 mips64 parisc64 powerpc riscv64 s390x sparc64 x86_64 s390))
 TEST_GEN_FILES += va_high_addr_switch
+ifneq ($(ARCH),riscv64)
 TEST_GEN_FILES += virtual_address_range
+endif
 TEST_GEN_FILES += write_to_hugetlbfs
 endif
 
index c5797ad1d37b68beb5c8482350328d6cb6aca493..4493bfd1911c905f76d550de959835731b5025aa 100755 (executable)
@@ -347,10 +347,12 @@ if [ $VADDR64 -ne 0 ]; then
        # allows high virtual address allocation requests independent
        # of platform's physical memory.
 
-       prev_policy=$(cat /proc/sys/vm/overcommit_memory)
-       echo 1 > /proc/sys/vm/overcommit_memory
-       CATEGORY="hugevm" run_test ./virtual_address_range
-       echo $prev_policy > /proc/sys/vm/overcommit_memory
+       if [ -x ./virtual_address_range ]; then
+               prev_policy=$(cat /proc/sys/vm/overcommit_memory)
+               echo 1 > /proc/sys/vm/overcommit_memory
+               CATEGORY="hugevm" run_test ./virtual_address_range
+               echo $prev_policy > /proc/sys/vm/overcommit_memory
+       fi
 
        # va high address boundary switch test
        ARCH_ARM64="arm64"