From 4c0b412e9f559b4257c8e2291f4fda4e6bf7acdf Mon Sep 17 00:00:00 2001 From: Olof hagsand Date: Tue, 19 Feb 2019 13:16:59 +0100 Subject: [PATCH] Added valgrind memory leak tests for backend. Fixed some minor leaks and file descriptor closes. --- CHANGELOG.md | 3 +- apps/backend/backend_main.c | 18 ++++-- apps/backend/backend_socket.c | 27 +++++++- lib/src/clixon_file.c | 4 +- lib/src/clixon_log.c | 1 + lib/src/clixon_yang.c | 2 + test/README.md | 20 +++--- test/lib.sh | 54 +++++++++++----- test/mem.sh | 34 +++++----- test/test_choice.sh | 13 ++-- test/test_cli.sh | 13 ++-- test/test_compat.sh | 25 ++++---- test/test_feature.sh | 14 ++--- test/test_identity.sh | 14 ++--- test/test_leafref.sh | 13 ++-- test/test_list.sh | 13 ++-- test/test_nacm.sh | 11 +--- test/test_nacm_ext.sh | 11 +--- test/test_nacm_module_read.sh | 11 +--- test/test_nacm_module_write.sh | 11 +--- test/test_nacm_protocol.sh | 11 +--- test/test_netconf.sh | 14 ++--- test/test_order.sh | 13 ++-- test/test_perf.sh | 111 +++++++++++++++------------------ test/test_restconf.sh | 11 +--- test/test_restconf2.sh | 11 +--- test/test_rpc.sh | 11 +--- test/test_startup.sh | 30 ++++----- test/test_stream.sh | 13 ++-- test/test_type.sh | 13 ++-- test/test_union.sh | 13 ++-- test/test_when_must.sh | 13 ++-- test/test_yang.sh | 13 ++-- test/test_yang_load.sh | 111 ++++++++++++--------------------- 34 files changed, 318 insertions(+), 382 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e95772ab..02df0c2d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -135,7 +135,8 @@ * Replaced all calls to (obsolete) `cli_output` with `fprintf` * Added _experimental_ config option `CLICON_CLI_UTF8` default set to 0. * CLIgen UTF8 does not work with scrolling and control editing -* Added valgrind memory leak tests in testmem.sh for cli and netconf +* Added valgrind memory leak tests in testmem.sh for cli, netconf and backend + * remains: restconf * Added `make test` from top-level Makefile * Added `xml_rootchild_node()` lib function as variant of `xml_rootchild()` * Added -o "