Skip to content

Commit

Permalink
rtld-elf: Set proper TESTSDIR for tests/cheri and use TESTS_SUBDIRS
Browse files Browse the repository at this point in the history
With the wrong TESTSDIR it picks up ${TESTSBASE}/libexec/rtld-elf,
racing with and potentially trampling over rtld-elf's own file. If
rtld-elf wins out then these tests are silently dropped, and if cheri
wins out then the file references the non-existent abi-mismatch/Kyafile
(relative to the rtld-elf directory itself).

We also need to use TESTS_SUBDIRS so rtld-elf's own Kyuafile recurses
into cheri, otherwise you have to run the tests separately.

Fixes:	41dda2a ("rtld-cheri-elf: Move tests to rtld-elf/tests/cheri")
  • Loading branch information
jrtc27 authored and bsdjhb committed Mar 16, 2024
1 parent 3fb51ac commit 2a78b06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion libexec/rtld-elf/tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ SRCS.$t= $t.c common.c
WARNS?= 3

.if ${MACHINE_ABI:Mpurecap}
SUBDIR+= cheri
TESTS_SUBDIRS+= cheri
.endif

.include <bsd.test.mk>
2 changes: 2 additions & 0 deletions libexec/rtld-elf/tests/cheri/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
TESTSDIR?= ${TESTSBASE}/libexec/rtld-elf/cheri

TESTS_SUBDIRS+= abi-mismatch

.include <bsd.test.mk>

0 comments on commit 2a78b06

Please sign in to comment.