Commit Graph

58 Commits

Author SHA1 Message Date
Alessandro Di Federico 72947f0f71 tests: limit inputs to ensure 1-to-1 matching 2023-06-23 17:57:02 +02:00
Alessandro Di Federico 866e6edb10 Import CollectFunctions tests 2023-05-17 11:19:35 +02:00
Giacomo Vercesi a13c3e5ac2 revng: fix executable/shebang in scripts
Some files had discordant executable bit presence and shebang presence.
This commit fixes these occurrences by adding removing the required
feautures where needed.
2023-05-11 10:02:46 +02:00
Alessandro Di Federico 5542382bdb revng-qa tests: adopt full paths 2023-05-10 09:15:18 +02:00
Giacomo Vercesi af237074f3 Implement AnalysesList in Python API & GraphQL
Implement the new functionality of AnalysesList on the python's side of
rev.ng and the GraphQL schema both in static and autogenerated form
2023-03-22 17:31:46 +01:00
Ivan Krysak e1ebe8ea35 ABI-testing: introduce CABI-FT correction script 2023-03-15 10:19:03 +01:00
Ivan Krysak f068bcb34f ABI-testing: switch to the new analyses 2023-03-15 10:19:03 +01:00
Ivan Krysak ad0fc079b8 ABI-testing: rename verify-abi
The new name is `check-compatibility-with-abi`
2023-03-15 10:19:02 +01:00
Ivan Krysak f4cbbaa365 ABI-testing: remove an extra tag redefinition 2023-03-15 10:19:02 +01:00
Ivan Krysak 3687869795 Model: make AddPrimitiveTypes a pure analysis 2023-03-15 10:19:01 +01:00
Giacomo Vercesi 7751143aad revng daemon: add timeout-keep-alive option
Add the `--timeout-keep-alive` option for all invocations of `revng
daemon`. This avoids some edge cases where connections are abruply
closed.
2023-03-14 20:50:28 +01:00
Alessandro Di Federico f68b7866b3 Introduce BasicBlockID
This commit introduces `BasicBlockID` as the unique identifier for a
`efa::BasicBlock` into the CFG. A `BasicBlockID` is defined by a
`MetaAddress` plus an incremental integer. This enables us to have
multiple instances of the same block in a single function, which is
particularly useful when inlining multiple times the same function.

Apart from this, the commit also does the following:

* It drops representing `MetaAddress`es a `structs` in the IR. This created
  several issues related to ABI. We now represent them as strings.

* It defines more functions in `support.h`, instead of defining prototypes
  by hand in `CodeGenerator.cpp` and the like. Specifically, `unknownPC`
  and `raise_exception_helper`. We also introduce a C "constructor" for
  `PlainMetaAddress`.

* It significantly reduces the API of `GeneratedCodeBasicInfo`, which
  was supposed to be put on a diet since a long time.  Specifically,
  many jump target related methods have been moved to free functions in
  `IRHelpers.h`.  Also `GCBI::getSuccessors` has been pushed into its
  only user, `PruneRetSuccessors`, to prevent further usage of a
  deprecated API. In the future, it would be nice to drop it entirely.

* It introduces `efa::BasicBlock::InlinedFrom`.

* Introduce an enum to represent named argument indices for `newpc`.
  This enables us to more effectively manipulate its argument list.

* It improves the verification and error reporting for
  `efa::FunctionMetadata`.

* Update tests.

This commit is preliminary to another piece of work to improve the
generality of inlining beyond the simple "fake function" scenario, for
which the feature was originally conceived.
2023-02-23 14:51:10 +01:00
Antonio Frighetto 69e8615c9f Introduce test for Segment.Type importing 2023-02-06 12:08:18 +01:00
Antonio Frighetto 17f799e3c2 Move ProcessCallGraph pipe within Isolate
`CrossRelations` container needs to be available
just as `FunctionIsolation` has executed.
2023-02-06 09:37:23 +01:00
Giacomo Vercesi f3f04ef891 daemon/test.py: improve daemon log handling
Improve the handling of the daemon process when running tests.
print.
2023-02-01 17:46:21 +01:00
Djordje Todorovic 809ea798a6 Introduce revng import debug-info
It supports both PDB and DWARF formats.
We get rid of `import dwarf` tool.
2022-12-13 11:25:46 +01:00
Alessandro Di Federico 821f3b169a abi/test.sh: fix shellcheck warning 2022-12-09 09:02:29 +01:00
Alessandro Di Federico 0ed1c6f9ee daemon-self-test: disable testing
Running `revng daemon-self-test` runs steps and analyses that are part
of downstream projects, leading to unexpected and unstable results.
We can still run this downstream.
We can re-enable this once we can run it on a specific step and with a
custom set of analyses.
2022-11-30 15:06:54 +01:00
Alessandro Di Federico 9470e2582b abi/test.sh: use temporary directory 2022-11-30 15:06:54 +01:00
Alessandro Di Federico 036963b0b7 Rework tests 2022-11-30 15:06:54 +01:00
Alessandro Di Federico 762cc63d96 CollectCFG: purge addresses from test ground truth 2022-11-30 15:06:54 +01:00
Alessandro Di Federico 085f44b0ad tests: adopt temp 2022-11-30 15:06:54 +01:00
Giacomo Vercesi f7ec377aa4 mktemp: use --tmpdir
Without the --tmpdir argument the current directory is used to generate
the temporary file
2022-10-24 09:58:55 +02:00
Alessandro Di Federico 368f27b876 yields test: use one-per-architecture 2022-10-22 00:42:53 +02:00
Massimo Fioravanti d55aa9b9e6 Pipeline: remove * from targets
Now * is just a pipeline frontend shorthand.
2022-10-20 14:20:12 +02:00
Alessandro Di Federico 8aa2c2ac44 daemon/test.py: do not use memfd 2022-10-11 19:08:10 +02:00
Alessandro Di Federico 12191a8d01 daemon/test.py: use log function 2022-10-11 19:08:10 +02:00
Giacomo Vercesi ff48b9de75 Introduce revng daemon-self-test
This new command will, given an executable, try to produce all
artifacts. By default it will run `revng daemon`, however an external
address can be provided to test remote daemons, e.g. running inside a
container.
2022-10-06 15:12:36 +02:00
Giacomo Vercesi e5963395dc Drop requests in favor of aiohttp
Drop the use of requests in the daemon tests, use aiohttp instead as
it allows the use of unix sockets, which simplifies the creation of
multiple ephimeral daemons
2022-10-04 14:20:03 +02:00
Giacomo Vercesi 5d02e7258f revng.daemon test: fail if daemon exit code != 0 2022-10-04 14:13:56 +02:00
Alessandro Di Federico f6d5cd24dd Give pretty names to temporary files 2022-09-26 18:09:01 +02:00
Ivan Krysak f0afb1066b Yield: rework testing and add call graph tests 2022-09-26 12:11:13 +02:00
Alessandro Di Federico 85d574b305 test-abi: various fixes 2022-09-21 18:39:28 +02:00
Djordje Todorovic 2e5a6dc167 model: add tests for import-idb 2022-09-21 18:39:22 +02:00
Alessandro Di Federico 137fad57e9 revng-daemon tests: increase verbosity 2022-09-08 09:44:41 +02:00
Alessandro Di Federico c6c66e70f4 revng.cfg-svg: use one-per-architecture 2022-08-26 18:12:23 +02:00
Alessandro Di Federico ef3d24eb08 test.py: get ephemeral port, drop psutil 2022-08-26 09:50:42 +02:00
Alessandro Di Federico 73ae7c89b4 test.py: run preliminary analyses 2022-08-26 09:50:42 +02:00
Giacomo Vercesi 2ce7b216e8 GraphQL: drop step name conversion 2022-08-26 09:50:42 +02:00
Massimo Fioravanti 0bb115a4f3 revng-pipeline: rework syntax for targets
Was: step:container:p/a/t/h:kind
Now: step/container/p/a/t/h:kind
2022-08-10 09:49:24 +02:00
Massimo Fioravanti 4cd5abe2b0 revng-pipeline: introduce --produce and --analyze 2022-08-10 09:49:24 +02:00
Massimo Fioravanti 96bd5835d8 revng-pipeline: rework file-to-container syntax 2022-08-10 09:49:24 +02:00
Alessandro Di Federico 1cf9a06009 EnforceABI: use read-only model 2022-08-08 13:55:36 +02:00
Alessandro Di Federico fab6b4133b Tests for ARM, i386, x86-64 and MIPS dynamic calls 2022-08-08 13:55:35 +02:00
Alessandro Di Federico 6a6cd939db Rework EarlyFunctionAnalysis 2022-08-08 13:55:34 +02:00
Ivan Krysak 792da8151e Redesign the rank definition process 2022-08-05 19:58:57 +02:00
Djordje Todorovic ee686ef158 import-pe: Add more tests for type system 2022-07-28 15:04:26 +02:00
Djordje Todorovic d69020745d import-pe: Add tests 2022-07-28 15:02:49 +02:00
Giacomo Vercesi 3e9058393e Rework YieldAssemblyHTML to output PTML 2022-07-28 08:47:34 +02:00
Giacomo Vercesi 930bac9bca daemon test: filter out environment variables
When running `revng daemon` for tests, remove a selection of
environment variables that could negatively impact the correct
execution of the tests.
2022-07-22 14:56:15 +02:00