Skip to content

PyTest#8

Open
CLOVIS-AI wants to merge 62 commits into
serpilliere:rust_versionfrom
CLOVIS-AI:rust/stabilization
Open

PyTest#8
CLOVIS-AI wants to merge 62 commits into
serpilliere:rust_versionfrom
CLOVIS-AI:rust/stabilization

Conversation

@CLOVIS-AI

@CLOVIS-AI CLOVIS-AI commented Apr 26, 2022

Copy link
Copy Markdown

Depends on https://github.com/serpilliere/miasm-rs/pull/74.

Rewrite of the different tests to improve visibility on test results (see the different failures within a single file, better traceback, less intensive parallelization for faster tests).

Fixes various small issues in the project (deprecated API calls…)

@CLOVIS-AI

Copy link
Copy Markdown
Author

Current state: 2313 successful tests

@CLOVIS-AI
CLOVIS-AI force-pushed the rust/stabilization branch from 53e8e41 to d93f388 Compare April 27, 2022 13:35
@CLOVIS-AI

Copy link
Copy Markdown
Author

Current state: 4098 successful tests

@CLOVIS-AI
CLOVIS-AI force-pushed the rust/stabilization branch 4 times, most recently from 4be7d1f to 7f90859 Compare May 3, 2022 13:20
@CLOVIS-AI

Copy link
Copy Markdown
Author

Current state: 4159 successful tests

@CLOVIS-AI
CLOVIS-AI force-pushed the rust/stabilization branch 2 times, most recently from fe59427 to c674a9d Compare May 11, 2022 09:26
@CLOVIS-AI

Copy link
Copy Markdown
Author

Current state: 4414 successful tests

@CLOVIS-AI
CLOVIS-AI force-pushed the rust/stabilization branch from c674a9d to 5d333b1 Compare May 11, 2022 12:35
@CLOVIS-AI
CLOVIS-AI force-pushed the rust/stabilization branch from 187fe7b to 0a574dc Compare May 17, 2022 07:08
@CLOVIS-AI

Copy link
Copy Markdown
Author

Doesn't depend on #6 anymore.

@CLOVIS-AI
CLOVIS-AI force-pushed the rust/stabilization branch 3 times, most recently from 8c941c1 to 62d1649 Compare June 12, 2022 11:08
Comment thread example/asm/simple.py Outdated
Comment thread example/asm/test.py Outdated
continue
out.append(arg * ExprInt(count, expr.size))
elif count < 0:
out.append(arg * (-ExprInt(-count, expr.size)))

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This may be counter productive:
The next step in simplification will be to test if we have - ExprInt(XXX) and transform this to ExprInt(-XXX)

@CLOVIS-AI CLOVIS-AI Jun 23, 2022

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I added this when the ExprInt constructor was bugged and forgot to remove it.

Comment thread miasm/core/cpu.py
return bs.get_bytes_exact(offset, l)

@classmethod
def endian_offset(cls, attrib, offset):

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as you are in cpu.py, maybe this fuction should be named "endian_offset_u32" or something approaching?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

self.nofollow.add(expr)
return None
elif expr.is_function_call():
elif expr.is_op() and expr.is_function_call():

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can mimic the python code:
bind is_function_code to each miasm expr so that we don't have to test the nature of expr
(is_function_code points is to have a shortcut to test this. so having a first test to do before is a bit counter productive ?)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requires a modification to the Rust code, implemented in https://github.com/serpilliere/miasm-rs/pull/76

@CLOVIS-AI
CLOVIS-AI force-pushed the rust/stabilization branch from b8d1044 to 50440d9 Compare June 23, 2022 13:58
CLOVIS-AI added 27 commits June 24, 2022 10:04
…p the generated shellcodes after the tests have ended
The goal is to validate the tests without migrating everything yet.
This allows tests to be skipped entirely automatically if a missing (optional) dependency is imported, without needing to edit the regular Miasm code.

If the code is called without PyTest, the normal ImportError is raised (unchanged behavior).
@CLOVIS-AI
CLOVIS-AI force-pushed the rust/stabilization branch from 50440d9 to e9ce843 Compare June 24, 2022 08:07
@CLOVIS-AI CLOVIS-AI mentioned this pull request Jun 27, 2022
@CLOVIS-AI CLOVIS-AI changed the title Test stabilization PyTest Jul 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants