[sysprof: 2/3] test: Fix detection of pagesize at runtime
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof: 2/3] test: Fix detection of pagesize at runtime
- Date: Thu, 2 Jan 2020 18:12:34 +0000 (UTC)
commit 8a86d5f1a0510474abc1d02f37f7731cf3483f63
Author: Laurent Bigonville <bigon bigon be>
Date: Thu Jan 2 12:41:47 2020 +0100
test: Fix detection of pagesize at runtime
Not all architectures have a page size of 4k, detect it at runtime
Fix: https://gitlab.gnome.org/GNOME/sysprof/issues/21
src/tests/test-capture.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/tests/test-capture.c b/src/tests/test-capture.c
index 4605fa0..5f8eb3d 100644
--- a/src/tests/test-capture.c
+++ b/src/tests/test-capture.c
@@ -28,6 +28,7 @@
#include <unistd.h>
#include "sysprof-platform.h"
+#include "sysprof-capture-util-private.h"
static void
copy_into (GHashTable *src,
@@ -54,7 +55,7 @@ test_reader_basic (void)
writer = sysprof_capture_writer_new ("capture-file", 0);
g_assert (writer != NULL);
- g_assert_cmpint (sysprof_capture_writer_get_buffer_size (writer), ==, 4096*64);
+ g_assert_cmpint (sysprof_capture_writer_get_buffer_size (writer), ==, _sysprof_getpagesize()*64);
sysprof_capture_writer_flush (writer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]