Page MenuHomeFreeBSD

Improve libexec/rtld-elf/tests
ClosedPublic

Authored by ngie on Aug 2 2014, 5:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 11, 8:34 PM
Unknown Object (File)
Wed, Oct 8, 5:04 AM
Unknown Object (File)
Sep 27 2025, 2:59 PM
Unknown Object (File)
Sep 27 2025, 12:47 AM
Unknown Object (File)
Sep 26 2025, 7:08 AM
Unknown Object (File)
Sep 26 2025, 4:47 AM
Unknown Object (File)
Sep 26 2025, 4:30 AM
Unknown Object (File)
Sep 26 2025, 3:17 AM
Subscribers
None

Details

Summary

Remove hardcoded path to TESTSDIR (Makefile, ld_library_pathfds.c) at build time by using atf_tc_get_config_var(tc, "srcdir")); fix a -Wsecurity warning with a call to asprintf; move -L argument in target/Makefile to LDFLAGS;

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

ngie retitled this revision from to Improve libexec/rtld-elf/tests.
ngie updated this object.
ngie added reviewers: jmmv, rpaulo, jonathan.
jmmv edited edge metadata.

As your patch message implies, these changes really belong in three different commits. Please split them accordingly at commit time.

libexec/rtld-elf/tests/ld_library_pathfds.c
41

I'm fine with this, but you'd have also gone with this other prototype instead:

static void setup(struct descriptors *, atf_tc_t *);

which would allow you to hide the srcdir query within setup() and would make the calls to setup() easier to read:

setup(&files, tc);

libexec/rtld-elf/tests/target/Makefile
10

Not sure if this is a Phabricator artifact or a problem in the diff. The indentation of this line looks wrong; make sure to use tabs for consistency with the rest of the file.

This revision is now accepted and ready to land.Aug 3 2014, 3:30 AM
In D525#3, @jmmv wrote:

As your patch message implies, these changes really belong in three different commits. Please split them accordingly at commit time.

Excellent point. I'll do that.

libexec/rtld-elf/tests/ld_library_pathfds.c
41

Good point -- I'll make that change and update the diff.

82

trombonehero: this is the one spot I wasn't 100% sure about (not setting LD_LIBRARY_PATH_FDS was inconsistent compared to the other locations where the variable was set).

libexec/rtld-elf/tests/target/Makefile
10

Ok!

ngie edited edge metadata.

Update based on review comments by jmmv

  • Change the prototype for tc to take 'const atf_tc_t *' and get the value of srcdir in setup(..).
  • Fix a style(9) bug in setup(..).