summaryrefslogtreecommitdiff
path: root/src/tests/eio
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-03-29 00:42:10 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2018-03-29 13:30:55 +0900
commit2fb5cc3ad09f6aaf82b5d1131ac5ed22ed848bd4 (patch)
tree7a2c2c0371789ae4b139ebdf4a9ef60f82d324aa /src/tests/eio
parentcc2b7a10a8236e2b3cc4a25b4b4fda95e00884fc (diff)
efl_add_ref - fis to use efl_add properly with a parent.
fixes bc18b7e7ad1f8c5d587400b27fabab0865017011 and 168849e8a08966ecc284e28f64126a3a85965965
Diffstat (limited to 'src/tests/eio')
-rw-r--r--src/tests/eio/eio_test_sentry.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/src/tests/eio/eio_test_sentry.c b/src/tests/eio/eio_test_sentry.c
index 0ae402abc5..c3e512973a 100644
--- a/src/tests/eio/eio_test_sentry.c
+++ b/src/tests/eio/eio_test_sentry.c
@@ -146,7 +146,7 @@ START_TEST(eio_test_sentry_add_and_remove)
146 usleep(500000); 146 usleep(500000);
147 147
148 //monitor directory 148 //monitor directory
149 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 149 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
150 fail_if(!eio_sentry_add(sentry, filename)); 150 fail_if(!eio_sentry_add(sentry, filename));
151 151
152 usleep(500000); 152 usleep(500000);
@@ -172,7 +172,7 @@ START_TEST(eio_test_sentry_add_remove_add)
172 usleep(500000); 172 usleep(500000);
173 173
174 //monitor directory 174 //monitor directory
175 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 175 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
176 fail_if(!eio_sentry_add(sentry, filename)); 176 fail_if(!eio_sentry_add(sentry, filename));
177 eio_sentry_remove(sentry, filename); 177 eio_sentry_remove(sentry, filename);
178 178
@@ -202,7 +202,7 @@ START_TEST(eio_test_sentry_add_add_remove_remove)
202 //sleep to avoid catching event generated by above manipulations 202 //sleep to avoid catching event generated by above manipulations
203 usleep(500000); 203 usleep(500000);
204 204
205 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 205 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
206 206
207 //monitor directory 207 //monitor directory
208 fail_if(!eio_sentry_add(sentry, filename1)); 208 fail_if(!eio_sentry_add(sentry, filename1));
@@ -232,7 +232,7 @@ START_TEST(eio_test_sentry_directory_file_created_notify)
232 Eo* sentry; 232 Eo* sentry;
233 233
234 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_created_notify", dirname); 234 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_created_notify", dirname);
235 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 235 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
236 236
237 //sleep to avoid catching event generated by above manipulations 237 //sleep to avoid catching event generated by above manipulations
238 usleep(500000); 238 usleep(500000);
@@ -259,7 +259,7 @@ START_TEST(eio_test_sentry_directory_file_deleted_notify)
259 259
260 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_deleted_notify", dirname); 260 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_deleted_notify", dirname);
261 _create_file((void*)filename); 261 _create_file((void*)filename);
262 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 262 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
263 263
264 //sleep to avoid catching event generated by above manipulations 264 //sleep to avoid catching event generated by above manipulations
265 usleep(500000); 265 usleep(500000);
@@ -286,7 +286,7 @@ START_TEST(eio_test_sentry_directory_file_modified_notify)
286 286
287 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_modified_notify", dirname); 287 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_modified_notify", dirname);
288 _create_file((void*)filename); 288 _create_file((void*)filename);
289 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 289 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
290 290
291 //sleep to avoid catching event generated by above manipulations 291 //sleep to avoid catching event generated by above manipulations
292 usleep(500000); 292 usleep(500000);
@@ -314,7 +314,7 @@ START_TEST(eio_test_sentry_directory_file_closed_notify)
314 314
315 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_closed_notify", dirname); 315 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_file_closed_notify", dirname);
316 _create_file((void*)filename); 316 _create_file((void*)filename);
317 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 317 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
318 318
319 //sleep to avoid catching event generated by above manipulations 319 //sleep to avoid catching event generated by above manipulations
320 usleep(500000); 320 usleep(500000);
@@ -339,7 +339,7 @@ START_TEST(eio_test_sentry_directory_directory_created_notify)
339 Eo *sentry; 339 Eo *sentry;
340 340
341 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_created_notify", dirname); 341 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_created_notify", dirname);
342 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 342 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
343 343
344 //sleep to avoid catching event generated by above manipulations 344 //sleep to avoid catching event generated by above manipulations
345 usleep(500000); 345 usleep(500000);
@@ -366,7 +366,7 @@ START_TEST(eio_test_sentry_directory_directory_deleted_notify)
366 366
367 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_deleted_notify", dirname); 367 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_deleted_notify", dirname);
368 _create_directory((void*)filename); 368 _create_directory((void*)filename);
369 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 369 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
370 370
371 //sleep to avoid catching event generated by above manipulations 371 //sleep to avoid catching event generated by above manipulations
372 usleep(500000); 372 usleep(500000);
@@ -393,7 +393,7 @@ START_TEST(eio_test_sentry_directory_directory_modified_notify)
393 393
394 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_modified_notify", dirname); 394 filename = eina_stringshare_printf("%s/eio_test_sentry_directory_directory_modified_notify", dirname);
395 _create_directory((void*)filename); 395 _create_directory((void*)filename);
396 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 396 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
397 397
398 //sleep to avoid catching event generated by above manipulations 398 //sleep to avoid catching event generated by above manipulations
399 usleep(500000); 399 usleep(500000);
@@ -415,7 +415,7 @@ END_TEST
415START_TEST(eio_test_sentry_directory_directory_self_deleted_notify) 415START_TEST(eio_test_sentry_directory_directory_self_deleted_notify)
416{ 416{
417 Eina_Tmpstr *dirname = _common_init(); 417 Eina_Tmpstr *dirname = _common_init();
418 Eo *sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 418 Eo *sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
419 419
420 //sleep to avoid catching event generated by above manipulations 420 //sleep to avoid catching event generated by above manipulations
421 usleep(500000); 421 usleep(500000);
@@ -444,7 +444,7 @@ START_TEST(eio_test_sentry_file_file_modified_notify)
444 444
445 filename = eina_stringshare_printf("%s/filecreated", dirname); 445 filename = eina_stringshare_printf("%s/filecreated", dirname);
446 _create_file((void*)filename); 446 _create_file((void*)filename);
447 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 447 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
448 448
449 //sleep to avoid catching event generated by above manipulations 449 //sleep to avoid catching event generated by above manipulations
450 usleep(500000); 450 usleep(500000);
@@ -472,7 +472,7 @@ START_TEST(eio_test_sentry_file_file_attrib_modified_notify)
472 472
473 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_attrib_modified_notify", dirname); 473 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_attrib_modified_notify", dirname);
474 _create_file((void*)filename); 474 _create_file((void*)filename);
475 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 475 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
476 476
477 //sleep to avoid catching event generated by above manipulations 477 //sleep to avoid catching event generated by above manipulations
478 usleep(500000); 478 usleep(500000);
@@ -500,7 +500,7 @@ START_TEST(eio_test_sentry_file_file_closed_notify)
500 500
501 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_closed_notify", dirname); 501 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_closed_notify", dirname);
502 _create_file((void*)filename); 502 _create_file((void*)filename);
503 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 503 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
504 504
505 //sleep to avoid catching event generated by above manipulations 505 //sleep to avoid catching event generated by above manipulations
506 usleep(500000); 506 usleep(500000);
@@ -526,7 +526,7 @@ START_TEST(eio_test_sentry_file_file_self_deleted_notify)
526 526
527 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_self_deleted_notify", dirname); 527 filename = eina_stringshare_printf("%s/eio_test_sentry_file_file_self_deleted_notify", dirname);
528 _create_file((void*)filename); 528 _create_file((void*)filename);
529 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 529 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
530 530
531 //sleep to avoid catching event generated by above manipulations 531 //sleep to avoid catching event generated by above manipulations
532 usleep(500000); 532 usleep(500000);
@@ -555,7 +555,7 @@ START_TEST(eio_test_sentry_two_monitors_one_event)
555 555
556 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 556 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
557 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_event", dirname); 557 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_event", dirname);
558 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 558 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
559 559
560 //sleep to avoid catching event generated by above manipulations 560 //sleep to avoid catching event generated by above manipulations
561 usleep(500000); 561 usleep(500000);
@@ -587,7 +587,7 @@ START_TEST(eio_test_sentry_two_monitors_one_removed_one_event)
587 587
588 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 588 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
589 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname); 589 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname);
590 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 590 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
591 591
592 //sleep to avoid catching event generated by above manipulations 592 //sleep to avoid catching event generated by above manipulations
593 usleep(500000); 593 usleep(500000);
@@ -624,7 +624,7 @@ START_TEST(eio_test_sentry_two_monitors_one_removed_no_event)
624 624
625 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2); 625 eina_file_mkdtemp("checkFileCreationXXXXXX", &dirname2);
626 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname); 626 filename = eina_stringshare_printf("%s/eio_test_sentry_two_monitors_one_removed", dirname);
627 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 627 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
628 628
629 //sleep to avoid catching event generated by above manipulations 629 //sleep to avoid catching event generated by above manipulations
630 usleep(500000); 630 usleep(500000);
@@ -658,7 +658,7 @@ START_TEST(eio_test_sentry_two_files_in_same_directory)
658 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_2", dirname); 658 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_2", dirname);
659 _create_file((void*)filename); 659 _create_file((void*)filename);
660 _create_file((void*)filename2); 660 _create_file((void*)filename2);
661 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 661 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
662 662
663 //sleep to avoid catching event generated by above manipulations 663 //sleep to avoid catching event generated by above manipulations
664 usleep(500000); 664 usleep(500000);
@@ -691,7 +691,7 @@ START_TEST(eio_test_sentry_two_files_in_same_directory_one_removed)
691 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_one_removed_2", dirname); 691 filename2 = eina_stringshare_printf("%s/eio_test_sentry_two_files_in_same_directory_one_removed_2", dirname);
692 _create_file((void*)filename); 692 _create_file((void*)filename);
693 _create_file((void*)filename2); 693 _create_file((void*)filename2);
694 sentry = efl_add_ref(EIO_SENTRY_CLASS, NULL); 694 sentry = efl_add(EIO_SENTRY_CLASS, efl_main_loop_get());
695 695
696 //sleep to avoid catching event generated by above manipulations 696 //sleep to avoid catching event generated by above manipulations
697 usleep(500000); 697 usleep(500000);