Skip to content

Commit

Permalink
test/Makefile: Append -lpthread to LDFLAGS for all tests
Browse files Browse the repository at this point in the history
Instead of overriding LDFLAGS one by one for tests that need pthread,
append -lpthread to LDFLAGS for all tests. This makes the Makefile
script simpler. It also saves some hassle when we add a new test
that does use pthread.

Signed-off-by: Ammar Faizi <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
  • Loading branch information
ammarfaizi2 authored and axboe committed Apr 3, 2022
1 parent 20b5eda commit 664bf78
Showing 1 changed file with 1 addition and 23 deletions.
24 changes: 1 addition & 23 deletions test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ override CFLAGS += $(XCFLAGS) -DLIBURING_BUILD_TEST
override CXXFLAGS += $(XCFLAGS) -std=c++11 -DLIBURING_BUILD_TEST

LDFLAGS ?=
override LDFLAGS += -L../src/ -luring
override LDFLAGS += -L../src/ -luring -lpthread

test_srcs := \
232c93d07b74.c \
Expand Down Expand Up @@ -211,28 +211,6 @@ helpers.o: helpers.c
$(QUIET_CXX)$(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $@ $< $(helpers) $(LDFLAGS)


35fa71a030ca: override LDFLAGS += -lpthread
232c93d07b74: override LDFLAGS += -lpthread
send_recv: override LDFLAGS += -lpthread
send_recvmsg: override LDFLAGS += -lpthread
poll-link: override LDFLAGS += -lpthread
accept-link: override LDFLAGS += -lpthread
submit-reuse: override LDFLAGS += -lpthread
poll-v-poll: override LDFLAGS += -lpthread
across-fork: override LDFLAGS += -lpthread
ce593a6c480a: override LDFLAGS += -lpthread
wakeup-hang: override LDFLAGS += -lpthread
pipe-eof: override LDFLAGS += -lpthread
timeout-new: override LDFLAGS += -lpthread
thread-exit: override LDFLAGS += -lpthread
ring-leak2: override LDFLAGS += -lpthread
poll-mshot-update: override LDFLAGS += -lpthread
exit-no-cleanup: override LDFLAGS += -lpthread
pollfree: override LDFLAGS += -lpthread
msg-ring: override LDFLAGS += -lpthread
recv-msgall: override LDFLAGS += -lpthread
recv-msgall-stream: override LDFLAGS += -lpthread

install: $(test_targets) runtests.sh runtests-loop.sh
$(INSTALL) -D -d -m 755 $(datadir)/liburing-test/
$(INSTALL) -D -m 755 $(test_targets) $(datadir)/liburing-test/
Expand Down

0 comments on commit 664bf78

Please sign in to comment.