forked from Mirror/frr
Merge pull request #18662 from mjstapp/fix_test_nb_endian
This commit is contained in:
commit
336fe6728f
1
tests/.gitignore
vendored
1
tests/.gitignore
vendored
|
@ -22,6 +22,7 @@ frr_northbound*
|
||||||
/lib/cli/test_commands
|
/lib/cli/test_commands
|
||||||
/lib/cli/test_commands_defun.c
|
/lib/cli/test_commands_defun.c
|
||||||
/lib/northbound/test_oper_data
|
/lib/northbound/test_oper_data
|
||||||
|
/lib/northbound/test_oper_exists
|
||||||
/lib/cxxcompat
|
/lib/cxxcompat
|
||||||
/lib/fuzz_zlog
|
/lib/fuzz_zlog
|
||||||
/lib/test_assert
|
/lib/test_assert
|
||||||
|
|
|
@ -249,9 +249,10 @@ static enum nb_error frr_test_module_c2cont_c2value_get(const struct nb_node *nb
|
||||||
struct lyd_node *parent)
|
struct lyd_node *parent)
|
||||||
{
|
{
|
||||||
const struct lysc_node *snode = nb_node->snode;
|
const struct lysc_node *snode = nb_node->snode;
|
||||||
uint32_t value = 0xAB010203;
|
uint32_t value = htole32(0xAB010203);
|
||||||
LY_ERR err;
|
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),
|
err = lyd_new_term_bin(parent, snode->module, snode->name, &value, sizeof(value),
|
||||||
LYD_NEW_PATH_UPDATE, NULL);
|
LYD_NEW_PATH_UPDATE, NULL);
|
||||||
assert(err == LY_SUCCESS);
|
assert(err == LY_SUCCESS);
|
||||||
|
|
Loading…
Reference in a new issue