Commit Graph

23 Commits

Author SHA1 Message Date
Felipe Magno de Almeida 8948e80de7 eolian: Remove unnecessary import and export macros from test executables
Executables do not need to export and import symbols.
2020-08-23 14:02:51 -03:00
Carsten Haitzler e9adfbae00 exactness - cast enum assign - it is valid due to values. warn fix 2020-08-25 13:21:25 +01:00
Stefan Schmidt 25f4cba10d exactness: make sure we handle a negative file descriptor
In an error case the fd could be negative here and we should check
before feeding it into fdopen().

CID: 1422197

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11725
2020-04-20 12:20:52 +02:00
Stefan Schmidt 95bff0fac9 exactness: fix typo in function name
Simple spelling mistake. overlay instead of overloay.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11714
2020-04-17 10:43:01 +02:00
Marcel Hollerbach b3786aa83a exactness: protect against forked calls
there came up a issue, where a excatness spawned processes were bringing
up a efreetd instance, when the efreetd instance turned off itself, the
files for exactness were written again, which is wrong. This ensures
that forked instances do not take any actions.

Differential Revision: https://phab.enlightenment.org/D11634
2020-04-01 19:25:36 +02:00
Marcel Hollerbach 7891e8582b exactness_recorder: move to preload
this is now not a binary anymore, that dlopen's a binary, it is now a
library, that can be loaded using LD_PRELOAD. EXACTNESS_DEST is used for
the path of the .exu file. EXACTNESS_FONTS_DIR is used to get the fonts
directory

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11610
2020-03-31 14:56:23 +02:00
Marcel Hollerbach 4ecc94f84a exactness_recorder: refactor main method
all calls taht are not related to env var checking, are moved out of the
main method. That is in preparation for later refactorings.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11623
2020-03-31 14:56:21 +02:00
Marcel Hollerbach e33f3fd7c9 exactness_recorder: cleanup code a bit
_test_name was not used globally, so lets move it to the used scope.
Verbose is not used at all either.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11609
2020-03-30 13:57:48 +02:00
Marcel Hollerbach 66e2d71414 exactness: handbuild a new argv array instead of reassemling the new one
this commit removes the code that was changing argv values, and replaces
it with a new array. Which is absolutly fine, as the argv / argc values
are never accessed later on. Only the copies that have been passed to
efl_main or elm_main.

This resolves several issues:
1. the for loop is useless, every single array element that gets
   initialized with it, is some offset from argv[0] this may also crash
   when argv[i] - argv[opt_args] is bigger strlen argv[0].
2. The memcpy here is super dangerous, the dest array is not garanteed
   to have the same size as argv[0], this only works if the client
   application name is shorter than the name "exactness_recorder"
3. The memset here is absolutly wrong. There is again no garantee that
   the array has the expected size behind that, this was constantly
   overwriting the segment after the place where argv was stored, which
   was lukely enough on fedora always the environs, which deleted the
   couple first segments. (This was not causing any fuzz, since they
   have been sudo related env vars on the docker image). However, on
   arch this just crashed right away. On Ubuntu this overwrote DISPLAY,
   which resulted in the unability to launch the app.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11600
2020-03-25 22:12:56 +01:00
Stefan Schmidt 912fbe79a2 exactness: switch from homegrown debug printf to eina_log
Use a full eina_log domain here for each executable. No need to have a
own half baked ex_printf version here for such things.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11558
2020-03-24 12:24:07 +01:00
Stefan Schmidt 9da0235d74 exactness: remove exactness library and move code into binary folder
We do not want to have EAPI from exactness exposed at this point without
any real user. I know of no application using the exactness library.
If we come to that point we can move things back into a lib, but for now
having the code shared between the various executables is all we need.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11545
2020-03-24 12:24:04 +01:00
Stefan Schmidt 2754bc93e6 exactness: factor out the special _mkdir() handling
We have an ecore function to handle most of this already. For the case
where we give a file name cut off that part before handing it off to
creation.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11458
2020-03-20 12:04:37 +01:00
Stefan Schmidt b84694f518 exactness: factour out the program invoke code
It needs a little special case handling for the player (to load the edj
file), but the rest is really the same.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11460
2020-03-20 12:04:35 +01:00
Stefan Schmidt 525113650d exactness: hamonize use of PATH_MAX as maximal path length allowed
There have been to many different defines for this in exactness.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11457
2020-03-12 16:41:05 +01:00
Stefan Schmidt f8299e0542 exactness: factor out _printf() handling into common part
First step to do some re-factoring of the exactness binaries. We will
share common parts from the different binaries in common.{c,h} to reduce
the code duplication. The start makes _printf() used in various places.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11456
2020-03-12 16:41:03 +01:00
Stefan Schmidt 5e675938d5 exactness: use eina_strdup() to avoid extra NULL checking
strdup() would not be happy about a NULL to copy, but we have
eina_strdup in place already to handle this gracefully.

CID: 1419846

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11421
2020-02-26 15:15:50 +01:00
Stefan Schmidt 983d03d012 exactness: check return code from ecore_evas_init
Check if we can initialize correctly and return failure if not.

CID: 1419872, 1419864, 1419867, 1419850

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11420
2020-02-26 15:15:48 +01:00
Stefan Schmidt de389fbe5e exactness: avoid leak on leaving scope
Before we leave the fucntion here we need to free our temporaray paths
variable.

CID: 1419860

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11411
2020-02-26 15:15:45 +01:00
Stefan Schmidt ea3c30ca1e exactness: cleanup some coding style isues
Just a few that I spotted when looking over the code.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11290
2020-02-07 11:31:28 +01:00
Stefan Schmidt 248f3d9d6b exactness: fix init/shutdown handling of efl components in various binaries
The init/shutdown handling for efl libraries was a bit sloppy and
unbalanced in the exactness binaries. Switching over to use
ecore_eas_init/shutdown here instead of doing all libs individually.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11289
2020-02-07 11:31:25 +01:00
Stefan Schmidt 6a4e297ec8 exactness: remove unused code
Either commented out, blank lines or no needed includes.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11288
2020-02-07 11:31:21 +01:00
Stefan Schmidt 93bdf120d0 exactness: remove no longer needed EO and BETA API defines
This has been in place during development and not updated for recent
changes and merge into efl master.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11287
2020-02-07 11:31:18 +01:00
Daniel Zaoui 50dbfcf31d exactness: import code from external repo into efl.git
Exactness has been developed in a separate git repo for many years. This
finally moves it over into efl. Having it in tree allows us for easier
testing with our current main target elementary_test and integration
into our CI system (patches for this are work in progress already).

We are only importing the lib and binary for test execution, not the
full set of test data. This is would be over 500MB and thus it will stay
in a different repo and only made available during the actual testing.

[The original patch was made by Daniel Zaoui. Over the course of review
and testing it got extended with build fixes for API changes and mingw
compilation support from Stefan Schmidt and Michael Blumenkrantz]

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11285
2020-02-07 11:31:13 +01:00