summaryrefslogtreecommitdiff
path: root/src/bin/exactness/player.c (follow)
AgeCommit message (Collapse)Author
2020-05-12exactness: resolve float compare warningsMike Blumenkrantz
Summary: Depends on D11796 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11797
2020-05-05exactness_player: do not test for delay_msMarcel Hollerbach
that is a unsigned int, if its 0 the timer is called as fast as possible. Not doing that breaks exactness. @fix Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11774
2020-04-23exactness: check action for NULLStefan Schmidt
If the given events list is NULL the data pointer would be as well. Make sure we check for NULL here before accessing. CID: 1419843 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11754
2020-04-23exactness: use convinience ecore_file function to get dirStefan Schmidt
Instead of doing our own parsing here we should use ecore_file_dir_get() which uses dirname() already to solve this. CID: 1422196 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11727
2020-04-23exactness: do not access potential NULL pointerStefan Schmidt
These to code lines should be in one block and not one exectued without the if. CID: 1422198 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11726
2020-04-20exactness: make sure we handle a negative file descriptorStefan Schmidt
In an error case the fd could be negative here and we should check before feeding it into fdopen(). This is the same patch we used in recorder.c CID: 1422194 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11728
2020-04-17exactness: limit length for font_path to stay in bufferStefan Schmidt
We get fonts_dir from a getenv() without and length check. Make sure that we stay in the given buffer size when stitching the file path together. CID: 1422195 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11718
2020-04-17exactness: fix typo in function nameStefan Schmidt
Simple spelling mistake. overlay instead of overloay. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11714
2020-04-01exactness: protect against forked callsMarcel Hollerbach
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-03-31exactness: error when _src_unit is NULLMarcel Hollerbach
if _src_unit is NULL, the write here would delete the actions, with this commit we ensure that this is printing an error. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11627
2020-03-31exactness_play: transform to LD_PRELOAD libraryMarcel Hollerbach
this can now be loaded as LD_PRELOAD library Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11615
2020-03-31exactness_player: refactor main methodMarcel Hollerbach
this refactors everything that is not argc argv related out of the main method. For later usage Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11614
2020-03-31exactness: remove code for compilingMarcel Hollerbach
this seems to be made for compiling binaries before testing. That sounds like a good idea, however, implementing a full buildtool in exactness is a bit hard. Hence, using meson for that would be better. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11613
2020-03-25exactness: handbuild a new argv array instead of reassemling the new oneMarcel Hollerbach
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-24exactness: switch from homegrown debug printf to eina_logStefan Schmidt
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-24exactness: remove exactness library and move code into binary folderStefan Schmidt
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-20exactness: remove support for legacy .rec formatStefan Schmidt
From now on we will only go with the new .exu format. All tests have been converted two and a half years ago already. If there still is a need for this in some corner cases the external exactness application still has support for this. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11537
2020-03-20exactness: factor out the special _mkdir() handlingStefan Schmidt
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-20exactness: factour out the program invoke codeStefan Schmidt
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-12exactness: factor out duplicated code for debug session handlingStefan Schmidt
No need to have these macros ducplicated in two file, we can just share them and reduce maintenance. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11459
2020-03-12exactness: hamonize use of PATH_MAX as maximal path length allowedStefan Schmidt
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-12exactness: factor out _printf() handling into common partStefan Schmidt
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-02-26exactness: use eina_strdup() to avoid extra NULL checkingStefan Schmidt
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-26exactness: check return code from ecore_evas_initStefan Schmidt
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-26exactness: avoid leak on leaving scopeStefan Schmidt
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-26exactness: player: allow space for the terminating nullStefan Schmidt
Allocate extra space for the terminating null byte and / of the string. Switch to snprintf() as well. CID: 1419863 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11410
2020-02-12exactness_player: fix running of exactness player after compile fixStefan Schmidt
Summary: The last compile fix broke the execution of exactness. When replacing _POSIX_PATH_MAX with PATH_MAX here we did not catch that it would overwrite out of bounds here as the original _POSIX_PATH_MAX is limited to 256 while PATH_MAX can go up to 4096. This screws up the size of the memset. Reviewers: zmike, bu5hm4n, vtorri, ali.alzyod Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11317
2020-02-10exactness_player: make use of PATH_MAX define instead of posix variantStefan Schmidt
The use of _POSIX_ has lead to a compile problem on old Ubuntu (16.04) versions. We use PATH_MAX everywhere else so follow suit here. Fixes T8613 Reviewed-by: Ali Alzyod <ali198724@gmail.com> Differential Revision: https://phab.enlightenment.org/D11305
2020-02-07exactness: fix init/shutdown handling of efl components in various binariesStefan Schmidt
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-07exactness: remove unused codeStefan Schmidt
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-07exactness: remove no longer needed EO and BETA API definesStefan Schmidt
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-07exactness: import code from external repo into efl.gitDaniel Zaoui
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