Dear Martin, On 2020-05-08, Martin Husemann wrote: > On Thu, May 07, 2020 at 10:52:26PM +0200, Yorick Hardy wrote: > > Thanks! It took a while for this to sink in ... > > > > So I think the test should only be built if MKCOMPAT=yes ? > > (It does fail to build for me, because I usually have MKCOMPAT=no). > > Yes, either the Makefile needs a conditional, or the SUBDIR+= in the > makefile above. > > Martin
I think it may be better in the Makefile, since the test for amd64 already happens there and because the libi386 directory could conceivably also contain i386/non-amd64 tests. I successfully completed a build with MKCOMPAT=no, using the patch below. Is it okay to commit? -- Kind regards, Yorick Hardy Index: distrib/sets/lists/debug/md.amd64 ================================================================== --- distrib/sets/lists/debug/md.amd64 +++ distrib/sets/lists/debug/md.amd64 @@ -23,9 +23,9 @@ ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait3.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait4.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_wait6.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_waitid.debug tests-obsolete obsolete ./usr/libdata/debug/usr/tests/kernel/arch/x86/t_ptrace_waitpid.debug tests-obsolete obsolete -./usr/libdata/debug/usr/tests/lib/libi386/t_user_ldt.debug tests-lib-debug debug,atf +./usr/libdata/debug/usr/tests/lib/libi386/t_user_ldt.debug tests-lib-debug debug,atf,compat ./usr/libdata/debug/usr/tests/lib/libnvmm/h_io_assist.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libnvmm/h_mem_assist.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/modules/t_x86_pte.debug tests-sys-debug debug,atf Index: distrib/sets/lists/tests/md.amd64 ================================================================== --- distrib/sets/lists/tests/md.amd64 +++ distrib/sets/lists/tests/md.amd64 @@ -5,13 +5,13 @@ ./usr/tests/kernel/arch/x86/t_ptrace_wait3 tests-obsolete obsolete ./usr/tests/kernel/arch/x86/t_ptrace_wait4 tests-obsolete obsolete ./usr/tests/kernel/arch/x86/t_ptrace_wait6 tests-obsolete obsolete ./usr/tests/kernel/arch/x86/t_ptrace_waitid tests-obsolete obsolete ./usr/tests/kernel/arch/x86/t_ptrace_waitpid tests-obsolete obsolete -./usr/tests/lib/libi386/t_user_ldt tests-lib-tests compattestfile,atf +./usr/tests/lib/libi386/t_user_ldt tests-lib-tests compattestfile,atf,compat ./usr/tests/lib/libnvmm/h_io_assist tests-lib-tests compattestfile,atf ./usr/tests/lib/libnvmm/t_io_assist tests-lib-tests compattestfile,atf ./usr/tests/lib/libnvmm/h_mem_assist tests-lib-tests compattestfile,atf ./usr/tests/lib/libnvmm/t_mem_assist tests-lib-tests compattestfile,atf ./usr/tests/modules/t_x86_pte tests-sys-tests atf,kmod ./usr/tests/modules/x86_pte_tester tests-sys-tests atf,kmod ./usr/tests/modules/x86_pte_tester/x86_pte_tester.kmod tests-sys-tests atf,kmod Index: tests/lib/libi386/Makefile ================================================================== --- tests/lib/libi386/Makefile +++ tests/lib/libi386/Makefile @@ -2,14 +2,14 @@ .include <bsd.own.mk> TESTSDIR= ${TESTSBASE}/lib/libi386 -.if ${MACHINE} == "amd64" +.if ${MACHINE} == "amd64" && ${MKCOMPAT} == "yes" SHLIBINSTALLDIR= /usr/lib/i386 COPTS+= -m32 LDFLAGS+= -m32 LDADD+= -li386 TESTS_C+= t_user_ldt .endif .include <bsd.test.mk>