diff mbox series

[v2] tst-mallinfo2.c: Use correct multiple for total variable

Message ID 1613616993-2623-1-git-send-email-xuyang2018.jy@cn.fujitsu.com
State FSF Assignment Missing
Headers show
Series [v2] tst-mallinfo2.c: Use correct multiple for total variable | expand

Commit Message

Yang Xu Feb. 18, 2021, 2:56 a.m. UTC
Since test uses 160 multiple for malloc size, we should also use 160 multiple
for total variable instead of 16, then comparison is meaningful. So fix it.

Also change the ">" to ">=" so that the test is technically valid.
---
 malloc/tst-mallinfo2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Carlos O'Donell Feb. 23, 2021, 2:29 a.m. UTC | #1
On 2/17/21 9:56 PM, Yang Xu wrote:
> Since test uses 160 multiple for malloc size, we should also use 160 multiple
> for total variable instead of 16, then comparison is meaningful. So fix it.
 
> Also change the ">" to ">=" so that the test is technically valid.

Yang,

Thank you very much for your great work with this patch.

I need your help in order to complete the FSF copyright assignment process
with Fujitsu.

I've sent you an Naohiro and email to start the process.

Thank you for your help.

> ---
>  malloc/tst-mallinfo2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/malloc/tst-mallinfo2.c b/malloc/tst-mallinfo2.c
> index 59a15cf7a8..7d00b65f6e 100644
> --- a/malloc/tst-mallinfo2.c
> +++ b/malloc/tst-mallinfo2.c
> @@ -68,14 +68,14 @@ do_test (void)
>    for (i = 1; i < 20; ++i)
>      {
>        ptr = malloc (160 * i);
> -      total += 16 * i;
> +      total += 160 * i;
>      }
>  
>    mi2 = mallinfo2 ();
>    print_mi ("after", &mi2);
>  
>    /* Check at least something changed.  */
> -  TEST_VERIFY (mi2.uordblks > mi1.uordblks + total);
> +  TEST_VERIFY (mi2.uordblks >= mi1.uordblks + total);
>  
>    return 0;
>  }
>
xuyang2018.jy@fujitsu.com May 11, 2021, 5:52 a.m. UTC | #2
Hi Carlos , DJ

Fujitsu submitted signed assignment finally.
So please kindly merge the following patch.

https://patchwork.ozlabs.org/project/glibc/patch/1613616993-2623-1-git-send-email-xuyang2018.jy@cn.fujitsu.com/

Best Regards
Yang Xu
-----Original Message-----
From: Carlos O'Donell <carlos@redhat.com> 
Sent: Tuesday, February 23, 2021 10:30 AM
To: Xu, Yang/徐 杨 <xuyang2018.jy@cn.fujitsu.com>; libc-alpha@sourceware.org; DJ Delorie <dj@redhat.com>
Subject: Re: [PATCH v2] tst-mallinfo2.c: Use correct multiple for total variable

On 2/17/21 9:56 PM, Yang Xu wrote:
> Since test uses 160 multiple for malloc size, we should also use 160 
> multiple for total variable instead of 16, then comparison is meaningful. So fix it.
 
> Also change the ">" to ">=" so that the test is technically valid.

Yang,

Thank you very much for your great work with this patch.

I need your help in order to complete the FSF copyright assignment process with Fujitsu.

I've sent you an Naohiro and email to start the process.

Thank you for your help.

> ---
>  malloc/tst-mallinfo2.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/malloc/tst-mallinfo2.c b/malloc/tst-mallinfo2.c index 
> 59a15cf7a8..7d00b65f6e 100644
> --- a/malloc/tst-mallinfo2.c
> +++ b/malloc/tst-mallinfo2.c
> @@ -68,14 +68,14 @@ do_test (void)
>    for (i = 1; i < 20; ++i)
>      {
>        ptr = malloc (160 * i);
> -      total += 16 * i;
> +      total += 160 * i;
>      }
>  
>    mi2 = mallinfo2 ();
>    print_mi ("after", &mi2);
>  
>    /* Check at least something changed.  */
> -  TEST_VERIFY (mi2.uordblks > mi1.uordblks + total);
> +  TEST_VERIFY (mi2.uordblks >= mi1.uordblks + total);
>  
>    return 0;
>  }
> 


--
Cheers,
Carlos.
Naohiro Tamura May 19, 2021, 12:32 a.m. UTC | #3
Hi Carlos , DJ,
cc: Yang,

> From: Libc-alpha <libc-alpha-bounces@sourceware.org> On Behalf Of
> xuyang2018.jy@fujitsu.com
> Hi Carlos , DJ
> 
> Fujitsu submitted signed assignment finally.
> So please kindly merge the following patch.
> 
> https://patchwork.ozlabs.org/project/glibc/patch/1613616993-2623-1-git-send
> -email-xuyang2018.jy@cn.fujitsu.com/

Fujitsu has received FSF signed assignment.
So the contract process has completed.

Thanks.
Naohiro
 
> Best Regards
> Yang Xu
> -----Original Message-----
> From: Carlos O'Donell <carlos@redhat.com>
> Sent: Tuesday, February 23, 2021 10:30 AM
> To: Xu, Yang/徐 杨 <xuyang2018.jy@cn.fujitsu.com>;
> libc-alpha@sourceware.org; DJ Delorie <dj@redhat.com>
> Subject: Re: [PATCH v2] tst-mallinfo2.c: Use correct multiple for total variable
> 
> On 2/17/21 9:56 PM, Yang Xu wrote:
> > Since test uses 160 multiple for malloc size, we should also use 160
> > multiple for total variable instead of 16, then comparison is meaningful. So fix it.
> 
> > Also change the ">" to ">=" so that the test is technically valid.
> 
> Yang,
> 
> Thank you very much for your great work with this patch.
> 
> I need your help in order to complete the FSF copyright assignment process with
> Fujitsu.
> 
> I've sent you an Naohiro and email to start the process.
> 
> Thank you for your help.
> 
> > ---
> >  malloc/tst-mallinfo2.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/malloc/tst-mallinfo2.c b/malloc/tst-mallinfo2.c index
> > 59a15cf7a8..7d00b65f6e 100644
> > --- a/malloc/tst-mallinfo2.c
> > +++ b/malloc/tst-mallinfo2.c
> > @@ -68,14 +68,14 @@ do_test (void)
> >    for (i = 1; i < 20; ++i)
> >      {
> >        ptr = malloc (160 * i);
> > -      total += 16 * i;
> > +      total += 160 * i;
> >      }
> >
> >    mi2 = mallinfo2 ();
> >    print_mi ("after", &mi2);
> >
> >    /* Check at least something changed.  */
> > -  TEST_VERIFY (mi2.uordblks > mi1.uordblks + total);
> > +  TEST_VERIFY (mi2.uordblks >= mi1.uordblks + total);
> >
> >    return 0;
> >  }
> >
> 
> 
> --
> Cheers,
> Carlos.
> 
>
DJ Delorie May 25, 2021, 8:49 p.m. UTC | #4
"naohirot@fujitsu.com" <naohirot@fujitsu.com> writes:
>> Fujitsu submitted signed assignment finally.
>> So please kindly merge the following patch.

I see the assignment on our side, so I've committed your patch.  Thank
you for your patience :-)
diff mbox series

Patch

diff --git a/malloc/tst-mallinfo2.c b/malloc/tst-mallinfo2.c
index 59a15cf7a8..7d00b65f6e 100644
--- a/malloc/tst-mallinfo2.c
+++ b/malloc/tst-mallinfo2.c
@@ -68,14 +68,14 @@  do_test (void)
   for (i = 1; i < 20; ++i)
     {
       ptr = malloc (160 * i);
-      total += 16 * i;
+      total += 160 * i;
     }
 
   mi2 = mallinfo2 ();
   print_mi ("after", &mi2);
 
   /* Check at least something changed.  */
-  TEST_VERIFY (mi2.uordblks > mi1.uordblks + total);
+  TEST_VERIFY (mi2.uordblks >= mi1.uordblks + total);
 
   return 0;
 }