From ebf57dfc03c9f3bda5ee065d45c28feb6ebb1c97 Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Fri, 30 Oct 2026 03:25:35 +0100 Subject: Reduce syscalls and add helper to count them --- Makefile | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3ce127e..2e52367 100644 --- a/Makefile +++ b/Makefile @@ -110,6 +110,12 @@ $(TESTBIN): $(TEST_SOURCES) $(TEST_UNITS) $(TEST_HEADERS) check: $(TESTBIN) $(BINARY) ./$(TESTBIN) +$(TESTBIN).poll: $(TEST_SOURCES) $(TEST_UNITS) $(TEST_HEADERS) + $(CC) -o $@ $(CFLAGS_test) -DOT_EVENT_FORCE_POLL $(TEST_SOURCES) $(TEST_UNITS) + +check-poll: $(TESTBIN).poll + ./$(TESTBIN).poll ot_event + # The same unit tests under the sanitizers. Use clang over $(CC) because the # two toolchains do not check the same things # Override CC_sanitize to use another compiler. @@ -153,13 +159,14 @@ check-tsan: opentracker.tsan # Everything, cheapest first, so a quick failure comes back quickly. check-all: $(MAKE) check + $(MAKE) check-poll $(MAKE) check-sanitize $(MAKE) check-integration $(MAKE) check-tsan -.PHONY: all check check-sanitize check-integration check-tsan check-all clean install +.PHONY: all check check-poll check-sanitize check-integration check-tsan check-all clean install -BINARIES=opentracker opentracker.debug opentracker.integration opentracker.tsan proxy proxy.debug $(TESTBIN) $(TESTBIN).sanitize +BINARIES=opentracker opentracker.debug opentracker.integration opentracker.tsan proxy proxy.debug $(TESTBIN) $(TESTBIN).sanitize $(TESTBIN).poll clean: rm -rf $(BINARIES) $(BINARIES:=.dSYM) *.o *~ -- cgit v1.3