From 11a5dae9e9eec113304ee7762dee54fa8e848755 Mon Sep 17 00:00:00 2001 From: elvis Date: Sat, 23 Apr 2022 15:05:31 +0200 Subject: [PATCH] test1 --- Makefile | 15 ++++++++++++--- lib/api/api.c | 2 -- scripts/.gitkeep | 0 3 files changed, 12 insertions(+), 5 deletions(-) create mode 100644 scripts/.gitkeep diff --git a/Makefile b/Makefile index 46b0e5b..70ac0ce 100644 --- a/Makefile +++ b/Makefile @@ -85,11 +85,20 @@ $(BUILD_DIR)/client: $(OBJ_CLIENT) # -PHONY------------------------------------------------------------------------ -clean : +clean: @rm -rf $(BUILD_DIR)/* logs/*.log -cleanall : clean +cleanall: clean @rm -rf $(OBJ_DIR)/* @rm -f $(SOCKET) -print-% : ; @echo $* = $($*) +print-%: ; @echo $* = $($*) + + +# -TESTS------------------------------------------------------------------------ + +test1: + @echo "[threadpool]\n\nquantity = 10\npending = 20\n\n[files]\n\nMaxFiles = 20\n\nMaxSize = 10000000\n\n[log]\n\nlogFile = ./logs/l.log\n\n[socket]\n\nname = ./socket\nbacklog = 100\n" > build/confix.txt + valgrind --leak-check=full ./server & + ./scripts/test1.sh + pkill -1 memcheck-amd64 diff --git a/lib/api/api.c b/lib/api/api.c index 8827102..330abdb 100644 --- a/lib/api/api.c +++ b/lib/api/api.c @@ -88,8 +88,6 @@ int storeFilesInDirectory(const char *dirname, int n, recivedFile_t *rf); void freeResponse(response_t *res); - - // ----------------------------------------------------------------------------- int openConnection(const char* sockname, int msec, const struct timespec abstime) { if(!sockname){ diff --git a/scripts/.gitkeep b/scripts/.gitkeep new file mode 100644 index 0000000..e69de29