mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 18:10:21 +01:00
libnm/tests: fix build failure on big-endian machines
`make check` fails:
make check-TESTS
make[4]: Entering directory `/builddir/build/BUILD/NetworkManager-1.1.0/libnm-core/tests'
...
/core/general/test_setting_802_1x_changed_signal: OK
/core/general/test_setting_ip4_gateway: **
ERROR:test-general.c:3652:test_setting_ip4_gateway: assertion failed (nm_setting_ip_config_get_gateway (s_ip4) == "192.168.1.1"): ("1.1.168.192" == "192.168.1.1")
/bin/sh: line 5: 44957 Aborted (core dumped) ${dir}$tst
This commit is contained in:
parent
2fc37ce895
commit
7990add493
1 changed files with 4 additions and 2 deletions
|
|
@ -3560,11 +3560,13 @@ test_setting_ip4_gateway (void)
|
|||
GVariant *conn_dict, *ip4_dict, *value;
|
||||
GVariantIter iter;
|
||||
GVariant *addr_var;
|
||||
guint32 addr_vals_0[] = { 0x0a01a8c0, 0x00000018, 0x00000000 };
|
||||
guint32 addr_vals_1[] = { 0x0b01a8c0, 0x00000018, 0x0101a8c0 };
|
||||
guint32 addr_vals_0[] = { htonl (0xc0a8010a), 0x00000018, htonl (0x00000000) };
|
||||
guint32 addr_vals_1[] = { htonl (0xc0a8010b), 0x00000018, htonl (0xc0a80101) };
|
||||
GVariantBuilder addrs_builder;
|
||||
GError *error = NULL;
|
||||
|
||||
g_assert_cmpstr (nm_utils_inet4_ntop (addr_vals_0[0], NULL), ==, "192.168.1.10");
|
||||
|
||||
/* When serializing on the daemon side, ipv4.gateway is copied to the first
|
||||
* entry of ipv4.addresses
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue