libcheck / check

A unit testing framework for C
GNU Lesser General Public License v2.1
1.07k stars 209 forks source link

Check Installation on Windows 64 Bit #342

Open Jorge-spicymexican opened 2 years ago

Jorge-spicymexican commented 2 years ago

Bug Report

Check library version- 0.15.2 Configurations: Cygwin Setup version 2.919 (64 Bit) Link for Setup Executable: cygwin link Compiler being used: GCC g++ Operating System: Windows 10 Pro Version 10.0.19044 Build 19044

Trying to follow Readme MD instructions for installing and getting started with Check.

Installed check via the Cygwin Installer Setup Manager and using Cygwin verified that the following dependencies were installed. This is the output of the drive terminal for my dependancies

automake --version : automake (GNU automake) 1.16.5

autoconf --version: autoconf (GNU Autoconf) 2.71

libtool --version: libtool (GNU libtool) 2.4.7

pkg--config --version: 1.8.0

texinfo --version: command not found

POSIX [sed --Version] : sed (GNU sed) 4.8 packaged by Cygwin 4.8-1

Commands following where set my check-master/ReadME.md

autoconf

$ autoreconf --install
$ ./configure
$ make
$ make check
$ make install
$ sudo ldconfig

Issue occurred during command make check Output:

=================================================================== Testsuite summary for Check 0.15.2

TOTAL: 9

PASS: 8

SKIP: 0

XFAIL: 0

FAIL: 1

XPASS: 0

ERROR: 0

=================================================================== See tests/test-suite.log Please report to check-devel at lists dot sourceforge dot net

Test-suit.log file output: test-suite.log

Orange23333 commented 1 year ago

Same problem at make check step, but using msys on Windows10. I found lines of diff: command not found. So, it requires diff program. And you could check this, too. In my environment, I can install it with:

pacman -Sy
pacman -Syu
pacman -Ss diff
pacman -S msys/diffutils

But when I retry, the test program have some new fatal. Now, I'm finding out what happened again. make_check_log.txt

Orange23333 commented 1 year ago

Obviously, many tests-product errors and failures are expected. After compare twice make check output and tests source files to filter out those unexpect failures and errors (begin with +): some lines in one loop just remain unexpect message lines with {begin and end} or {near lines}.

Twice make check same parts:

Running suite(s):100%: Checks: 0, Failures: 0, Errors: 0
check.c:584: Bad status in set_fork_status
 Check Servant2
18%: Checks: 258, Failures: 166, Errors: 44
 check_check_sub.c:2517:E:Signal Tests:test_segv:0: (after this point) Received signal 11 (Segmentation fault)
+check_check_sub.c:2506:E:Signal Tests:test_segv_pass:0: (after this point) Test timeout expired, expected signal 11 (Segmentation fault)
 check_check_sub.c:2517:E:Signal Tests:test_segv:0: (after this point) Test timeout expired, expected signal 8 (Floating point exception)

Running suite(s):100%: Checks: 0, Failures: 0, Errors: 0
98%: Checks: 906, Failures: 7, Errors: 4
+check_check_master.c:426:F:Core Tests:test_check_nfailures:0: Unexpected number of failures received, 210, expected 209.
 check_check_master.c:434:P:Core Tests:test_check_ntests_run:0: Passed
+check_check_master.c:509:F:Core Tests:test_check_failure_msgs:0: For test 176:Signal Tests:test_segv Expected 'Received signal 11 (Segmentation fault), expected 8 (Floating point exception)', got 'Test timeout expired, expected signal 11 (Segmentation fault)'
+check_check_master.c:575:F:Core Tests:test_check_failure_ftypes:0: Failure type wrong for test 177:Signal Tests:test_non_signal_8
+check_check_master.c:548:F:Core Tests:test_check_failure_lnos:0: For test 176 (failure 158): Expected lno 2517, got 2506 for suite Signal Tests, msg Test timeout expired, expected signal 11 (Segmentation fault)
check_check_master.c:589:P:Core Tests:test_check_failure_lfiles:0: Passed
check_check_master.c:608:P:Core Tests:test_check_test_names:0: Passed
 check_check_master.c:631:P:Core Tests:test_check_all_msgs:0: Passed
+check_check_master.c:683:F:Core Tests:test_check_all_msgs:175: For test 175:Signal Tests:test_segv_pass expected 'Passed', got 'Test timeout expired, expected signal 11 (Segmentation fault)'
+check_check_master.c:683:F:Core Tests:test_check_all_msgs:176: For test 176:Signal Tests:test_segv expected 'Received signal 11 (Segmentation fault), expected 8 (Floating point exception)', got 'Test timeout expired, expected signal 8 (Floating point exception)'
 check_check_master.c:631:P:Core Tests:test_check_all_msgs:257: Passed
 check_check_master.c:692:P:Core Tests:test_check_all_ftypes:0: Passed
+check_check_master.c:692:F:Core Tests:test_check_all_ftypes:175: For test 175:Signal Tests:test_segv_pass failure type wrong, expected 1 but got 3
 check_check_master.c:692:P:Core Tests:test_check_all_ftypes:257: Passed

Twice make check different part:

Running suite(s):100%: Checks: 0, Failures: 0, Errors: 0
99%: Checks: 906, Failures: 7, Errors: 1
 check_check_exit.c:59:P:Core:loop_early_exit_signal_segv:0: Passed
+check_check_exit.c:59:E:Core:loop_early_exit_signal_segv:3: (after this point) Test timeout expired, expected signal 11 (Segmentation fault)
 check_check_exit.c:59:P:Core:loop_early_exit_signal_segv:4: Passed
Running suite(s):100%: Checks: 0, Failures: 0, Errors: 0
98%: Checks: 906, Failures: 7, Errors: 4
 check_check_exit.c:59:P:Core:loop_early_exit_signal_segv:0: Passed
+check_check_exit.c:59:E:Core:loop_early_exit_signal_segv:1: (after this point) Test timeout expired, expected signal 11 (Segmentation fault)
+check_check_exit.c:59:E:Core:loop_early_exit_signal_segv:2: (after this point) Test timeout expired, expected signal 11 (Segmentation fault)
+check_check_exit.c:59:E:Core:loop_early_exit_signal_segv:3: (after this point) Test timeout expired, expected signal 11 (Segmentation fault)
+check_check_exit.c:59:E:Core:loop_early_exit_signal_segv:4: (after this point) Test timeout expired, expected signal 11 (Segmentation fault)
Orange23333 commented 1 year ago

However, I could only choose to ignore those 2 make check fatals. make check was fully passed on linux, so I can use it on Linux, if I have no necessary to test on Windows. In fact, signal mechanism is unusual using on Windows, we can use other hook to catch those signal. So I can probably ignore this make check result, and use libcheck as normal.