selftests/mm: Dont fail testsuite due to a lack of hugepages

Message ID 20240301073300.287508-1-npache@redhat.com
State New
Headers
Series selftests/mm: Dont fail testsuite due to a lack of hugepages |

Commit Message

Nico Pache March 1, 2024, 7:33 a.m. UTC
  On systems that have large core counts and large page sizes, but limited
memory, the userfaultfd test hugepage requirement is too large.

Exiting early due to missing one test's requirements is a rather aggressive
strategy, and prevents a lot of other tests from running. Remove the
early exit to prevent this.

Fixes: ee00479d6702 ("selftests: vm: Try harder to allocate huge pages")
Signed-off-by: Nico Pache <npache@redhat.com>
---
 tools/testing/selftests/mm/run_vmtests.sh | 1 -
 1 file changed, 1 deletion(-)
  

Comments

Muhammad Usama Anjum March 1, 2024, 9:28 a.m. UTC | #1
On 3/1/24 12:33 PM, Nico Pache wrote:
> On systems that have large core counts and large page sizes, but limited
> memory, the userfaultfd test hugepage requirement is too large.
> 
> Exiting early due to missing one test's requirements is a rather aggressive
> strategy, and prevents a lot of other tests from running. Remove the
> early exit to prevent this.
Why don't we only skip that particular test which requires huge number of
pages instead? Thus the behavior of this script would remain same.

> 
> Fixes: ee00479d6702 ("selftests: vm: Try harder to allocate huge pages")
> Signed-off-by: Nico Pache <npache@redhat.com>
> ---
>  tools/testing/selftests/mm/run_vmtests.sh | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
> index 246d53a5d7f28..727ea22ba408e 100755
> --- a/tools/testing/selftests/mm/run_vmtests.sh
> +++ b/tools/testing/selftests/mm/run_vmtests.sh
> @@ -173,7 +173,6 @@ if [ -n "$freepgs" ] && [ -n "$hpgsize_KB" ]; then
>  	if [ "$freepgs" -lt "$needpgs" ]; then
>  		printf "Not enough huge pages available (%d < %d)\n" \
>  		       "$freepgs" "$needpgs"
> -		exit 1
>  	fi
>  else
>  	echo "no hugetlbfs support in kernel?"
  

Patch

diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
index 246d53a5d7f28..727ea22ba408e 100755
--- a/tools/testing/selftests/mm/run_vmtests.sh
+++ b/tools/testing/selftests/mm/run_vmtests.sh
@@ -173,7 +173,6 @@  if [ -n "$freepgs" ] && [ -n "$hpgsize_KB" ]; then
 	if [ "$freepgs" -lt "$needpgs" ]; then
 		printf "Not enough huge pages available (%d < %d)\n" \
 		       "$freepgs" "$needpgs"
-		exit 1
 	fi
 else
 	echo "no hugetlbfs support in kernel?"