diff options
author | Vivek Ellur <vivek.ellur@samsung.com> | 2015-12-03 09:03:59 +0100 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2015-12-03 11:31:07 -0500 |
commit | 86116ab18cb88060629be1888cf029d0f2eed544 (patch) | |
tree | f19bc5e1cdb0250f4fafc7a4f0b7494543e8bd8e | |
parent | ba08cdcdce7a758fc048188398eaadfa43726da5 (diff) | |
download | efl-86116ab18cb88060629be1888cf029d0f2eed544.tar.gz |
Eio: Fixes T2831, eio xattr tests failing
Summary:
@Fix
The eio_file_xattr test was failing in jenkins, so added a new callback
and moved the check condition to callback. The condition is checked
only when it is successfully executed
Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>
Reviewers: cedric, stefan_schmidt
Subscribers: jpeg, cedric
Maniphest Tasks: T2831
Differential Revision: https://phab.enlightenment.org/D3400
-rw-r--r-- | src/tests/eio/eio_test_xattr.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/tests/eio/eio_test_xattr.c b/src/tests/eio/eio_test_xattr.c index 6600026b5b..6f15fac44c 100644 --- a/src/tests/eio/eio_test_xattr.c +++ b/src/tests/eio/eio_test_xattr.c @@ -83,6 +83,15 @@ _done_once_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED) } static void +_done_file_cb(void *data EINA_UNUSED, Eio_File *handler EINA_UNUSED) +{ + int *num_of_attr = (int *)data; + + fail_if( (*num_of_attr) != (sizeof (attribute) / sizeof (attribute[0]))); + ecore_main_loop_quit(); +} + +static void _done_get_cb(void *data, Eio_File *handler EINA_UNUSED, const char *name, unsigned int len EINA_UNUSED) { @@ -170,15 +179,13 @@ START_TEST(eio_test_xattr_set) num_of_attr = 0; fp = eio_file_xattr(test_file_path, - _filter_cb, _main_cb, _done_once_cb, _error_cb, + _filter_cb, _main_cb, _done_file_cb, _error_cb, &num_of_attr); fail_if(num_of_attr != 0); fail_if(!fp); ecore_main_loop_begin(); - fail_if(num_of_attr != sizeof (attribute) / sizeof (attribute[0])); - close(fd); unlink(test_file_path); eio_shutdown(); |