forked from avast/retdec-regression-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add more tests of calls through Procedure Linkage Table (PLT)
These test binaries contain endbr32 and endbr64 instructions, so this PR should be committed after RetDec has moved to Capstone 4.0.2 (avast/retdec#1086).
- Loading branch information
1 parent
cb21b64
commit de1572b
Showing
10 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#include <stdlib.h> | ||
int main(int argc, char ** argv) { | ||
return rand(); | ||
} |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
from regression_tests import * | ||
|
||
class CommonTest(Test): | ||
"""Output of these tests is nearly the same.""" | ||
settings = TestSettings( | ||
input=[ | ||
'call-rand.x64.clang.opt0.exe', | ||
'call-rand.x64.clang.opt2.exe', | ||
'call-rand.x64.gcc.opt0.exe', | ||
'call-rand.x64.gcc.opt2.exe', | ||
'call-rand.x86.clang.opt0.exe', | ||
'call-rand.x86.clang.opt2.exe', | ||
'call-rand.x86.gcc.opt0.exe', | ||
'call-rand.x86.gcc.opt2.exe' | ||
]) | ||
|
||
def test_main_calls_rand(self): | ||
main = self.out_c.funcs['main'] | ||
assert main.calls('rand') |