This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efl.
View the commit online.
commit 81f96312941e7525fa141fd784dfeea2d4f13d2d
Author: Cedric BAIL <[email protected]>
AuthorDate: Tue Nov 10 20:17:37 2026 -0600
elementary:tests: free the size models and the loop's exit value
The homogeneous, exact and average model tests never unreferenced their
models, and kept the string the loop was quit with. Valgrind reported
both as lost. The loop flushes the value again when it is destroyed, so
the test leaves an empty one behind it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
src/tests/elementary/efl_ui_model.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/src/tests/elementary/efl_ui_model.c b/src/tests/elementary/efl_ui_model.c
index fbc9f97057..3e489ad0f6 100644
--- a/src/tests/elementary/efl_ui_model.c
+++ b/src/tests/elementary/efl_ui_model.c
@@ -171,12 +171,18 @@ EFL_START_TEST(efl_ui_homogeneous_model_test)
ret__ = efl_loop_begin(efl_app_main_get());
real__ = efl_loop_exit_code_process(ret__);
+ // (what the loop quit with is the test's to flush, once)
+ eina_value_flush(ret__);
+ *ret__ = EINA_VALUE_EMPTY;
fail_if(real__ != 0);
ck_assert_int_eq(_property_uint_expected(model, "total.width"), base_ints[0] * 2);
ck_assert_int_eq(_property_uint_expected(model, "total.height"), base_ints[0] * 3 * 3);
ck_assert_int_eq(_property_uint_expected(model, "item.width"), base_ints[0] * 2);
ck_assert_int_eq(_property_uint_expected(model, "item.height"), base_ints[0] * 3);
+
+ efl_unref(model);
+ efl_unref(base_model);
}
EFL_END_TEST
@@ -242,10 +248,16 @@ EFL_START_TEST(efl_ui_exact_model_test)
ret__ = efl_loop_begin(efl_app_main_get());
real__ = efl_loop_exit_code_process(ret__);
+ // (what the loop quit with is the test's to flush, once)
+ eina_value_flush(ret__);
+ *ret__ = EINA_VALUE_EMPTY;
fail_if(real__ != 0);
ck_assert_int_eq(_property_uint_expected(model, "total.width"), base_ints[2] * 2);
ck_assert_int_eq(_property_uint_expected(model, "total.height"), base_ints[0] * 3 + base_ints[1] * 3 + base_ints[2] * 3);
+
+ efl_unref(model);
+ efl_unref(base_model);
}
EFL_END_TEST
@@ -330,10 +342,16 @@ EFL_START_TEST(efl_ui_average_model_test)
ret__ = efl_loop_begin(efl_app_main_get());
real__ = efl_loop_exit_code_process(ret__);
+ // (what the loop quit with is the test's to flush, once)
+ eina_value_flush(ret__);
+ *ret__ = EINA_VALUE_EMPTY;
fail_if(real__ != 0);
ck_assert_int_eq(_property_uint_expected(model, "total.width"), base_ints[2] * 2);
ck_assert_int_eq(_property_uint_expected(model, "total.height"), base_ints[0] * 3 + base_ints[1] * 3 + base_ints[2] * 3);
+
+ efl_unref(model);
+ efl_unref(base_model);
}
EFL_END_TEST
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.