[ld, testsuite] Restrict dl1*main and dl6*main tests on platforms which have libdl support

Jiong Wang jiong.wang@foss.arm.com
Wed Feb 1 17:17:00 GMT 2017


Some tests in ld-elf/share.exp require dlopen support.  One platforms where
there are not such support I got the following compilation errors:

   ld/testsuite/ld-elf/dl1main.c:2:10: fatal error: dlfcn.h: No such file or directory
    #include <dlfcn.h>
           ^~~~~~~~~

   ERROR: /work/BLD/8.3/src/binutils-gdb/ld/testsuite/ld-elf/dl6amain.c: compilation failed
   UNRESOLVED: Run dl6a6 with --dynamic-list-cpp-new -Bsymbolic-functions and dlopen on libdl6a.so
   
   
This patch restricts those tests on platform where libdl is available.  The
availability check is done through compiling a sample test file which includes
"dlfcn.h".

This patch cut off 13 unresolved testcases on my arm-none-eabi environment and no regression.
Also no regression on arm-none-linux-gnu/x86-64 native check-ld.


OK for master?

Thanks.

ld/
2017-02-01  Jiong Wang  <jiong.wang@arm.com>

         * testsuite/lib/ld-lib.exp (check_libdl_available): New function.
         * testsuite/ld-elf/shared.exp (run_tests): Split tests which require
         dlopen support into "dlopen_run_tests".  These tests include dl1*main
         and dl6*main.
         (dlopen_run_tests): New and only run it when check_libdl_available
         returns true.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: new.patch
Type: text/x-diff
Size: 7346 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20170201/1a6bef89/attachment.bin>


More information about the Binutils mailing list