[OpenWrt-Devel] [PATCH v2 libubox 00/10] fixes, unit tests and GitLab CI
Petr Štetiar
ynezz at true.cz
Wed Nov 20 16:43:43 EST 2019
Hi,
I've made libubox compile with -Wextra flags, tried to make clang/cppcheck
static code analyzers happy, fixed some memleaks, added initial cram based
unit tests for avl/base64/jshn components and added GitLab CI support.
Changes in v2:
- make avl, base64 crash with invalid inputs (yousong)
- keep bisectability (jonas)
Petr Štetiar (10):
iron out all extra compiler warnings
enable extra compiler checks
add initial GitLab CI support
add cram based unit tests
add assert.h component
base64: fix possible null pointer dereference
jshn: main: fix leak of memory pointed to by 'vars'
jshn: jshn_parse: fix leaks of memory pointed to by 'obj'
blobmsg_json: fix possible uninitialized struct member
avl: guard against theoretical null pointer dereference
.gitlab-ci.yml | 7 +++
CMakeLists.txt | 7 ++-
assert.h | 9 ++++
avl.c | 2 +
base64.c | 11 ++++-
blob.c | 6 +--
blob.h | 6 +--
blobmsg.c | 2 +-
blobmsg_json.c | 8 ++--
examples/blobmsg-example.c | 2 +-
examples/json_script-example.c | 2 +-
jshn.c | 4 ++
json_script.c | 17 ++++---
tests/CMakeLists.txt | 12 +++++
tests/cram/CMakeLists.txt | 29 ++++++++++++
tests/cram/test_avl.t | 10 ++++
tests/cram/test_base64.t | 25 ++++++++++
tests/cram/test_jshn.t | 25 ++++++++++
tests/test-avl.c | 87 ++++++++++++++++++++++++++++++++++
tests/test-b64.c | 39 +++++++++++++++
tests/test-b64_decode.c | 7 +++
tests/test-b64_encode.c | 7 +++
22 files changed, 301 insertions(+), 23 deletions(-)
create mode 100644 .gitlab-ci.yml
create mode 100644 assert.h
create mode 100644 tests/CMakeLists.txt
create mode 100644 tests/cram/CMakeLists.txt
create mode 100644 tests/cram/test_avl.t
create mode 100644 tests/cram/test_base64.t
create mode 100644 tests/cram/test_jshn.t
create mode 100644 tests/test-avl.c
create mode 100644 tests/test-b64.c
create mode 100644 tests/test-b64_decode.c
create mode 100644 tests/test-b64_encode.c
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel
More information about the openwrt-devel
mailing list