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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJHvVciPBM7vRnruDZ3iuYMgwqapB2U6TBtD74s1P-40ZNRy6Q@mail.gmail.com>
Date:   Fri, 22 Apr 2022 15:06:49 -0700
From:   Axel Rasmussen <axelrasmussen@...gle.com>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     Shuah Khan <shuah@...nel.org>, Linux MM <linux-mm@...ck.org>,
        Linuxkselftest <linux-kselftest@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/2] selftests: vm: refactor run_vmtests.sh to reduce boilerplate

Since this is a revert, I guess the diff is "backwards" -- meaning,
others were proposing *adding* $ksft_skip handling to some tests?

if that's the case, then I agree none of those diffs are needed, my
change should properly handle $ksft_skip for all tests now and in the
future.

On Fri, Apr 22, 2022 at 2:55 PM Andrew Morton <akpm@...ux-foundation.org> wrote:
>
> On Thu, 21 Apr 2022 15:49:27 -0700 Axel Rasmussen <axelrasmussen@...gle.com> wrote:
>
> > Previously, each test printed out its own header, dealt with its own
> > return code, etc. By just putting this standard stuff in a function, we
> > can delete > 300 lines from the script.
> >
> > This also makes adding future tests easier. And, it gets rid of various
> > inconsistencies that already exist:
> >
> > - Some tests correctly deal with ksft_skip, but others don't.
> > - Some tests just print the executable name, others print arguments, and
> >   yet others print some comment in the header.
> > - Most tests print out a header with two separator lines, but not the
> >   HMM smoke test or the memfd_secret test, which only print one.
> > - We had a redundant "exit" at the end, with all the boilerplate it's an
> >   easy oversight.
> >
> > Signed-off-by: Axel Rasmussen <axelrasmussen@...gle.com>
> > ---
> >  tools/testing/selftests/vm/run_vmtests.sh | 459 +++-------------------
> >  1 file changed, 64 insertions(+), 395 deletions(-)
>
> Well that's nice.
>
> There were a bunch of changes already pending in this file but I think
> with this patch, they become unneeded.  So I just reverted them all.
> please double check?
>
>
> --- a/tools/testing/selftests/vm/run_vmtests.sh~revert-1
> +++ a/tools/testing/selftests/vm/run_vmtests.sh
> @@ -162,32 +162,22 @@ echo "----------------------------------
>  echo "running: gup_test -u # get_user_pages_fast() benchmark"
>  echo "------------------------------------------------------"
>  ./gup_test -u
> -ret_val=$?
> -
> -if [ $ret_val -eq 0 ]; then
> -       echo "[PASS]"
> -elif [ $ret_val -eq $ksft_skip ]; then
> -        echo "[SKIP]"
> -        exitcode=$ksft_skip
> -else
> +if [ $? -ne 0 ]; then
>         echo "[FAIL]"
>         exitcode=1
> +else
> +       echo "[PASS]"
>  fi
>
>  echo "------------------------------------------------------"
>  echo "running: gup_test -a # pin_user_pages_fast() benchmark"
>  echo "------------------------------------------------------"
>  ./gup_test -a
> -ret_val=$?
> -
> -if [ $ret_val -eq 0 ]; then
> -       echo "[PASS]"
> -elif [ $ret_val -eq $ksft_skip ]; then
> -        echo "[SKIP]"
> -        exitcode=$ksft_skip
> -else
> +if [ $? -ne 0 ]; then
>         echo "[FAIL]"
>         exitcode=1
> +else
> +       echo "[PASS]"
>  fi
>
>  echo "------------------------------------------------------------"
> @@ -195,16 +185,11 @@ echo "# Dump pages 0, 19, and 4096, usin
>  echo "running: gup_test -ct -F 0x1 0 19 0x1000 # dump_page() test"
>  echo "------------------------------------------------------------"
>  ./gup_test -ct -F 0x1 0 19 0x1000
> -ret_val=$?
> -
> -if [ $ret_val -eq 0 ]; then
> -       echo "[PASS]"
> -elif [ $ret_val -eq $ksft_skip ]; then
> -        echo "[SKIP]"
> -        exitcode=$ksft_skip
> -else
> +if [ $? -ne 0 ]; then
>         echo "[FAIL]"
>         exitcode=1
> +else
> +       echo "[PASS]"
>  fi
>
>  echo "-------------------"
> @@ -306,16 +291,11 @@ echo "-------------------"
>  echo "running mremap_test"
>  echo "-------------------"
>  ./mremap_test
> -ret_val=$?
> -
> -if [ $ret_val -eq 0 ]; then
> -       echo "[PASS]"
> -elif [ $ret_val -eq $ksft_skip ]; then
> -        echo "[SKIP]"
> -        exitcode=$ksft_skip
> -else
> +if [ $? -ne 0 ]; then
>         echo "[FAIL]"
>         exitcode=1
> +else
> +       echo "[PASS]"
>  fi
>
>  echo "-----------------"
> _
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ