From 6c2f050dbe11fb4ed0a401a5f25731f2aa53046b Mon Sep 17 00:00:00 2001 From: Alexandra Hájková Date: Tue, 26 Oct 2021 11:42:44 +0200 Subject: Add valgrind smoke test Check if whether valgrind is available in the test environment. If not, skip the test. Run smoke tests with valgrind to verify dynamic loader. First, check if algrind works with the system ld.so in the test environment. Then run the actual test inside the test environment, using the just build ld.so and new libraries. Co-authored-by: Mark Wielaard --- elf/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'elf/Makefile') diff --git a/elf/Makefile b/elf/Makefile index 692a65b061..6cc53c387a 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -450,6 +450,7 @@ tests += \ unload6 \ unload7 \ unload8 \ + valgrind-test \ # tests tests-cxx = \ tst-dlopen-nodelete-reloc \ @@ -524,6 +525,12 @@ tests-special += \ endif endif endif + +tests-special += $(objpfx)tst-valgrind-smoke.out +$(objpfx)tst-valgrind-smoke.out: tst-valgrind-smoke.sh $(objpfx)ld.so $(objpfx)valgrind-test + $(SHELL) $< $(objpfx)ld.so $(rtlddir)/$(rtld-installed-name) '$(test-wrapper-env)' \ + '$(run-program-env)' '$(rpath-link)' $(objpfx)valgrind-test > $@; $(evaluate-test) + tests += $(tests-execstack-$(have-z-execstack)) ifeq ($(run-built-tests),yes) tests-special += \ -- cgit 1.4.1