summaryrefslogtreecommitdiff
path: root/src/tests/eo/suite
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-10-06 16:19:12 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-06 16:19:12 +0900
commit6ce60a0de5ec5c28c06ecbcba0b7f0e1958a382d (patch)
treef8aecdd6153ee51c47aa652c8f89232e2653360c /src/tests/eo/suite
parent7db67aaea842e4eb852ed9edbd0941b67648951b (diff)
eo: Fix deadlock in efl_parent_set
If the object is shared and the given parent is invalid (eg. deleted) then we will deadlock later. This also adds a test case with it.
Diffstat (limited to 'src/tests/eo/suite')
-rw-r--r--src/tests/eo/suite/eo_test_general.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tests/eo/suite/eo_test_general.c b/src/tests/eo/suite/eo_test_general.c
index e08d69699a..b0f1bcd4e1 100644
--- a/src/tests/eo/suite/eo_test_general.c
+++ b/src/tests/eo/suite/eo_test_general.c
@@ -1371,6 +1371,7 @@ thr1(void *data, Eina_Thread t EINA_UNUSED)
1371{ 1371{
1372 Data *d = data; 1372 Data *d = data;
1373 Efl_Id_Domain dom; 1373 Efl_Id_Domain dom;
1374 Eo *objs2;
1374 1375
1375 fail_if(efl_domain_switch(EFL_ID_DOMAIN_THREAD) != EINA_TRUE); 1376 fail_if(efl_domain_switch(EFL_ID_DOMAIN_THREAD) != EINA_TRUE);
1376 fail_if(efl_domain_get() != EFL_ID_DOMAIN_THREAD); 1377 fail_if(efl_domain_get() != EFL_ID_DOMAIN_THREAD);
@@ -1381,6 +1382,13 @@ thr1(void *data, Eina_Thread t EINA_UNUSED)
1381 printf("VERIFY finalized_get()\n"); 1382 printf("VERIFY finalized_get()\n");
1382 fail_if(!efl_finalized_get(d->objs)); 1383 fail_if(!efl_finalized_get(d->objs));
1383 1384
1385 printf("VERIFY parent_set(invalid)\n");
1386 efl_domain_current_push(EFL_ID_DOMAIN_SHARED);
1387 objs2 = efl_add(DOMAIN_CLASS, NULL);
1388 efl_domain_current_pop();
1389 efl_del(objs2);
1390 efl_parent_set(d->objs, objs2);
1391
1384 printf("SET ON LOCAL\n"); 1392 printf("SET ON LOCAL\n");
1385 domain_a_set(obj, 1234); 1393 domain_a_set(obj, 1234);
1386 fail_if(domain_a_get(obj) != 1234); 1394 fail_if(domain_a_get(obj) != 1234);