[OpenWrt-Devel] [PATCH libubox 0/9] fixes, some unit tests and GitLab CI

Petr Štetiar ynezz at true.cz
Wed Nov 20 06:59:17 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[1].

1. https://gitlab.com/ynezz/openwrt-libubox/pipelines/97255610/builds

Petr Štetiar (9):
  enable extra compiler checks
  iron out all extra compiler warnings
  add initial GitLab CI support
  add cram based unit tests
  base64: b64_decode: 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 ++-
 avl.c                          |  3 +-
 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           | 10 ++++
 tests/cram/CMakeLists.txt      | 27 +++++++++++
 tests/cram/test_avl.t          | 10 ++++
 tests/cram/test_base64.t       | 17 +++++++
 tests/cram/test_jshn.t         | 25 ++++++++++
 tests/test-avl.c               | 87 ++++++++++++++++++++++++++++++++++
 tests/test-base64.c            | 54 +++++++++++++++++++++
 19 files changed, 281 insertions(+), 24 deletions(-)
 create mode 100644 .gitlab-ci.yml
 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-base64.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