summaryrefslogtreecommitdiff
path: root/src/platform/tests/test-nmp-object.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-10-05 15:46:19 +0200
committerThomas Haller <thaller@redhat.com>2020-10-05 15:46:42 +0200
commit0d7bf62aacbf56e9d07c787593c41923d0033385 (patch)
tree574394657ba40b834c9e2eb55f26477dce8c4046 /src/platform/tests/test-nmp-object.c
parentf2b5812af3182e0b4297a1e842150c25b6d77707 (diff)
downloadNetworkManager-0d7bf62aacbf56e9d07c787593c41923d0033385.tar.gz
test/trivial: rename ASSERT_nmp_cache_is_consistent() function to nmtst_assert_nmp_cache_is_consistent()
We sometimes expose test-only functions as part of our API, to give direct access to unit tests. Such functions should have a "NMTST" prefix. Rename.
Diffstat (limited to 'src/platform/tests/test-nmp-object.c')
-rw-r--r--src/platform/tests/test-nmp-object.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/platform/tests/test-nmp-object.c b/src/platform/tests/test-nmp-object.c
index 6208de5278..e61e6b093b 100644
--- a/src/platform/tests/test-nmp-object.c
+++ b/src/platform/tests/test-nmp-object.c
@@ -272,7 +272,7 @@ test_cache_link(void)
g_assert(NMP_OBJECT_UP_CAST(&objm1->object) == objm1);
g_assert(!nmp_object_is_alive(objm1));
_nmp_cache_update_netlink(cache, objm1, &obj_old, &obj_new, NMP_CACHE_OPS_UNCHANGED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
g_assert(!obj_old);
g_assert(!obj_new);
g_assert(!nmp_cache_lookup_obj(cache, objm1));
@@ -284,7 +284,7 @@ test_cache_link(void)
objm1->_link.netlink.is_in_netlink = TRUE;
g_assert(nmp_object_is_alive(objm1));
_nmp_cache_update_netlink(cache, objm1, &obj_old, &obj_new, NMP_CACHE_OPS_ADDED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
g_assert(!obj_old);
g_assert(obj_new);
g_assert(objm1 == obj_new);
@@ -303,7 +303,7 @@ test_cache_link(void)
objm1->_link.netlink.is_in_netlink = TRUE;
g_assert(nmp_object_is_alive(objm1));
_nmp_cache_update_netlink(cache, objm1, &obj_old, &obj_new, NMP_CACHE_OPS_UNCHANGED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
g_assert(obj_old);
g_assert(obj_new);
g_assert(obj_new != objm1);
@@ -319,7 +319,7 @@ test_cache_link(void)
objm1 = nmp_object_new(NMP_OBJECT_TYPE_LINK, (NMPlatformObject *) &pl_link_2);
g_assert(!nmp_object_is_alive(objm1));
_nmp_cache_update_netlink(cache, objm1, &obj_old, &obj_new, NMP_CACHE_OPS_REMOVED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
g_assert(obj_old);
g_assert(!obj_new);
g_assert(!nmp_cache_lookup_obj(cache, objm1));
@@ -332,7 +332,7 @@ test_cache_link(void)
/* now add the link only with aspect UDEV. */
ops_type =
nmp_cache_update_link_udev(cache, pl_link_2.ifindex, udev_device_2, &obj_old, &obj_new);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
g_assert_cmpint(ops_type, ==, NMP_CACHE_OPS_ADDED);
g_assert(!obj_old);
g_assert(obj_new);
@@ -354,7 +354,7 @@ test_cache_link(void)
&obj_old,
&obj_new,
udev_device_2 ? NMP_CACHE_OPS_UPDATED : NMP_CACHE_OPS_ADDED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
if (udev_device_2) {
g_assert(obj_old);
g_assert(!nmp_object_is_visible(obj_old));
@@ -380,7 +380,7 @@ test_cache_link(void)
&obj_old,
&obj_new,
udev_device_2 ? NMP_CACHE_OPS_UPDATED : NMP_CACHE_OPS_REMOVED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
if (udev_device_2)
g_assert(obj_new == objm1);
else
@@ -413,7 +413,7 @@ test_cache_link(void)
ops_type =
nmp_cache_update_link_udev(cache, pl_link_3.ifindex, udev_device_3, &obj_old, &obj_new);
g_assert_cmpint(ops_type, ==, NMP_CACHE_OPS_ADDED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
g_assert(NMP_OBJECT_IS_VALID(obj_new));
g_assert(!obj_old);
g_assert(!nmp_object_is_visible(obj_new));
@@ -431,7 +431,7 @@ test_cache_link(void)
objm1->_link.netlink.is_in_netlink = TRUE;
g_assert(nmp_object_is_alive(objm1));
_nmp_cache_update_netlink(cache, objm1, &obj_old, &obj_new, NMP_CACHE_OPS_UPDATED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
g_assert(obj_old);
g_assert(obj_new == objm1);
g_assert(nmp_object_equal(objm1, obj_new));
@@ -452,7 +452,7 @@ test_cache_link(void)
/* remove UDEV. */
ops_type = nmp_cache_update_link_udev(cache, pl_link_3.ifindex, NULL, &obj_old, &obj_new);
g_assert_cmpint(ops_type, ==, NMP_CACHE_OPS_UPDATED);
- ASSERT_nmp_cache_is_consistent(cache);
+ nmtst_assert_nmp_cache_is_consistent(cache);
g_assert(obj_old && nmp_object_is_visible(obj_old));
g_assert(
nmp_cache_lookup_obj(cache, nmp_object_stackinit_id_link(&objs1, pl_link_3.ifindex))