Compare commits

...

7 Commits

Author SHA1 Message Date
Stefan Schmidt f99032a066 TESTING 2020-06-09 15:45:00 +02:00
Stefan Schmidt d4cfb511f9 tests: eina: make sure we always check on eina_matrixsparse_data_idx_get return
It has been checked in all other places, but has been forgotten in these
two.

CID: 1401081
2020-06-09 15:21:28 +02:00
Stefan Schmidt 251c5f3fdc tests: eina: check return of eina_module_load and unload
These could fail as well. Check in testsuite.

CID: 1400961
2020-06-09 15:17:36 +02:00
Stefan Schmidt f1a0174d9b tests: eo: handle error return of eina_value_int_convert()
CID: 1400962
2020-06-09 15:09:08 +02:00
Stefan Schmidt 0eca4c64d3 tests: evas: check fd being non -1 before using close()
eina_file_mkstemp would return -1 in an error case. Make sure we check
the return when clsoing here.

CID: 1400790
2020-06-09 14:29:35 +02:00
Stefan Schmidt 7ce639ac7c benchmarks: eina: make sure we do not divide by zero
Make sure we do not divide by i if it is zero here.

CID: 1400768
2020-06-09 14:22:19 +02:00
Stefan Schmidt 759f5608f2 tests: eina: also handle failure cases when cleaning up created files/folders
Somethign fishy is going on if we can not delete the files and folders
we created.

CID: 1400986
2020-06-09 14:04:31 +02:00
7 changed files with 24 additions and 31 deletions

View File

@ -58,39 +58,30 @@ jobs:
- os: linux
env: DISTRO=Fedora32 CI_BUILD_TYPE=default
- os: linux
if: type = cron
env: DISTRO=Fedora32 CI_BUILD_TYPE=release-ready
- os: linux
if: type = cron
env: DISTRO=Ubuntu2004
- os: linux
if: type = cron
env: DISTRO=Ubuntu1910
- os: linux
if: type = cron
env: DISTRO=Debian103
- os: linux
if: type = cron
env: DISTRO=Fedora31 CI_BUILD_TYPE=coverity
- os: linux
if: type = cron
env: DISTRO=Fedora32 CI_BUILD_TYPE=asan
- os: linux
if: type = cron
env: DISTRO=Fedora32-exactness CI_BUILD_TYPE=exactness
- os: linux
if: type = cron
env: CI_BUILD_TYPE=codecov
- os: linux
if: type = cron
arch: arm64
env: CI_BUILD_TYPE=default
- os: linux
if: type = cron
arch: ppc64le
env: CI_BUILD_TYPE=no-bindings
- os: linux
if: type = cron
arch: s390x
env: CI_BUILD_TYPE=no-bindings
@ -144,14 +135,3 @@ before_cache:
mv $HOME/Library/Caches/Homebrew $HOME/cachedir/Homebrew
fi
notifications:
irc:
channels:
- "chat.freenode.net#edevelop"
on_success: change
on_failure: always
template:
- "TravisCI build %{build_number} in branch %{branch}: %{result} - %{message} (%{elapsed_time})"
- "Commit: %{commit_subject} (%{commit}) from %{author}"
- "Change view : %{compare_url}"
- "Build details : %{build_url}"

View File

@ -429,9 +429,12 @@ ecore_hash_dump_stats(Ecore_Hash *hash)
sum_n += (double)n;
}
}
variance = (sum_n_2 - ((sum_n * sum_n) / (double)i)) / (double)i;
printf("Average length: %f\n\tvariance^2: %f", (sum_n / (double)i),
variance);
if (i)
{
variance = (sum_n_2 - ((sum_n * sum_n) / (double)i)) / (double)i;
printf("Average length: %f\n\tvariance^2: %f", (sum_n / (double)i),
variance);
}
}
static int

View File

@ -814,7 +814,7 @@ EFL_START_TEST(eina_test_file_mktemp)
fd = eina_file_mkstemp(buf, &tmpfile);
fail_if((fd < 0) || !tmpfile || errno);
close(fd);
fail_if(close(fd));
it = eina_file_direct_ls(tmpdir);
fail_if(!it);
@ -825,8 +825,8 @@ EFL_START_TEST(eina_test_file_mktemp)
eina_iterator_free(it);
unlink(tmpfile);
remove(tmpdir);
fail_if(unlink(tmpfile));
fail_if(remove(tmpdir));
}
EFL_END_TEST

View File

@ -145,9 +145,11 @@ EFL_START_TEST(eina_test_simple)
fail_if(row != 3 || col != 5);
test1 = eina_matrixsparse_data_idx_get(matrix, 4, 3);
fail_if(test1 == NULL);
fail_if(*test1 != data[4][3]);
test1 = eina_matrixsparse_data_idx_get(matrix, 1, 3);
fail_if(test1 == NULL);
fail_if(*test1 != data[1][3]);
/* data changing */

View File

@ -32,14 +32,14 @@ static Eina_Bool list_cb(Eina_Module *m, void *data EINA_UNUSED)
const char *file;
/* the reference count */
eina_module_load(m);
fail_if(!eina_module_load(m));
/* get */
sym = eina_module_symbol_get(m, "dummy_symbol");
fail_if(!sym);
fail_if(*sym != 0xbad);
file = eina_module_file_get(m);
fail_if(!file);
eina_module_unload(m);
fail_if(eina_module_unload(m));
return EINA_TRUE;
}

View File

@ -27,12 +27,19 @@ static Eina_Error
_a_set_reflect(Eo *obj, Eina_Value value)
{
int a;
Eina_Error r = 0;
eina_value_int_convert(&value, &a);
if (!eina_value_int_convert(&value, &a))
{
r = EINA_ERROR_VALUE_FAILED;
goto end;
}
simple_a_set(obj, a);
end:
eina_value_flush(&value);
return 0;
return r;
}
static int

View File

@ -904,7 +904,8 @@ EFL_START_TEST(evas_object_image_map_unmap)
// save file, verify its pixels
fd = eina_file_mkstemp("/tmp/evas-test.XXXXXX.png", &tmp);
close(fd);
fail_if(fd <= 0);
fail_if(close(fd));
if (efl_file_save(o, tmp, NULL, NULL))
{
Eina_Rw_Slice sorig, sdest;