Merge pull request #18662 from mjstapp/fix_test_nb_endian

This commit is contained in:
David Lamparter 2025-04-16 10:49:13 +02:00 committed by GitHub
commit 336fe6728f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

1
tests/.gitignore vendored
View file

@ -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

View file

@ -249,9 +249,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);