diff options
author | Thomas Haller <thaller@redhat.com> | 2018-11-23 19:12:16 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2018-11-28 16:13:04 +0100 |
commit | e180464bcce8faa74704d13580136c741eee0c67 (patch) | |
tree | f25698b02a581d4224f8c965c3bfef9328425805 | |
parent | de3f6cfb980d55c6ea3f7bdbaaaf3184d0aef3aa (diff) | |
download | NetworkManager-e180464bcce8faa74704d13580136c741eee0c67.tar.gz |
platform/tests: fix assertion for unit test for address lifetime
Sometimes the test fail:
$ make -j 10 src/platform/tests/test-address-linux
$ while true; do
NMTST_DEBUG=d ./tools/run-nm-test.sh src/platform/tests/test-address-linux 2>&1 > log.txt || break;
done
fails with:
ERROR: src/platform/tests/test-address-linux - Bail out! test:ERROR:src/platform/tests/test-common.c:790:nmtstp_ip_address_assert_lifetime: assertion failed (adr <= lft): (1001 <= 1000)
That is, because of a wrong check. Fix it.
-rw-r--r-- | src/platform/tests/test-common.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/src/platform/tests/test-common.c b/src/platform/tests/test-common.c index 3dedbd1034..1cb2f51689 100644 --- a/src/platform/tests/test-common.c +++ b/src/platform/tests/test-common.c @@ -787,8 +787,6 @@ nmtstp_ip_address_assert_lifetime (const NMPlatformIPAddress *addr, if (lft == NM_PLATFORM_LIFETIME_PERMANENT) g_assert_cmpint (adr, ==, NM_PLATFORM_LIFETIME_PERMANENT); else { - g_assert_cmpint (adr, <=, lft); - g_assert_cmpint (offset, <=, adr); g_assert_cmpint (adr - offset, <=, lft + CHECK_LIFETIME_MAX_DIFF); g_assert_cmpint (adr - offset, >=, lft - CHECK_LIFETIME_MAX_DIFF); } |