• Ryan Roberts's avatar
    selftests/mm: optionally pass duration to transhuge-stress · e1706210
    Ryan Roberts authored
    Until now, transhuge-stress runs until its explicitly killed, so when
    invoked by run_kselftest.sh, it would run until the test timeout, then it
    would be killed and the test would be marked as failed.
    
    Add a new, optional command line parameter that allows the user to specify
    the duration in seconds that the program should run.  The program exits
    after this duration with a success (0) exit code.  If the argument is
    omitted the old behacvior remains.
    
    On it's own, this doesn't quite solve our problem because run_kselftest.sh
    does not allow passing parameters to the program under test.  But we will
    shortly move this to run_vmtests.sh, which does allow parameter passing.
    
    Link: https://lkml.kernel.org/r/20230724082522.1202616-8-ryan.roberts@arm.com
    
    Signed-off-by: default avatarRyan Roberts <ryan.roberts@arm.com>
    Acked-by: default avatarDavid Hildenbrand <david@redhat.com>
    Cc: Florent Revest <revest@chromium.org>
    Cc: Jérôme Glisse <jglisse@redhat.com>
    Cc: John Hubbard <jhubbard@nvidia.com>
    Cc: Mark Brown <broonie@kernel.org>
    Cc: Peter Xu <peterx@redhat.com>
    Cc: Shuah Khan <shuah@kernel.org>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    e1706210
transhuge-stress.c 3.06 KB