Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print asm test exit status for failing asm tests #4640

Merged
merged 2 commits into from
Sep 18, 2024

Conversation

kazarmy
Copy link
Member

@kazarmy kazarmy commented Sep 18, 2024

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've documented or updated the documentation of every function and struct this PR changes. If not so I've explained why.
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the rizin book with the relevant information (if needed)

Detailed description

This pr prints asm test exit statuses for failing asm tests ... might be useful to confirm what actually is going on.

Example output (last 3 lines) after changing 37 to 36 in the test:

asm-test-exit-status

Test plan

The pr changes are appropriate.

Closing issues

...

Copy link
Member

@XVilka XVilka left a comment

Choose a reason for hiding this comment

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

Will be useful in the future cases as well. Good idea!

@kazarmy kazarmy merged commit 9c6d50d into rizinorg:dev Sep 18, 2024
44 checks passed
@XVilka
Copy link
Member

XVilka commented Sep 18, 2024

Aha, it is disasm status:

 [XX] db/asm/lh5801 <asm> bzs +12h
-- <asm> bzs +12h <--- 8b12
-- disasm exit status: -1

[XX] db/asm/x86_32 <asm> lldt word [eax]
-- <asm> lldt word [eax] <--- 0f0010
-- disasm exit status: -1

@XVilka
Copy link
Member

XVilka commented Sep 18, 2024

At the same time:

[XX] db/asm/x86_32 <asm> add al, byte [eax]
-- <asm> add al, byte [eax] ---> 0200
-- assembly
-- asm exit status: -1

[XX] db/asm/v850 <asm> bins lp, 15, 1, lp
-- <asm> bins lp, 15, 1, lp <--- ffffdef8 ---> <IL>
-- IL
--- expected
+++ actual
@@ -1,1 +1,0 @@
-(seq (set result (| (& (>> (var lp) (bv 32 0x10) false) (>> (bv 32 0xffffffff) (- (bv 32 0x20) (bv 32 0x10)) false)) (| (& (>> (var lp) (bv 32 0x0) false) (>> (bv 32 0xffffffff) (- (bv 32 0x20) (bv 32 0x1)) false)) (& (>> (var lp) (bv 32 0x0) false) (>> (bv 32 0xffffffff) (- (bv 32 0x20) (bv 32 0xf)) false))))) (set PSW (| (| (<< (ite false (bv 32 0x1) (bv 32 0x0)) (bv 32 0x2) false) (<< (ite (&& (sle (var result) (bv 32 0x0)) (! (== (var result) (bv 32 0x0)))) (bv 32 0x1) (bv 32 0x0)) (bv 32 0x1) false)) (<< (ite (is_zero (var result)) (bv 32 0x1) (bv 32 0x0)) (bv 32 0x0) false))) (set lp (var result)))


-- disasm exit status: 0
-- IL exit status: -1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants