rizinorg / rizin

UNIX-like reverse engineering framework and command-line toolset.
https://rizin.re
GNU Lesser General Public License v3.0
2.71k stars 361 forks source link

Show the `mu_*` asserts in the AppVeyor (Windows) logs #1556

Closed XVilka closed 2 years ago

XVilka commented 3 years ago

Work environment

Questions Answers
OS/arch/bits (mandatory) Windows 64 bits
File format of the file you reverse (mandatory) -
Architecture/bits of the file (mandatory) -
rizin -v full output, not truncated (mandatory) https://github.com/rizinorg/rizin/commit/a25ef4e9c6d9734679e841d8f4a2a868922761f6

Expected behavior

Windows AppVeyor unit tests output should print the exact assert

Run ninja -C build test
ninja: Entering directory `build'
[0/1] Running all tests.
 1/89 addr_interval                  OK              0.02s
 2/89 agraph                         OK              0.10s
 3/89 analysis_cc                    OK              0.05s
 4/89 analysis_class_graph           OK              0.10s
 5/89 analysis_function              OK              0.04s
 6/89 analysis_hints                 OK              0.04s
 7/89 analysis_meta                  OK              0.07s
 8/89 analysis_op                    OK              0.05s
 9/89 analysis_var                   OK              0.04s
10/89 analysis_global_var            OK              0.03s
11/89 analysis_xrefs                 OK              0.03s
12/89 annotated_code                 OK              0.02s
13/89 analysis_block                 OK              1.19s
14/89 base64                         OK              0.02s
15/89 autocmplt                      OK              0.96s
16/89 bin                            OK              0.04s
17/89 bin_lines                      OK              0.22s
18/89 binheap                        OK              0.02s
19/89 bitmap                         OK              0.02s
20/89 buf                            OK              0.17s
21/89 cmd                            OK              0.02s
22/89 config                         OK              0.02s
23/89 cons                           OK              0.02s
24/89 contrbtree                     OK              0.02s
25/89 core_bin                       OK              0.91s
26/89 core_cmd                       OK              0.31s
27/89 core_seek                      OK              0.52s
28/89 big                            OK              2.69s
29/89 debruijn                       OK              0.02s
30/89 debug                          OK              0.02s
31/89 debug_session                  OK              0.02s
32/89 diff                           OK              0.03s
33/89 core_task                      OK              0.19s
34/89 dwarf_info                     OK              0.03s
35/89 dwarf                          OK              0.05s
36/89 endian                         OK              0.02s
37/89 event                          OK              0.02s
38/89 file                           OK              0.02s
39/89 flags                          OK              0.02s
40/89 glob                           OK              0.02s
41/89 graph                          OK              0.02s
42/89 hash                           OK              0.02s
43/89 hex                            OK              0.02s
44/89 id_storage                     OK              0.02s
45/89 idpool                         OK              0.02s
46/89 idstorage                      OK              0.02s
47/89 intervaltree                   OK              0.30s
48/89 io                             OK              0.02s
49/89 itv                            OK              0.02s
50/89 io_ihex                        OK              0.09s
51/89 json                           OK              0.02s
52/89 list                           OK              0.02s
53/89 ovf                            OK              0.02s
54/89 pdb                            OK              0.23s
55/89 pj                             OK              0.02s
56/89 project_migrate                OK              0.59s
57/89 queue                          OK              0.02s
58/89 rbtree                         OK              0.10s
59/89 reg                            OK              0.02s
60/89 run                            OK              0.02s
61/89 rz_test                        OK              0.02s
62/89 rzpipe                         OK              0.16s
63/89 serialize_analysis             OK              0.16s
64/89 serialize_config               OK              0.02s
65/89 serialize_flag                 OK              0.02s
66/89 serialize_spaces               OK              0.02s
67/89 serialize_types                OK              0.05s
68/89 dwarf_integration              OK              2.23s
69/89 skiplist                       OK              0.02s
70/89 skyline                        OK              0.02s
71/89 spaces                         OK              0.02s
72/89 sparse                         OK              0.02s
73/89 stack                          OK              0.02s
74/89 str                            OK              0.02s
75/89 strbuf                         OK              0.02s
76/89 subprocess                     OK              0.04s
77/89 table                          OK              0.02s
78/89 task                           OK              0.02s
79/89 tree                           OK              0.02s
80/89 sign                           OK              0.38s
81/89 type                           OK              0.09s
82/89 uleb128                        OK              0.02s
83/89 unum                           OK              0.02s
84/89 util                           OK              0.02s
85/89 vector                         OK              0.02s
86/89 inflate_deflate                FAIL            0.03s   exit status 1
87/89 bin_vfiles                     OK              0.04s
88/89 cpu_platform_profiles          OK              0.70s
89/89 open_analyse_save_load_project OK              2.26s

The output from the failed tests:

86/89 inflate_deflate                FAIL            0.03s   exit status 1
--- command ---
10:49:49 /home/runner/work/rizin/rizin/build/test/unit/test_inflate_deflate
--- stdout ---
test_rz_inflate ERR
[XX] Fail at line 31: Windows inflate OS bits: expected 11, got 3.

test_rz_deflate OK
test_rz_inflate_buf OK
test_rz_deflate_buf OK

-------

Summary of Failures:

86/89 inflate_deflate                FAIL            0.03s   exit status 1

Ok:                 88  
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

Full log written to /home/runner/work/rizin/rizin/build/meson-logs/testlog.txt
FAILED: meson-test 
/usr/local/bin/meson test --no-rebuild --print-errorlogs
ninja: build stopped: subcommand failed.

Actual behavior

%PYTHON%\Scripts\meson test -C build -t 10
ninja: Entering directory `C:\projects\rizin\build'
ninja: no work to do.
 1/89 addr_interval                  OK               0.02s
 2/89 agraph                         OK               0.11s
 3/89 analysis_cc                    OK               0.04s
 4/89 analysis_class_graph           OK               0.11s
 5/89 analysis_function              OK               0.03s
 6/89 analysis_hints                 OK               0.03s
 7/89 analysis_meta                  OK               0.05s
 8/89 analysis_op                    OK               0.05s
 9/89 analysis_var                   OK               0.03s
10/89 analysis_global_var            OK               0.02s
11/89 analysis_xrefs                 OK               0.02s
12/89 annotated_code                 OK               0.02s
13/89 analysis_block                 OK               0.80s
14/89 base64                         OK               0.00s
15/89 autocmplt                      OK               0.93s
16/89 big                            OK               0.64s
17/89 bin                            OK               0.06s
18/89 binheap                        OK               0.02s
19/89 bitmap                         OK               0.02s
20/89 bin_lines                      OK               0.20s
21/89 cmd                            OK               0.02s
22/89 config                         OK               0.02s
23/89 cons                           OK               0.02s
24/89 contrbtree                     OK               0.02s
25/89 buf                            OK               0.23s
26/89 core_cmd                       OK               0.34s
27/89 core_seek                      OK               0.62s
28/89 core_task                      OK               0.19s
29/89 debruijn                       OK               0.03s
30/89 debug                          OK               0.03s
31/89 debug_session                  OK               0.02s
32/89 diff                           OK               0.03s
33/89 dwarf                          OK               0.03s
34/89 dwarf_info                     OK               0.03s
35/89 dwarf_integration              OK               1.98s
36/89 endian                         OK               0.02s
37/89 event                          OK               0.02s
38/89 file                           OK               0.02s
39/89 flags                          OK               0.02s
40/89 glob                           OK               0.02s
41/89 graph                          OK               0.02s
42/89 hash                           OK               0.02s
43/89 hex                            OK               0.02s
44/89 id_storage                     OK               0.02s
45/89 idpool                         OK               0.02s
46/89 idstorage                      OK               0.02s
47/89 intervaltree                   OK               0.19s
48/89 io                             OK               0.02s
49/89 itv                            OK               0.02s
50/89 io_ihex                        OK               0.30s
51/89 json                           OK               0.02s
52/89 list                           OK               0.02s
53/89 ovf                            OK               0.00s
54/89 pdb                            OK               0.28s
55/89 pj                             OK               0.02s
56/89 core_bin                       OK               4.65s
57/89 queue                          OK               0.02s
58/89 rbtree                         OK               0.08s
59/89 reg                            OK               0.02s
60/89 run                            OK               0.02s
61/89 rz_test                        OK               0.02s
62/89 rzpipe                         OK               0.02s
63/89 serialize_analysis             OK               0.16s
64/89 serialize_config               OK               0.00s
65/89 serialize_flag                 OK               0.00s
66/89 serialize_spaces               OK               0.00s
67/89 serialize_types                OK               0.06s
68/89 project_migrate                OK               0.73s
69/89 skiplist                       OK               0.02s
70/89 skyline                        OK               0.02s
71/89 spaces                         OK               0.02s
72/89 sparse                         OK               0.01s
73/89 stack                          OK               0.00s
74/89 str                            OK               0.02s
75/89 strbuf                         OK               0.02s
76/89 subprocess                     OK               0.12s
77/89 table                          OK               0.02s
78/89 task                           OK               0.05s
79/89 tree                           OK               0.02s
80/89 sign                           OK               0.41s
81/89 uleb128                        OK               0.02s
82/89 unum                           OK               0.02s
83/89 type                           OK               0.09s
84/89 util                           OK               0.02s
85/89 vector                         OK               0.02s
86/89 inflate_deflate                FAIL             0.03s   exit status 1
>>> PATH=C:/projects/rizin/build/librz/analysis;C:/projects/rizin/build/librz/asm;C:/projects/rizin/build/librz/bin;C:/projects/rizin/build/librz/bp;C:/projects/rizin/build/librz/config;C:/projects/rizin/build/librz/cons;C:/projects/rizin/build/librz/core;C:/projects/rizin/build/librz/diff;C:/projects/rizin/build/librz/crypto;C:/projects/rizin/build/librz/debug;C:/projects/rizin/build/librz/egg;C:/projects/rizin/build/librz/flag;C:/projects/rizin/build/librz/hash;C:/projects/rizin/build/librz/io;C:/projects/rizin/build/librz/lang;C:/projects/rizin/build/librz/magic;C:/projects/rizin/build/librz/main;C:/projects/rizin/build/librz/parse;C:/projects/rizin/build/librz/reg;C:/projects/rizin/build/librz/search;C:/projects/rizin/build/librz/socket;C:/projects/rizin/build/librz/syscall;C:/projects/rizin/build/librz/type;C:/projects/rizin/build/librz/util;C:\projects\rizin\rizin-vs2019_64-v0.3.0-git\bin;C:\Python38-x64;C:\msys64\mingw64\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\\Extensions\Microsoft\IntelliCode\CLI;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30037\bin\HostX64\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TestWindow;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\bin\Roslyn;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Team Tools\Performance Tools;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\\x64;C:\Program Files (x86)\Microsoft Visual Studio\Shared\Common\VSPerfCollectionTools\vs2019\;C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\x64\;C:\Program Files (x86)\HTML Help Workshop;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\FSharp\Tools;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\devinit;C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x64;C:\Program Files (x86)\Windows Kits\10\bin\x64;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\\MSBuild\Current\Bin;C:\Windows\Microsoft.NET\Framework64\v4.0.30319;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\;C:\Program Files (x86)\Microsoft SDKs\Azure\CLI2\wbin;C:\Program Files\Git\cmd;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\PowerShell\7\;C:\Program Files\7-Zip;C:\Program Files\Microsoft\Web Platform Installer\;C:\Tools\NuGet;C:\Tools\PsTools;C:\Program Files\Git\usr\bin;C:\Program Files\Git LFS;C:\Program Files\Mercurial\;C:\Program Files (x86)\Subversion\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\150;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin;C:\Tools\xUnit;C:\Tools\xUnit20;C:\Tools\NUnit\bin;C:\Tools\NUnit3\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\Extensions\TestPlatform;C:\Ruby193\bin;C:\Tools\WebDriver;C:\Python27;C:\Python27\Scripts;C:\Program Files (x86)\nodejs\;C:\Program Files\nodejs;C:\Program Files (x86)\iojs;C:\Program Files\iojs;C:\Users\appveyor\AppData\Roaming\npm;C:\Program Files (x86)\Yarn\bin\;C:\go\bin;C:\Program Files\Java\jdk1.8.0\bin;C:\Program Files\erl10.7\bin;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\Tools\Binn\;C:\Program Files\Microsoft SQL Server\150\DTS\Binn\;C:\Program Files\Amazon\AWSCLI\;C:\Program Files (x86)\Google\Cloud SDK\google-cloud-sdk\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit\;C:\Program Files (x86)\Microsoft DirectX SDK;C:\Program Files\Microsoft Service Fabric\bin\Fabric\Fabric.Code;C:\Program Files\Microsoft SDKs\Service Fabric\Tools\ServiceFabricLocalClusterManager;C:\Program Files (x86)\Microsoft SQL Server\110\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\150\DTS\Binn\;C:\Tools\Doxygen;C:\Tools\Graphviz\bin;C:\Program Files\CMake\bin;C:\ProgramData\chocolatey\bin;C:\Program Files\LLVM\bin;C:\Tools\vcpkg;C:\Tools\Coverity\bin;C:\Program Files (x86)\NSIS;C:\Tools\Octopus;C:\Program Files\Meson\;C:\Program Files (x86)\Apache\Maven\bin;C:\Tools\GitVersion;C:\Users\appveyor\AppData\Local\Microsoft\WindowsApps;C:\Users\appveyor\.dotnet\tools;C:\Users\appveyor\AppData\Roaming\npm;C:\Users\appveyor\AppData\Local\Yarn\bin;C:\Program Files\AppVeyor\BuildAgent\;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\Llvm\x64\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\Ninja;C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\VC\Linux\bin\ConnectionManagerExe MALLOC_PERTURB_=21 C:\projects\rizin\build\test/unit\test_inflate_deflate.exe
87/89 bin_vfiles                     OK               0.05s
88/89 cpu_platform_profiles          OK               0.86s
89/89 open_analyse_save_load_project OK               1.90s
Ok:                 88  
Expected Fail:      0   
Fail:               1   
Unexpected Pass:    0   
Skipped:            0   
Timeout:            0   

Note the missing lines:


The output from the failed tests:

86/89 inflate_deflate                FAIL            0.03s   exit status 1
--- command ---
10:49:49 /home/runner/work/rizin/rizin/build/test/unit/test_inflate_deflate
--- stdout ---
test_rz_inflate ERR
[XX] Fail at line 31: Windows inflate OS bits: expected 11, got 3.

test_rz_deflate OK
test_rz_inflate_buf OK
test_rz_deflate_buf OK

-------
ret2libc commented 3 years ago

I'm not sure what we can do about this... It seems a meson/ninja problem at a first look.

XVilka commented 3 years ago

Ok, I opened an issue in Meson, lets see what happens: https://github.com/mesonbuild/meson/issues/9195

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. Considering a lot has probably changed since its creation, we kindly ask you to check again if the issue you reported is still relevant in the current version of rizin. If it is, update this issue with a comment, otherwise it will be automatically closed if no further activity occurs. Thank you for your contributions.

XVilka commented 2 years ago

Should be fixed by using meson test --print-errorlogs in Appveyor and GitHub CI Windows.