Skip to content

Commit

Permalink
test: skip the wacom tests if we can't open the .so file
Browse files Browse the repository at this point in the history
Distribution package builds that use -Wl,-z,relro -Wl,-z,now will
attempt to resolve all symbols on dlopen(). This is explicitly what we
do not want because we don't link in the whole X server.

It's a bit hard to override this for a single executable (my attempts
didn't go far so there may be some other flag that influences this too)
so for now just skip the whole test - this is better than failing the
test suite.

Signed-off-by: Peter Hutterer <[email protected]>
  • Loading branch information
whot committed Feb 15, 2022
1 parent c215f1e commit 15bb122
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/wacom-tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ int main(void) {

if (handle == NULL) {
fprintf(stderr, "Failed to open %s: %s\n", TESTDRV, dlerror());
return 1;
fprintf(stderr, "This test suite relies on dlopen(RTLD_LAZY) which may be disabled by your compiler/linker flags\n");
return 77;
}

func = dlsym(handle, TESTFUNC);
Expand Down

0 comments on commit 15bb122

Please sign in to comment.