public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux•ibm.com>
To: Sandipan Das <sandipan@linux•ibm.com>, mpe@ellerman•id.au
Cc: harish@linux•ibm.com, efuller@redhat•com, linuxppc-dev@lists•ozlabs.org
Subject: Re: [PATCH] selftests/powerpc: Fix exit status of pkey tests
Date: Tue, 19 Jan 2021 10:05:07 +0530	[thread overview]
Message-ID: <87wnw95ytg.fsf@linux.ibm.com> (raw)
In-Reply-To: <20210118093145.10134-1-sandipan@linux.ibm.com>

Sandipan Das <sandipan@linux•ibm.com> writes:

> Since main() does not return a value explicitly, the
> return values from FAIL_IF() conditions are ignored
> and the tests can still pass irrespective of failures.
> This makes sure that we always explicitly return the
> correct test exit status.
>

Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux•ibm.com>

> Reported-by: Eirik Fuller <efuller@redhat•com>
> Fixes: 1addb6444791 ("selftests/powerpc: Add test for execute-disabled pkeys")
> Fixes: c27f2fd1705a ("selftests/powerpc: Add test for pkey siginfo verification")
> Signed-off-by: Sandipan Das <sandipan@linux•ibm.com>
> ---
>  tools/testing/selftests/powerpc/mm/pkey_exec_prot.c | 2 +-
>  tools/testing/selftests/powerpc/mm/pkey_siginfo.c   | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/powerpc/mm/pkey_exec_prot.c b/tools/testing/selftests/powerpc/mm/pkey_exec_prot.c
> index 9e5c7f3f498a..0af4f02669a1 100644
> --- a/tools/testing/selftests/powerpc/mm/pkey_exec_prot.c
> +++ b/tools/testing/selftests/powerpc/mm/pkey_exec_prot.c
> @@ -290,5 +290,5 @@ static int test(void)
>  
>  int main(void)
>  {
> -	test_harness(test, "pkey_exec_prot");
> +	return test_harness(test, "pkey_exec_prot");
>  }
> diff --git a/tools/testing/selftests/powerpc/mm/pkey_siginfo.c b/tools/testing/selftests/powerpc/mm/pkey_siginfo.c
> index 4f815d7c1214..2db76e56d4cb 100644
> --- a/tools/testing/selftests/powerpc/mm/pkey_siginfo.c
> +++ b/tools/testing/selftests/powerpc/mm/pkey_siginfo.c
> @@ -329,5 +329,5 @@ static int test(void)
>  
>  int main(void)
>  {
> -	test_harness(test, "pkey_siginfo");
> +	return test_harness(test, "pkey_siginfo");
>  }
> -- 
> 2.25.1

  reply	other threads:[~2021-01-19  4:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-18  9:31 [PATCH] selftests/powerpc: Fix exit status of pkey tests Sandipan Das
2021-01-19  4:35 ` Aneesh Kumar K.V [this message]
2021-01-20  4:44 ` Michael Ellerman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wnw95ytg.fsf@linux.ibm.com \
    --to=aneesh.kumar@linux$(echo .)ibm.com \
    --cc=efuller@redhat$(echo .)com \
    --cc=harish@linux$(echo .)ibm.com \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=mpe@ellerman$(echo .)id.au \
    --cc=sandipan@linux$(echo .)ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox