diff options
author | Lorenz <12514511+RincewindsHat@users.noreply.github.com> | 2023-02-10 10:43:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-10 10:43:20 (GMT) |
commit | c07206f2ccc2356aa74bc6813a94c2190017d44e (patch) | |
tree | 1677e5fdca5c3ce544e92c5484e16a0b68df1cc9 /lib/tests | |
parent | e92046f810658016b7c373677efefda3b21400e4 (diff) | |
parent | d2fcf49ad4afc15f37d082d7bc96a808369ec2d4 (diff) | |
download | monitoring-plugins-c07206f2ccc2356aa74bc6813a94c2190017d44e.tar.gz |
Merge pull request #1832 from RincewindsHat/gnulib_update_2023
Gnulib update 2023 and attendant fixes
Diffstat (limited to 'lib/tests')
-rw-r--r-- | lib/tests/Makefile.am | 2 | ||||
-rw-r--r-- | lib/tests/test_utils.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/tests/Makefile.am b/lib/tests/Makefile.am index a8d7ade..31d79df 100644 --- a/lib/tests/Makefile.am +++ b/lib/tests/Makefile.am | |||
@@ -27,7 +27,7 @@ endif | |||
27 | 27 | ||
28 | AM_CFLAGS = -g -I$(top_srcdir)/lib -I$(top_srcdir)/gl $(tap_cflags) | 28 | AM_CFLAGS = -g -I$(top_srcdir)/lib -I$(top_srcdir)/gl $(tap_cflags) |
29 | AM_LDFLAGS = $(tap_ldflags) -ltap | 29 | AM_LDFLAGS = $(tap_ldflags) -ltap |
30 | LDADD = $(top_srcdir)/lib/libmonitoringplug.a $(top_srcdir)/gl/libgnu.a | 30 | LDADD = $(top_srcdir)/lib/libmonitoringplug.a $(top_srcdir)/gl/libgnu.a $(LIB_CRYPTO) |
31 | 31 | ||
32 | SOURCES = test_utils.c test_disk.c test_tcp.c test_cmd.c test_base64.c test_ini1.c test_ini3.c test_opts1.c test_opts2.c test_opts3.c | 32 | SOURCES = test_utils.c test_disk.c test_tcp.c test_cmd.c test_base64.c test_ini1.c test_ini3.c test_opts1.c test_opts2.c test_opts3.c |
33 | 33 | ||
diff --git a/lib/tests/test_utils.c b/lib/tests/test_utils.c index f35b7e2..bc00fac 100644 --- a/lib/tests/test_utils.c +++ b/lib/tests/test_utils.c | |||
@@ -309,7 +309,7 @@ main (int argc, char **argv) | |||
309 | 309 | ||
310 | /* This is the result of running ./test_utils */ | 310 | /* This is the result of running ./test_utils */ |
311 | temp_string = (char *) _np_state_generate_key(); | 311 | temp_string = (char *) _np_state_generate_key(); |
312 | ok(!strcmp(temp_string, "83d877b6cdfefb5d6f06101fd6fe76762f21792c"), "Got hash with exe and no parameters" ) || | 312 | ok(!strcmp(temp_string, "e2d17f995fd4c020411b85e3e3d0ff7306d4147e"), "Got hash with exe and no parameters" ) || |
313 | diag( "You are probably running in wrong directory. Must run as ./test_utils" ); | 313 | diag( "You are probably running in wrong directory. Must run as ./test_utils" ); |
314 | 314 | ||
315 | 315 | ||
@@ -319,7 +319,7 @@ main (int argc, char **argv) | |||
319 | this_monitoring_plugin->argv[2] = "--and"; | 319 | this_monitoring_plugin->argv[2] = "--and"; |
320 | this_monitoring_plugin->argv[3] = "now"; | 320 | this_monitoring_plugin->argv[3] = "now"; |
321 | temp_string = (char *) _np_state_generate_key(); | 321 | temp_string = (char *) _np_state_generate_key(); |
322 | ok(!strcmp(temp_string, "94b5e17bf5abf51cb15aff5f69b96f2f8dac5ecd"), "Got based on expected argv" ); | 322 | ok(!strcmp(temp_string, "bd72da9f78ff1419fad921ea5e43ce56508aef6c"), "Got based on expected argv" ); |
323 | 323 | ||
324 | unsetenv("MP_STATE_PATH"); | 324 | unsetenv("MP_STATE_PATH"); |
325 | temp_string = (char *) _np_state_calculate_location_prefix(); | 325 | temp_string = (char *) _np_state_calculate_location_prefix(); |
@@ -342,7 +342,7 @@ main (int argc, char **argv) | |||
342 | np_enable_state(NULL, 51); | 342 | np_enable_state(NULL, 51); |
343 | temp_state_key = this_monitoring_plugin->state; | 343 | temp_state_key = this_monitoring_plugin->state; |
344 | ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" ); | 344 | ok( !strcmp(temp_state_key->plugin_name, "check_test"), "Got plugin name" ); |
345 | ok( !strcmp(temp_state_key->name, "83d877b6cdfefb5d6f06101fd6fe76762f21792c"), "Got generated filename" ); | 345 | ok( !strcmp(temp_state_key->name, "e2d17f995fd4c020411b85e3e3d0ff7306d4147e"), "Got generated filename" ); |
346 | 346 | ||
347 | 347 | ||
348 | np_enable_state("allowedchars_in_keyname", 77); | 348 | np_enable_state("allowedchars_in_keyname", 77); |