From 836b47cb7e99a977c5a23b059ca1d0b5065d310e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 24 Jul 2024 11:54:23 +0200 Subject: Merging upstream version 1.46.3. Signed-off-by: Daniel Baumann --- tests/Makefile.am | 38 -------------------------------------- tests/api/fuzzer.py | 2 +- tests/health_mgmtapi/README.md | 2 +- tests/profile/benchmark-registry.c | 2 +- tests/profile/test-eval.c | 2 +- tests/run-unit-tests.sh | 6 ++++-- 6 files changed, 8 insertions(+), 44 deletions(-) delete mode 100644 tests/Makefile.am (limited to 'tests') diff --git a/tests/Makefile.am b/tests/Makefile.am deleted file mode 100644 index 2a9b2105..00000000 --- a/tests/Makefile.am +++ /dev/null @@ -1,38 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later - -AUTOMAKE_OPTIONS = subdir-objects -MAINTAINERCLEANFILES = $(srcdir)/Makefile.in - -CLEANFILES = \ - $(srcdir)/health_mgmtapi/health-cmdapi-test.sh \ - $(srcdir)/acls/acl.sh \ - $(srcdir)/urls/request.sh \ - $(srcdir)/alarm_repetition/alarm.sh \ - $(srcdir)/template_dimension/template_dim.sh \ - $(srcdir)/ebpf/ebpf_thread_function.sh \ - $(NULL) - -include $(top_srcdir)/build/subst.inc -SUFFIXES = .in - -dist_noinst_DATA = \ - $(srcdir)/health_mgmtapi/health-cmdapi-test.sh.in \ - $(srcdir)/acls/acl.sh.in \ - $(srcdir)/urls/request.sh.in \ - $(srcdir)/alarm_repetition/alarm.sh.in \ - $(srcdir)/template_dimension/template_dim.sh.in \ - $(srcdir)/ebpf/ebpf_thread_function.sh.in \ - $(NULL) - -dist_plugins_SCRIPTS = \ - $(srcdir)/health_mgmtapi/health-cmdapi-test.sh \ - $(srcdir)/acls/acl.sh \ - $(srcdir)/urls/request.sh \ - $(srcdir)/alarm_repetition/alarm.sh \ - $(srcdir)/template_dimension/template_dim.sh \ - $(srcdir)/ebpf/ebpf_thread_function.sh \ - $(NULL) - -dist_noinst_SCRIPTS = \ - $(srcdir)/stress.sh \ - $(NULL) diff --git a/tests/api/fuzzer.py b/tests/api/fuzzer.py index ee12a028..2914b4f1 100644 --- a/tests/api/fuzzer.py +++ b/tests/api/fuzzer.py @@ -309,7 +309,7 @@ random.seed(7) # Default is reproducible sequences parser = argparse.ArgumentParser() parser.add_argument('--url', type=str, - default='https://raw.githubusercontent.com/netdata/netdata/master/web/api/netdata-swagger.json', + default='https://raw.githubusercontent.com/netdata/netdata/master/src/web/api/netdata-swagger.json', help='The URL of the API definition in swagger. The default will pull the latest version ' 'from the main branch.') parser.add_argument('--host', type=str, diff --git a/tests/health_mgmtapi/README.md b/tests/health_mgmtapi/README.md index 73e217c2..c56ecfe6 100644 --- a/tests/health_mgmtapi/README.md +++ b/tests/health_mgmtapi/README.md @@ -9,7 +9,7 @@ learn_rel_path: "Developers" # Health command API tester -The directory `tests/health_cmdapi` contains the test script `health-cmdapi-test.sh` for the [health command API](https://github.com/netdata/netdata/blob/master/web/api/health/README.md). +The directory `tests/health_cmdapi` contains the test script `health-cmdapi-test.sh` for the [health command API](/src/web/api/health/README.md). The script can be executed with options to prepare the system for the tests, run them and restore the system to its previous state. diff --git a/tests/profile/benchmark-registry.c b/tests/profile/benchmark-registry.c index cfed6d7c..bc5934af 100644 --- a/tests/profile/benchmark-registry.c +++ b/tests/profile/benchmark-registry.c @@ -2,7 +2,7 @@ /* * compile with - * gcc -O1 -ggdb -Wall -Wextra -I ../src/ -I ../ -o benchmark-registry benchmark-registry.c ../src/dictionary.o ../src/log.o ../src/avl.o ../src/common.o ../src/appconfig.o ../src/web_buffer.o ../src/storage_number.o ../src/rrd.o ../src/health.o -pthread -luuid -lm -DHAVE_CONFIG_H -DVARLIB_DIR="\"/tmp\"" + * gcc -O1 -ggdb -Wall -Wextra -I ../src/ -I ../ -o benchmark-registry benchmark-registry.c ../src/dictionary.o ../src/log.o ../src/avl.o ../src/common.o ../src/appconfig.o ../src/web_buffer.o ../src/storage_number.o ../src/rrd.o ../src/health.o -pthread -luuid -lm -DVARLIB_DIR="\"/tmp\"" */ char *hostname = "me"; diff --git a/tests/profile/test-eval.c b/tests/profile/test-eval.c index 17836f6e..59469f17 100644 --- a/tests/profile/test-eval.c +++ b/tests/profile/test-eval.c @@ -10,7 +10,7 @@ #include "config.h" #include "libnetdata/libnetdata.h" #include "libnetdata/required_dummies.h" -#include "database/rrdcalc.h" +#include "health/rrdcalc.h" /* void indent(int level, int show) { diff --git a/tests/run-unit-tests.sh b/tests/run-unit-tests.sh index 1fedb880..f819f1bc 100755 --- a/tests/run-unit-tests.sh +++ b/tests/run-unit-tests.sh @@ -20,18 +20,20 @@ install_netdata() { echo "Installing Netdata" + + NETDATA_CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DENABLE_ADDRESS_SANITIZER=On" \ fakeroot ./netdata-installer.sh \ --install-prefix "$HOME" \ --dont-wait \ --dont-start-it \ - --enable-plugin-nfacct \ - --enable-plugin-freeipmi \ --disable-lto \ --enable-logsmanagement-tests } c_unit_tests() { echo "Running C code unit tests" + + ASAN_OPTIONS=detect_leaks=0 \ "$HOME"/netdata/usr/sbin/netdata -W unittest } -- cgit v1.2.3