[CRIU] [PATCH] zdtm/static/maps06: removed hardcoded page-size

Adrian Reber areber at redhat.com
Wed Jun 6 17:52:13 MSK 2018


On Wed, Jun 06, 2018 at 03:44:32PM +0100, Dmitry Safonov wrote:
> 2018-06-05 20:58 GMT+01:00 Adrian Reber <adrian at lisas.de>:
> [..]
> > @@ -23,21 +23,26 @@ int main(int argc, char ** argv)
> >         if (fd < 0)
> >                 return 1;
> >
> > -       ftruncate(fd, 4096);
> > +       ftruncate(fd, ps);
> > +
> > +       if (ps == 0x1000)
> > +               test_size = 10240;
> > +       else
> > +               test_size = 512;
> 
> Is it worth to calculate test_size dynamically based on ps?
> Like will the test work on both 16k and 64k pages?

Without that the test failed as the result (ps * test_size *4) for mmap()'s
length overflowed. I have not checked if it works when changing ps or
test_size to a 64bit value.

		Adrian


More information about the CRIU mailing list