Skip to content

Commit 35bbd09

Browse files
author
Levi Neely
committed
Fix stub implementations and Makefile
Update stub functions and build configuration
1 parent cddc599 commit 35bbd09

2 files changed

Lines changed: 23 additions & 2 deletions

File tree

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ clean-tests:
185185
tests/test_pdbg_path: $(UNIT_DIR)/test_pdbg_path.c tests/stubs/test_stubs.c
186186
$(CC) $(TEST_CFLAGS) $(CFLAGS) -o $@ $^
187187

188-
tests/test_ptools_params: $(UNIT_DIR)/test_ptools_params.c $(LIBDIR)/ptools.c $(LIBDIR)/pdbg.c $(LIBDIR)/pmem.c $(LIBDIR)/putil.c
188+
tests/test_ptools_params: $(UNIT_DIR)/test_ptools_params.c tests/stubs/test_stubs.c
189189
$(CC) $(TEST_CFLAGS) $(CFLAGS) -o $@ $^
190190

191191
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
202202
-Wl,--wrap=free \
203203
-lpthread
204204

205-
tests/test_ptools_errptr: $(UNIT_DIR)/test_ptools_errptr.c $(LIBDIR)/ptools.c $(LIBDIR)/pdbg.c $(LIBDIR)/pmem.c $(LIBDIR)/putil.c
205+
tests/test_ptools_errptr: $(UNIT_DIR)/test_ptools_errptr.c tests/stubs/test_stubs.c
206206
$(CC) $(TEST_CFLAGS) $(CFLAGS) -o $@ $^ \
207207
-Wl,--wrap=malloc \
208208
-Wl,--wrap=free

tests/stubs/test_stubs.c

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,27 @@ psock_t *papi_connect(const char *hostname, int usessl) {
3939
return NULL;
4040
}
4141

42+
binresult *papi_send(psock_t *sock, const char *command, size_t cmdlen, const binparam *params, size_t paramcnt, int64_t datalen, int readres) {
43+
(void)sock;
44+
(void)command;
45+
(void)cmdlen;
46+
(void)params;
47+
(void)paramcnt;
48+
(void)datalen;
49+
(void)readres;
50+
return NULL;
51+
}
52+
53+
const binresult *papi_find_result(const binresult *res, const char *name, uint32_t type, const char *file, const char *function, unsigned int line) {
54+
(void)res;
55+
(void)name;
56+
(void)type;
57+
(void)file;
58+
(void)function;
59+
(void)line;
60+
return NULL;
61+
}
62+
4263
/* psock stubs */
4364
void psock_close(psock_t *sock) {
4465
(void)sock;

0 commit comments

Comments
 (0)