libctf and libsframe testing

Nick Alcock nick.alcock@oracle.com
Tue Aug 5 11:43:42 GMT 2025


On 1 Aug 2025, Jan Beulich stated:

> Hello,
>
> just came to notice that the testsuite runs are all building binaries for the
> host, not the target.

Well... the libctf testsuite should be building binaries for both,
actually. libctf itself is a host library, with no target-dependent
components (it leans on bfd for those), so we do want to test it on the
host: that's where it'sll run.

... *however*. The binaries the testsuite builds fall into two
categories:

 - "lookup binaries", which are executed on the host: some just do their
   own thing using libctf API calls, but others (e.g. in libctf-lookup/)
   are used to inspect...
 - ... object files and linked binaries which contain CTF. These are
   built with the target compiler, or should be.

The compilation of both these binaries happens in
libctf/testsuite/lib/ctf-lib.exp:run_lookup_test(), if you're
interested. They are driven by *.lk files: any *.lk files which do not
specify a source: are building lookup binaries only, on the host.

>                        While this may be sensible when testing an individual
> target, (afaict) it's doing all the same over and over when doing bulk tests.
> I couldn't spot any means (e.g. an env var) to override this behavior, i.e.
> optionally suppress such redundant testing. If there is one, could you please
> point me in the right direction? If there is none, can something be added?

... sure: we could at least not rerun those tests that don't use source:
at all. I wonder what the least horrible approach would be... maybe a
configure flag to ask run_lookup_test to quietly do nothing if host !=
target and source: is not in use?

-- 
NULL && (void)


More information about the Binutils mailing list