aboutsummaryrefslogtreecommitdiff
path: root/tests/testutils.c
diff options
context:
space:
mode:
authorAndrew Hastings <abh@cray.com>2007-05-11 15:46:18 -0500
committerNishanth Aravamudan <nacc@us.ibm.com>2007-05-14 09:56:55 -0700
commit0ede4879037bbfc0271973acf248f9442387adde (patch)
tree5d8dce4650f7bf6791570af1895b83332149c482 /tests/testutils.c
parent6ee93f187bb3d5b70ec3157a1da06f7a97556f0e (diff)
downloadlibhugetlbfs-0ede4879037bbfc0271973acf248f9442387adde.tar.gz
test_utils: fix test_addr_huge for anon pages
If the address being tested resides in an anon region that immediately follows a hugetlb region, test_addr_huge erroneously reports the address as huge. Signed-off-by: Andrew Hastings <abh@cray.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Diffstat (limited to 'tests/testutils.c')
-rw-r--r--tests/testutils.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/testutils.c b/tests/testutils.c
index b904d89..2ae80ab 100644
--- a/tests/testutils.c
+++ b/tests/testutils.c
@@ -101,6 +101,7 @@ static int read_maps(unsigned long addr, char *buf)
if (!tmp)
break;
+ buf[0] = '\0';
ret = sscanf(line, "%lx-%lx %*s %lx %*s %ld %255s",
&start, &end, &off, &ino,
buf);