diff options
author | Yang Xu <xuyang2018.jy@cn.fujitsu.com> | 2021-02-18 10:56:33 +0800 |
---|---|---|
committer | DJ Delorie <dj@redhat.com> | 2021-05-25 16:47:01 -0400 |
commit | bfbdfe4eabb7514d7c44f3bc161fa8ef4e2ee364 (patch) | |
tree | e719983dcf426b6c59518d4e41fa2d3c83d59379 /malloc | |
parent | ac0353af81a23535f517586a5d04427120a157ac (diff) | |
download | glibc-bfbdfe4eabb7514d7c44f3bc161fa8ef4e2ee364.zip glibc-bfbdfe4eabb7514d7c44f3bc161fa8ef4e2ee364.tar.gz glibc-bfbdfe4eabb7514d7c44f3bc161fa8ef4e2ee364.tar.bz2 |
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>
Diffstat (limited to 'malloc')
-rw-r--r-- | malloc/tst-mallinfo2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/malloc/tst-mallinfo2.c b/malloc/tst-mallinfo2.c index 59a15cf..7d00b65 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; } |