citrun

watch C/C++ source code execute
Log | Files | Refs | LICENSE

commit a58b8ad9fb8dbf87a8b6a9f6e84697b36989b117
parent 9abd0cee7c4ab832cd51548f6ae0d1a9719706c6
Author: Kyle Milz <kyle@getaddrinfo.net>
Date:   Fri, 21 Oct 2016 22:26:42 -0600

t: fix rt_size on page size != 4k archs

Diffstat:
Mt/rt_size.t | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/t/rt_size.t b/t/rt_size.t @@ -1,13 +1,16 @@ +# +# Test that the runtime shared file size is what we expect. +# use strict; use warnings; +use POSIX; use Test::More tests => 1; use tlib::program; use tlib::shm; -# -# Test that the runtime shared file size is what we expect. -# system("tlib/program/program 1"); my $procfile = tlib::shm->new(); -is($procfile->{size}, 16384, "size of memory file"); + +my $pagesize = POSIX::sysconf(POSIX::_SC_PAGESIZE); +is($procfile->{size}, $pagesize * 4, "is memory file 4 pages long");