public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
To: DJ Delorie <dj@redhat.com>
Cc: <libc-alpha@sourceware.org>
Subject: Re: [PATCH] tst-mallinfo2.c: Use correct multiple for total variable
Date: Thu, 4 Feb 2021 09:30:23 +0800	[thread overview]
Message-ID: <601B4E2F.5050401@cn.fujitsu.com> (raw)
In-Reply-To: <xnsg6cdbr1.fsf@greed.delorie.com>

Hi Delorie
> Yang Xu<xuyang2018.jy@cn.fujitsu.com>  writes:
>> 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.
> 
> Wouldn't we need to change the ">" to">=" so that the test is
> technically valid?

Do you mean "TEST_VERIFY (mi2.uordblks > mi1.uordblks + total);"?
From my test result, this value is greater than "mi1.uordblks + total" .
I think using ">" is ok.
> 
>> Signed-off-by: Yang Xu<xuyang2018.jy@cn.fujitsu.com>
> 
> FYI glibc doesn't use the signed-off-by tag; we actually require
> copyright assignment for large patches (this isn't large enough :).
OK. I understand.
> 
>>   malloc/tst-mallinfo2.c | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/malloc/tst-mallinfo2.c b/malloc/tst-mallinfo2.c
>> index 59a15cf7a8..a2a2550931 100644
>> --- a/malloc/tst-mallinfo2.c
>> +++ b/malloc/tst-mallinfo2.c
>> @@ -68,7 +68,7 @@ do_test (void)
>>     for (i = 1; i<  20; ++i)
>>       {
>>         ptr = malloc (160 * i);
>> -      total += 16 * i;
>> +      total += 160 * i;
>>       }
>>
>>     mi2 = mallinfo2 ();
> 
> 
> 
> .
> 




  reply	other threads:[~2021-02-04  1:30 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-03  5:45 Yang Xu
2021-02-03 22:31 ` DJ Delorie
2021-02-04  1:30   ` Yang Xu [this message]
2021-02-16  3:44     ` DJ Delorie
2021-02-18  2:38       ` Yang Xu
2021-02-18  2:56       ` [PATCH v2] " Yang Xu
2021-02-23  2:29         ` Carlos O'Donell
2021-05-11  5:52           ` xuyang2018.jy
2021-05-19  0:32             ` naohirot
2021-05-25 20:49               ` DJ Delorie

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=601B4E2F.5050401@cn.fujitsu.com \
    --to=xuyang2018.jy@cn.fujitsu.com \
    --cc=dj@redhat.com \
    --cc=libc-alpha@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).