mirror of
git://sourceware.org/git/glibc.git
synced 2025-02-17 13:00:43 +08:00
tst-mallinfo2.c: Use correct multiple for total variable
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. Reviewed-by: DJ Delorie <dj@redhat.com>
This commit is contained in:
parent
ac0353af81
commit
bfbdfe4eab
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user