Skip to content

Commit c288e5f

Browse files
authored
Merge pull request FRRouting#18399 from LabNConsulting/chopps/fix-unit-tests
2 unit-test fixes
2 parents f224594 + bc3f7d9 commit c288e5f

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1054,6 +1054,11 @@ AC_MSG_FAILURE([Please specify a number from 0-12 for log precision ARG])
10541054
;;
10551055
esac
10561056
with_log_timestamp_precision=${with_log_timestamp_precision:-0}
1057+
if test "${with_log_timestamp_precision}" != 0; then
1058+
AC_SUBST([LOG_TIMESTAMP_PRECISION_CLI], ["
1059+
log timestamp precision ${with_log_timestamp_precision}"])
1060+
AM_SUBST_NOTMAKE([LOG_TIMESTAMP_PRECISION_CLI])
1061+
fi
10571062
AC_DEFINE_UNQUOTED([LOG_TIMESTAMP_PRECISION], [${with_log_timestamp_precision}], [Startup zlog timestamp precision])
10581063

10591064
AC_DEFINE_UNQUOTED([VTYSH_PAGER], ["$VTYSH_PAGER"], [What pager to use])

tests/lib/cli/test_cli.refout.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ frr version @PACKAGE_VERSION@
405405
frr defaults @DFLT_NAME@
406406
!
407407
hostname test
408-
domainname test.domain
408+
domainname test.domain@LOG_TIMESTAMP_PRECISION_CLI@
409409
!
410410
!
411411
!
@@ -420,7 +420,7 @@ frr version @PACKAGE_VERSION@
420420
frr defaults @DFLT_NAME@
421421
!
422422
hostname foohost
423-
domainname test.domain
423+
domainname test.domain@LOG_TIMESTAMP_PRECISION_CLI@
424424
!
425425
!
426426
!

tests/lib/northbound/test_oper_exists.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,15 @@ const char *data_json = "\n"
157157
"}\n";
158158

159159

160-
static const struct lyd_node *test_oper_get_tree_locked(const char *xpath)
160+
static const struct lyd_node *test_oper_get_tree_locked(const char *xpath __attribute__((unused)),
161+
void **lock __attribute__((unused)))
161162
{
162163
++data_tree_lock;
163164
return data_tree;
164165
}
165166

166-
static void test_oper_unlock_tree(const struct lyd_node *tree __attribute__((unused)))
167+
static void test_oper_unlock_tree(const struct lyd_node *tree __attribute__((unused)),
168+
void *lock __attribute__((unused)))
167169
{
168170
data_tree_lock--;
169171
}

0 commit comments

Comments
 (0)