From 35bbd09bd8df14cffa51f1028d5594590bf7a745 Mon Sep 17 00:00:00 2001 From: Levi Neely Date: Tue, 10 Mar 2026 17:04:56 +0100 Subject: [PATCH] Fix stub implementations and Makefile Update stub functions and build configuration --- Makefile | 4 ++-- tests/stubs/test_stubs.c | 21 +++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8cd5037..580f5d5 100644 --- a/Makefile +++ b/Makefile @@ -185,7 +185,7 @@ clean-tests: tests/test_pdbg_path: $(UNIT_DIR)/test_pdbg_path.c tests/stubs/test_stubs.c $(CC) $(TEST_CFLAGS) $(CFLAGS) -o $@ $^ -tests/test_ptools_params: $(UNIT_DIR)/test_ptools_params.c $(LIBDIR)/ptools.c $(LIBDIR)/pdbg.c $(LIBDIR)/pmem.c $(LIBDIR)/putil.c +tests/test_ptools_params: $(UNIT_DIR)/test_ptools_params.c tests/stubs/test_stubs.c $(CC) $(TEST_CFLAGS) $(CFLAGS) -o $@ $^ tests/test_pfs_lock_ordering: $(UNIT_DIR)/test_pfs_lock_ordering.c $(LIBDIR)/pfs.c @@ -202,7 +202,7 @@ tests/test_prun: $(UNIT_DIR)/test_prun.c $(LIBDIR)/prun.c tests/stubs/test_stubs -Wl,--wrap=free \ -lpthread -tests/test_ptools_errptr: $(UNIT_DIR)/test_ptools_errptr.c $(LIBDIR)/ptools.c $(LIBDIR)/pdbg.c $(LIBDIR)/pmem.c $(LIBDIR)/putil.c +tests/test_ptools_errptr: $(UNIT_DIR)/test_ptools_errptr.c tests/stubs/test_stubs.c $(CC) $(TEST_CFLAGS) $(CFLAGS) -o $@ $^ \ -Wl,--wrap=malloc \ -Wl,--wrap=free diff --git a/tests/stubs/test_stubs.c b/tests/stubs/test_stubs.c index 72cba60..71fd547 100644 --- a/tests/stubs/test_stubs.c +++ b/tests/stubs/test_stubs.c @@ -39,6 +39,27 @@ psock_t *papi_connect(const char *hostname, int usessl) { return NULL; } +binresult *papi_send(psock_t *sock, const char *command, size_t cmdlen, const binparam *params, size_t paramcnt, int64_t datalen, int readres) { + (void)sock; + (void)command; + (void)cmdlen; + (void)params; + (void)paramcnt; + (void)datalen; + (void)readres; + return NULL; +} + +const binresult *papi_find_result(const binresult *res, const char *name, uint32_t type, const char *file, const char *function, unsigned int line) { + (void)res; + (void)name; + (void)type; + (void)file; + (void)function; + (void)line; + return NULL; +} + /* psock stubs */ void psock_close(psock_t *sock) { (void)sock;