summaryrefslogtreecommitdiff
path: root/src/bin/exactness (follow)
AgeCommit message (Collapse)Author
2020-06-08exactness: record and print test time on successStefan Schmidt
Having the runtime of a test is interesting for debugging and optimization. Printing them only on success for now. Differential Revision: https://phab.enlightenment.org/D11935
2020-05-27refactor buildMarcel Hollerbach
libraries are split into deps, external deps, and pub deps. Evas engines are refactored to use the predefined engine deps. this is preparation work for efl-one. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11806
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-30exactness: remove no longer needed _evas_new()Stefan Schmidt
This has been unused since the move to a preloaded lib and now makes trouble durign compilation on Fedora32. @fix Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11767
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-inspect: do not use sprintfMarcel Hollerbach
there is not yet a CID for this, but we should probebly not do that. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D11731
2020-04-20exactness-inspect: remove abscure xor checkMarcel Hollerbach
this is a obscure check, if this was ever reached, then it would simply crash, because one pointer will be NULL, but strcmp will be called on it. CID 1419854 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11722
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-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(). CID: 1422197 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11725
2020-04-20exactness: handle case where eet_data_image_write() failsStefan Schmidt
We never checked how many bytes had been written. Check on return and propagate error upwards to caller. CID: 1419856 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11724
2020-04-20exactness: remove unused codeStefan Schmidt
We no longer support the old .rec format and we can always expect the file to be exu. Coverity found this block to be always true so the else part could not be reached. CID: 1421996 Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11723
2020-04-17exactness-inspect: unit1 can never be NULLMarcel Hollerbach
checkinf for it beeing NULL means that we would have to equip every usage of unit1 with a check, but that is useless. CID 1419859 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11721
2020-04-17exactness-inspect: fix NULL accessMarcel Hollerbach
ii might be NULL so we should ensure it is not NULL to call item_select CID 1419865 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11720
2020-04-17exactness-inspect: sanitize if clauseMarcel Hollerbach
these if clause where a bit bottom up, and the xor operation here seemed totally wrong, with this code we are simply displaying both entiteis of the two structs when they are there. *or* we are replacing it with the fallback. CID1419875 Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11719
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-17exactness: remove no longer used code since move to preloadStefan Schmidt
This has been around for prg handling before we switched to preload. No need for it anymore. Found when looking for a Coverity issue, which also got fixed now by luck. :-) CID: 1421994 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11713
2020-04-06build: add version to exactness libsMarcel Hollerbach
this patch was submitted through the bugtracker by Andrew Brouwers. Thank you! fixes T8644
2020-04-02exactness docs: Add docs, fix docs, remove docsXavi Artigas
Summary: The Exactness tool needed usage instructions... and quite some more fixes. There was copypasta all around. Depends on D11634 Test Plan: Build and Enjoy Reviewers: bu5hm4n, stefan_schmidt Reviewed By: stefan_schmidt Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D11637
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: equip with ERR and CRITMarcel Hollerbach
before a few commits, we had the situation that errors were overseen because the log was simply so big, that errors did not get shown properly. With this commit, exactness will simply abort if there is a real issue in the code. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11624
2020-03-31exactness: correctly call mkdirMarcel Hollerbach
we should not error when mkdir returns < 0. EEXIST should not result in the return here. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11618
2020-03-31exactness: do not efl_del the evasMarcel Hollerbach
there is no need to do that, more than that. This is super dangerous, the display and connection ptr of x are passed from ecore_evas to evas, if you delete evas before ecore_evas, the later ecore_evas deletion will destroy the x connection which calls some functions in evas, which is already freed, which leads to a crash. Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11617
2020-03-31exactness_play: introduce runner scriptMarcel Hollerbach
this is just a little python script, so you can lunch exactness_play without the need of handdefining LD_PRELOAD Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11616
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-31exactness_record: introduce runner scriptMarcel Hollerbach
this is just a little python script, so you can lunch exactness_record without the need of handdefining LD_PRELOAD Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org> Differential Revision: https://phab.enlightenment.org/D11611
2020-03-31exactness_recorder: move to preloadMarcel Hollerbach
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-31exactness_recorder: refactor main methodMarcel Hollerbach
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-30exactness_recorder: cleanup code a bitMarcel Hollerbach
_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-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-03-02exactness: check success of mkdirStefan Schmidt
Evaluate return code of mkdir() and print error if it fails. CID: 1419844 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11429
2020-02-27exactness: inspect: use logical OR instead bitwise XORStefan Schmidt
Coverity pointed these out as we deferences after null check. Looking into it showed these use of a bitwise operator on vars where it does not make any sense (to me). They look like wrongly done NULL checks. Switchign them over to a logical OR operator. CID: 1419876, 1419869, 1419868, 1419862, 1419854, 1419849 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11432
2020-02-27exactness: inspect: remove unreachable codeStefan Schmidt
If dt equals EX_FONTS_DIR we would have returned already. CID: 1419879 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11430
2020-02-27exactness: handle error cases for saving an imageStefan Schmidt
Handle the error case and propagate the error upwards. CID: 1419855 Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D11428
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