Fix test on ppc64, which has a 64kB page size.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I6e309855c190b056d886aa3c187a9dc1929d7391
// SPDX-License-Identifier: MIT
// SPDX-FileCopyrightText: 2024 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
-#ifndef _RSEQ_UTILS_H
-#define _RSEQ_UTILS_H
+#ifndef _RSEQ_COMMON_UTILS_H
+#define _RSEQ_COMMON_UTILS_H
+
+#include <stdbool.h>
+#include <stdint.h>
#define RSEQ_ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
return (alignment - p) & (alignment - 1);
}
-#endif /* _RSEQ_UTILS_H */
+#endif /* _RSEQ_COMMON_UTILS_H */
#include <unistd.h>
#include <rseq/mempool.h>
+#include "../src/rseq-utils.h"
#include "list.h"
#include "tap.h"
plan_no_plan();
- /* From 4kB to 4MB */
- for (len = 4096; len < 4096 * 1024; len <<= 1) {
+ /* From page size to 4MB */
+ for (len = rseq_get_page_len(); len < 4096 * 1024; len <<= 1) {
test_mempool_fill(len);
}