Re: git: 5a7e48dddfb5 - main - tests: Add MAP_32BIT flag test
Date: Tue, 01 Aug 2023 21:57:36 UTC
On Tue, Aug 01, 2023 at 09:29:32PM +0100, Jessica Clarke wrote: > On 1 Aug 2023, at 21:24, Dmitry Chagin <dchagin@FreeBSD.org> wrote: > > > > The branch main has been updated by dchagin: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > > > commit 5a7e48dddfb5a668ded4742b79e6f6f88b647e6a > > Author: Dmitry Chagin <dchagin@FreeBSD.org> > > AuthorDate: 2023-08-01 20:23:15 +0000 > > Commit: Dmitry Chagin <dchagin@FreeBSD.org> > > CommitDate: 2023-08-01 20:23:15 +0000 > > > > tests: Add MAP_32BIT flag test > > > > Reviewed by: kib, markj > > Differential Revision: https://reviews.freebsd.org/D41236 > > MFC after: 1 month > > --- > > tests/sys/vm/Makefile | 8 ++++++ > > tests/sys/vm/mmap_map_32bit_helper.c | 51 ++++++++++++++++++++++++++++++++++++ > > tests/sys/vm/mmap_map_32bit_test.sh | 37 ++++++++++++++++++++++++++ > > 3 files changed, 96 insertions(+) > > > > diff --git a/tests/sys/vm/Makefile b/tests/sys/vm/Makefile > > index 8ef8a45e5f39..9aac49bc5320 100644 > > --- a/tests/sys/vm/Makefile > > +++ b/tests/sys/vm/Makefile > > @@ -9,4 +9,12 @@ ATF_TESTS_C+= mlock_test \ > > page_fault_signal \ > > shared_shadow_inval_test > > > > +.if ${MACHINE_ARCH} != "i386" && ${MACHINE} != "arm" && \ > > + (${MACHINE} != "powerpc" || ${MACHINE_ARCH} != "powerpc") > > + # MAP_32BIT is only available on 64-bit platforms > > So use ${MACHINE_ABI:Mlong64} after including src.opts.mk? May be we should enable the MAP_32BIT flag on 32bit arches, instead? It requests allocation below 2G, which is half of VA on i386, or 2/3 on arm. Interestingly, it should work already from compat32.