Commit Graph

44 Commits

Author SHA1 Message Date
Vincent Torri ba22016c4c tests: fix warnings and undef ref on Windows (using meson :-) )
Summary: we need to include evil_private.h so that some symbols are declared

Test Plan: compilation

Reviewers: raster, zmike, cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9129
2019-06-20 12:50:35 +01:00
Christopher Michael f537164024 eina_test_file: Fix resource leak
Summary:
Coverity reports that we leak 'path' here, so free the returned string

Fixes CID1400926

@fix
Depends on D8771

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8772
2019-05-02 13:47:28 +02:00
Christopher Michael a2e8747ec8 eina_test_file: Fix memory leak
Summary:
Coverity reports that we leak big_buffer here, so lets free it.

Fixes CID1401072

@fix

Reviewers: raster, cedric, zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: segfaultxavi, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8759
2019-05-02 13:40:43 +02:00
Carsten Haitzler dd677aa2f6 eina file test - warn - silence wanring wirth a bit of hand str trunc
truncation is intended. the way i can find to silence the warning is
use memcpy with a manually computed size...
2018-11-09 12:18:59 +00:00
Mike Blumenkrantz 32cebe903d tests: split a large failure case for eina_file tests to provide more info
Summary:
each failure case should always be separate in order to provide the highest
degree of detail available if a test fails

Reviewers: devilhorns, ManMower

Reviewed By: ManMower

Subscribers: ManMower, cedric, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6373
2018-06-25 15:20:37 -04:00
Mike Blumenkrantz 910db08a6b tests: remove 9900 loop iterations from eina_test_file_thread
no changes in coverage

fix T6842

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:31 +02:00
Mike Blumenkrantz 624925fe6e tests: move to using checked fixtures for all test suites
individual tests should not need to explicitly call init/shutdown functions
in most cases, and many did not properly do this anyway

see followup commit which resolves some issues with eina tests

ref T6813
ref T6811

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:26 +02:00
Mike Blumenkrantz adc601aca2 tests: add instrumentation to existing tests to find slow tests
efl_check.h must be included and the EFL_START/END_TEST macros must be
used in place of normal START/END_TEST macros

timing is enabled when TIMING_ENABLED is set
https://phab.enlightenment.org/w/improve_tests/

Reviewed-by: Stefan Schmidt <stefan@osg.samsung.com>
2018-04-05 11:10:25 +02:00
Vincent Torri 4a6d32b352 eina tests: add missing semicolumn
Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2018-01-31 11:07:35 -08:00
Vincent Torri 9f59009131 Eina test: delete tempory file on Windows in eina_test_file_mktemp 2018-01-30 16:52:24 +09:00
Jean-Philippe Andre 05c051405e eina file: Ensure populate is safe to call
This makes sure that the call to madvise is safe. On Linux it's not too
much of an issue as checks are made inside madvise, and the worst that
can happen is an error is returned (EINVAL). Not great.

But if MAP_POPULATE is not present, as is the case on *BSD, then the
internal function _eina_file_map_populate() is used for the populate
rule. In that case actual data is read and we should make sure not to
trigger a segfault or bus error.

Also, this makes sure that in case of HugeTLB we actually populate all
pages, rather than one page out of 8 (we were jumping by 16Mb instead of
2Mb).

Note: Can we get the size of a HugeTLB at runtime? We're assuming 2Mb
which might very well not be the case!
See: https://wiki.debian.org/Hugepages

Tested by disabling MAP_POPULATE and observing crashes :)

@fix
2017-09-18 11:58:53 +09:00
Jean-Philippe Andre 38446d8daf tests: Remove CPU affinity from all threads
I believe that all the threads created in our test suite should
be spawned without any special CPU affinity. The default parameter
is not 0 (corresponds to the first CPU, known as CPU 0) but -1.

Similarily the default priority is NORMAL (1), not 0 (URGENT).

This also affects two unused code paths: evas render2 and gl preload.

@fix
2017-03-06 17:03:47 +09:00
Stefan Schmidt 0daed02e89 tests: eina_file: check if the fd is really 0 when we set close file to true
The return value from create_file_not_empty was saved but never checked if it
really is 0. Whcih should be the case if we call the function with file_close
true.
2017-02-13 14:20:17 +01:00
Stefan Schmidt d853b0ba68 tests: eina_file: fix coding style in file_unlink test case 2017-02-13 14:12:38 +01:00
Stefan Schmidt 83e00cc8e8 tests: eina_file: remove unused variable 2017-02-13 14:10:03 +01:00
Ivan Furs 808fcf4dae eina_file: add eina_file_unlink
Test Plan: split  D4423 - unlink

Reviewers: raster, vtorri, an.kroitor, jpeg, reutskiy.v.v, NikaWhite, cedric

Reviewed By: cedric

Subscribers: artem.popov, cedric, vtorri, jpeg

Tags: #windows, #efl

Differential Revision: https://phab.enlightenment.org/D4485

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2017-02-07 15:14:54 -08:00
Vincent Torri 1b143f233e Test rework #10: Eina
mainly minor stuff: whitespaces, order of includes, ... Just don't fear the number
of changed files :-)
2016-02-16 12:41:06 +00:00
Jean-Philippe Andre 0402b5fd12 Ecore: Remove all temporary files after running make check 2016-01-19 18:18:29 +09:00
Jean-Philippe Andre d9460afcdc Eina: Add proper test case for eina_mk[ds]temp 2016-01-19 18:18:29 +09:00
Jean-Philippe Andre 7832bab253 Eina: Convert eina_test_file.c to UTF-8
It was encoded as ISO-8859 (Latin-1) before.
Maybe this will break these checks on Windows, but all of EFL APIs take
UTF-8 strings, so it doesn't make sense to have ISO-8859 here.
2016-01-19 18:18:29 +09:00
Vincent Torri 2b20e3e21b Evas example: fix warning
Summary:

Test Plan:

Reviewers: cedric

Subscribers:
2015-12-14 11:14:28 +09:00
Vincent Torri 0497b9685c efl: add binary mode to open() calls
This allows better compatibility with Windows

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-12-05 21:06:04 +01:00
Vivek Ellur 873562608e eina: add test case for file statat function.
Summary:
Added test case for eina_file_statat function

Signed-off-by: Vivek Ellur <vivek.ellur@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3293

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 16:26:23 -08:00
Vincent Torri c0f85c947b eina: fix direct_ls_simple and ls_simple tests on Windows
See comments in the patch

@fix

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-08-11 17:43:02 +02:00
vivek be5eb3f2de eina: add test case for eina_file_copy function.
Summary:
Added test case for eina_file_copy function to check copying of two files

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2449

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-18 10:52:57 +02:00
vivek 400436cd1a eina_xattr: Fixed T2381, eina xattr tests failing
Summary:
This fixes the case where the system runs with SELinux enabled and enforced.
In this scenario the system does add a selinux attribute to new files which
we need to handle during our testing.

@Fix

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: cedric, stefan_schmidt

Subscribers: stefan_schmidt, cedric

Maniphest Tasks: T2381

Differential Revision: https://phab.enlightenment.org/D2467
2015-05-06 08:42:55 +02:00
Vincent Torri c086d505a9 Eina: fix eina_file_split on Windows and update unit test
@fix

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-04-29 15:27:47 +09:00
vivek dab4fb492a eina: add test cases for eina file xattr functions.
Summary:
Added test cases for eina_file_xattr_get and eina_file_xattr_value_get functions

Signed-off-by: vivek <vivek.ellur@samsung.com>

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2401

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-22 15:10:19 +02:00
Andy Williams 128a78940b eina: include blank lines in file iterator T2237
any line that would not have been included before has length == 0
2015-03-27 21:42:45 +00:00
Andy Williams a6290f8505 eina: Change newline parsing to handle crlf better
Adjust test to demonstrate failure, existing code only worked for
windows newlines on blank line.
@fix T2236
2015-03-27 09:56:22 +00:00
Cedric BAIL 458373e795 eina: don't leak directory during testing of Eina_File infrastructure. 2015-03-13 09:33:28 +01:00
Daniel Hirt d503dbeed1 eina: Eina_File - add test case for path resolution.
Summary:
This is a follow-up to the 7cbf22212f
revert commit. It's a bit late, as the issue has already been fixed with
the later 7143bd7fb5 commit.

This test checks eina_file_sanitize "../" case with absolute paths (i.e.
that start with "/"), and should fail prior the revert mentioned above.

Should come up with more tests like this one.

Reviewers: stefan_schmidt, cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1937

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-02-05 15:37:15 +01:00
Cedric BAIL 563ea6a01c tests: remove warnings. 2014-03-06 14:27:26 +09:00
Jérémy Zurcher 58b578c9b0 eina: fix a possible race condition during eina_file_close.
replay 7e8fb93 without the breakage
2013-11-20 10:22:00 +01:00
Jérémy Zurcher 8a3e021298 Revert "eina: fix a possible race condition during eina_file_close."
it breaks everything

This reverts commit 7e8fb93206.
2013-11-20 10:22:00 +01:00
Cedric Bail 7e8fb93206 eina: fix a possible race condition during eina_file_close.
The lock on the main hash was taken to late (after we took the decision
to remove the targeted Eina_File from the cache), this means it was possible
to get an Eina_File from the cache that was going to be removed. This patch
attempt to fix that potential race condition.

Hopefully should fix T461.
2013-11-20 13:02:37 +09:00
Cedric BAIL da559ee5d0 eina: use portable infrastructure to detect page size. 2013-11-10 09:26:12 +01:00
Cedric Bail 7f8665a266 eina: improve test coverage of Eina_File API. 2013-10-25 19:57:57 +09:00
Cedric Bail cae6b0b0e4 eina: improve test coverage of virtual file. 2013-10-25 19:50:14 +09:00
Carsten Haitzler 69e27abdc3 eina - and e3fl in general - stop using eina_error_get/set - useless really 2013-10-11 16:50:40 +09:00
Oleksander Sirook 337b3d4daf eina: add test for 'eina_file_map_new' function. 2013-08-13 17:31:41 +09:00
Vladislav Brovko 7584a7e84d eina: add eina_file_mkdtemp and tests for Eina_File.
Test added for :
eina_file_direct_ls_simple
eina_file_ls_simple

Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
2013-03-27 22:45:34 +09:00
Vincent Torri 7fe3d35994 merge: __UNUSED__ --> EINA_UNUSED and some fixes in eo.
SVN revision: 77542
2012-10-05 20:09:47 +00:00
Vincent Torri 785f2a6b3a merge : add eina
currently, examples, tests and benchmark are not set. That's the next things i'll do


SVN revision: 76710
2012-09-16 10:57:48 +00:00