lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAA1CXcDL+WNnn57dDQSLVkHNr46hJZf2PPTO-1zgesc1j2uxTA@mail.gmail.com>
Date: Mon, 17 Feb 2025 14:32:29 -0700
From: Nico Pache <npache@...hat.com>
To: Mark Brown <broonie@...nel.org>
Cc: Andrew Morton <akpm@...ux-foundation.org>, Shuah Khan <shuah@...nel.org>, linux-mm@...ck.org, 
	linux-kselftest@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] selftests/mm: Fix check for running THP tests

On Wed, Feb 12, 2025 at 10:52 AM Mark Brown <broonie@...nel.org> wrote:
>
> When testing if we should try to compact memory or drop caches before we
> run the THP or HugeTLB tests we use | as an or operator. This doesn't work
> since run_vmtests.sh is written in shell where this is used to pipe the
> output of the first argument into the second. Instead use the shell's -o
> operator.
>
> Fixes: b433ffa8dbac ("selftests: mm: perform some system cleanup before using hugepages")
> Signed-off-by: Mark Brown <broonie@...nel.org>

Ah I meant to use || which i believe also works in shell. Thanks for the fix!

Reviewed-by: Nico Pache <npache@...hat.com>
> ---
>  tools/testing/selftests/mm/run_vmtests.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/testing/selftests/mm/run_vmtests.sh b/tools/testing/selftests/mm/run_vmtests.sh
> index 333c468c26991421cd8f9ce6d995f9b64b0643c7..da7e266681031d2772fb0c4139648904a18e0bf9 100755
> --- a/tools/testing/selftests/mm/run_vmtests.sh
> +++ b/tools/testing/selftests/mm/run_vmtests.sh
> @@ -220,7 +220,7 @@ run_test() {
>         if test_selected ${CATEGORY}; then
>                 # On memory constrainted systems some tests can fail to allocate hugepages.
>                 # perform some cleanup before the test for a higher success rate.
> -               if [ ${CATEGORY} == "thp" ] | [ ${CATEGORY} == "hugetlb" ]; then
> +               if [ ${CATEGORY} == "thp" -o ${CATEGORY} == "hugetlb" ]; then
>                         echo 3 > /proc/sys/vm/drop_caches
>                         sleep 2
>                         echo 1 > /proc/sys/vm/compact_memory
>
> --
> 2.39.5
>


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ