From 0ede1a830285c3fa3a8424fa69486a217c1e05ce Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Tue, 15 Apr 2025 13:15:09 -0400 Subject: tests: use little-endian order for libyang api Use the expected - little-endian - byte-order for a param to one of the libyang apis; tests fail on LE architectures otherwise. Signed-off-by: Mark Stapp (cherry picked from commit da8fce3830baa2fd4d70050a3f7677d6e8bd5ad4) --- tests/lib/northbound/test_oper_data.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/lib/northbound/test_oper_data.c b/tests/lib/northbound/test_oper_data.c index 0b334c6522..f66b78d14f 100644 --- a/tests/lib/northbound/test_oper_data.c +++ b/tests/lib/northbound/test_oper_data.c @@ -253,9 +253,10 @@ static enum nb_error frr_test_module_c2cont_c2value_get(const struct nb_node *nb struct lyd_node *parent) { const struct lysc_node *snode = nb_node->snode; - uint32_t value = 0xAB010203; + uint32_t value = htole32(0xAB010203); LY_ERR err; + /* Note that this api expects 'value' to be in little-endian form */ err = lyd_new_term_bin(parent, snode->module, snode->name, &value, sizeof(value), LYD_NEW_PATH_UPDATE, NULL); assert(err == LY_SUCCESS); -- cgit v1.2.3 From 452d71cd96e242caae2bc141362efa746e15414c Mon Sep 17 00:00:00 2001 From: Mark Stapp Date: Tue, 15 Apr 2025 13:16:07 -0400 Subject: tests: add nb test binary to .gitignore Add a northbound unit-test binary product to .gitignore Signed-off-by: Mark Stapp (cherry picked from commit b256f2f1e90fd40ffb791d79dbdcaf71c3ab1a04) --- tests/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/.gitignore b/tests/.gitignore index 681438f4a5..51909cd81d 100644 --- a/tests/.gitignore +++ b/tests/.gitignore @@ -22,6 +22,7 @@ frr_northbound* /lib/cli/test_commands /lib/cli/test_commands_defun.c /lib/northbound/test_oper_data +/lib/northbound/test_oper_exists /lib/cxxcompat /lib/fuzz_zlog /lib/test_assert -- cgit v1.2.3