mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 10:30:13 +01:00
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.
(cherry picked from commit e180464bcc)
(cherry picked from commit 66cbca1f21)
This commit is contained in:
parent
3444c1145d
commit
7820d71ef0
1 changed files with 0 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue