aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2009-10-16 13:38:30 +1100
committerEric B Munson <ebmunson@us.ibm.com>2009-10-16 07:39:38 +0100
commit0b666dd97e440a4da8da6627e40c0a6bac11f26e (patch)
tree9f26284848c9ffe7590a2a16f652c929d0157f15 /tests
parentd1b7b9156443acabe267841ba807be5561a06f17 (diff)
downloadlibhugetlbfs-0b666dd97e440a4da8da6627e40c0a6bac11f26e.tar.gz
Fix for bitrot in linkhuge_nofd
The linkhuge_nofd testcase no longer tests what it's supposed to - that the elflink code will correctly fall back to normal pages if hugepages are not available. The testcase checked this path by overriding the hugetlbfs_unlinked_fd() function with one that always fails. However newer revisions of the elflink code don't use the hugetlbfs_unlinked_fd() function, they use the lower level hugetlbfs_unlinked_fd_for_size(). This patch overrides the correct function and make the testcase do what it's supposed to. Currently the test is effectively a duplicate of the main linkhuge test. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/linkhuge_nofd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/linkhuge_nofd.c b/tests/linkhuge_nofd.c
index 45e6b9f..f04cd8e 100644
--- a/tests/linkhuge_nofd.c
+++ b/tests/linkhuge_nofd.c
@@ -26,7 +26,7 @@
#include "hugetests.h"
/* Override the working version from libhugetlbfs */
-int hugetlbfs_unlinked_fd(void)
+int hugetlbfs_unlinked_fd_for_size(long page_size)
{
return -1;
}