[18/21] rt/tst-mqueue4.c: Fix wrong number of argument for mq_open

Message ID 20230620181910.1506893-19-fberat@redhat.com
State Committed
Commit 131af38694627f9e5aee13fdc301bf2010759a1b
Headers
Series Allow glibc to be built with _FORTIFY_SOURCE |

Checks

Context Check Description
redhat-pt-bot/TryBot-apply_patch success Patch applied to master at the time it was sent
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 fail Testing failed
linaro-tcwg-bot/tcwg_glibc_build--master-arm success Testing passed
linaro-tcwg-bot/tcwg_glibc_check--master-arm fail Testing failed

Commit Message

Frederic Berat June 20, 2023, 6:19 p.m. UTC
  The mq_open routine should only get either 2 or 4 arguments, this test
wrongly passed 3.
---
 rt/tst-mqueue4.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Siddhesh Poyarekar June 21, 2023, 12:26 p.m. UTC | #1
On 2023-06-20 14:19, Frédéric Bérat wrote:
> The mq_open routine should only get either 2 or 4 arguments, this test
> wrongly passed 3.
> ---

LGTM.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

>   rt/tst-mqueue4.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/rt/tst-mqueue4.c b/rt/tst-mqueue4.c
> index fe456287a3..9fcaef107b 100644
> --- a/rt/tst-mqueue4.c
> +++ b/rt/tst-mqueue4.c
> @@ -175,14 +175,14 @@ do_test (void)
>         result = 1;
>       }
>   
> -  q2 = mq_open (name, O_RDONLY, 0600);
> +  q2 = mq_open (name, O_RDONLY);
>     if (q2 == (mqd_t) -1)
>       {
>         printf ("mq_open without O_CREAT failed with %m\n");
>         result = 1;
>       }
>   
> -  mqd_t q3 = mq_open (name, O_RDONLY, 0600);
> +  mqd_t q3 = mq_open (name, O_RDONLY);
>     if (q3 == (mqd_t) -1)
>       {
>         printf ("mq_open without O_CREAT failed with %m\n");
  

Patch

diff --git a/rt/tst-mqueue4.c b/rt/tst-mqueue4.c
index fe456287a3..9fcaef107b 100644
--- a/rt/tst-mqueue4.c
+++ b/rt/tst-mqueue4.c
@@ -175,14 +175,14 @@  do_test (void)
       result = 1;
     }
 
-  q2 = mq_open (name, O_RDONLY, 0600);
+  q2 = mq_open (name, O_RDONLY);
   if (q2 == (mqd_t) -1)
     {
       printf ("mq_open without O_CREAT failed with %m\n");
       result = 1;
     }
 
-  mqd_t q3 = mq_open (name, O_RDONLY, 0600);
+  mqd_t q3 = mq_open (name, O_RDONLY);
   if (q3 == (mqd_t) -1)
     {
       printf ("mq_open without O_CREAT failed with %m\n");