libcheck / check

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

[ALPINE] `make check` failing on fresh install of `0.15.0` - test names appear to be truncated... #286

Closed zfields closed 4 years ago

zfields commented 4 years ago

See the output and logs below to view examples of truncation.

Also, I've created a Dockerfile to capture the environment, so you can reproduce the issue, regardless of the machine you are working on. Not to mention, it list the packages I'm installing as dependencies, so you may be able to spot a missing dependency right away.

ARG CHECK_TAG="0.15.0"
ARG SIGNAL_TAG="v2.3.3"

FROM alpine:3.12.0

ARG CHECK_TAG
ARG SIGNAL_TAG

# Install basic dependencies
RUN ["ash", "-c", "\
    apk add --no-cache \
      cmake \
      g++ \
      git \
      make \
      musl-dev \
"]

# Install CHECK testing dependencies
RUN ["ash", "-c", "\
    apk add --no-cache \
      autoconf \
      automake \
      libtool \
      patchutils \
      pkgconf \
      texinfo \
"]

WORKDIR ~

RUN ["ash", "-c", "\
  git clone https://github.com/libcheck/check --branch ${CHECK_TAG} --recursive \
"]

RUN ["ash", "-c", "\
    cd check/ \
 && aclocal \
 && autoreconf -i \
 && ./configure \
 && make \
# && make check \
# && make install \
"]

RUN ["ash", "-c", "\
  git clone https://github.com/signalapp/libsignal-protocol-c --branch ${SIGNAL_TAG} --recursive \
"]

make check command line output:

FAIL: test/check_checkmk
============================================================================
Testsuite summary for Check 0.15.0
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See checkmk/test-suite.log
Please report to check-devel at lists dot sourceforge dot net
============================================================================
make[3]: *** [Makefile:647: test-suite.log] Error 1
make[3]: Leaving directory '/~/check/checkmk'
make[2]: *** [Makefile:755: check-TESTS] Error 2
make[2]: Leaving directory '/~/check/checkmk'
make[1]: *** [Makefile:831: check-am] Error 2
make[1]: Leaving directory '/~/check/checkmk'
make: *** [Makefile:567: check-recursive] Error 1

Contents of checkmk/test-suite.log:

# cat checkmk/test-suite.log
==========================================
   Check 0.15.0: checkmk/test-suite.log
==========================================

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: test/check_checkmk
========================

These are the tests for the checkmk program.

====================
   Test Run Start
====================

Running test empty_input...
Test empty_input passed.

Running test pass_thru...
Test pass_thru passed.

Running test single_test_line...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/single_test_line/output   Thu Jul 16 21:29:08 2020
***************
*** 6,12 ****
  #include <check.h>

  #line 1 "in"
! START_TEST(test_name)
  {
  #line 2
  }
--- 6,12 ----
  #include <check.h>

  #line 1 "in"
! START_TEST(est_name)
  {
  #line 2
  }
***************
*** 20,26 ****
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, test_name);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 20,26 ----
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, est_name);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test single_test_line FAILED.

Running test basic_complete...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/basic_complete/output Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 28,39 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 28,39 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test basic_complete FAILED.

Running test multiple_everything...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/multiple_everything/output    Thu Jul 16 21:29:08 2020
***************
*** 32,38 ****
  }
  END_TEST

! START_TEST(neverending_story)
  {
  #line 25
      const char msg[] = "Bastian Balthazar Bux\n";
--- 32,38 ----
  }
  END_TEST

! START_TEST(everending_story)
  {
  #line 25
      const char msg[] = "Bastian Balthazar Bux\n";
***************
*** 72,88 ****
  int main(void)
  {
      Suite *s1 = suite_create("A Suite");
!     TCase *tc1_1 = tcase_create("A Test Case");
!     TCase *tc1_2 = tcase_create("Another Test Case");
      Suite *s2 = suite_create("Another Suite");
!     TCase *tc2_1 = tcase_create("A Test Case for Another Suite");
!     TCase *tc2_2 = tcase_create("A Basket Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
      tcase_add_test(tc1_1, hello_world);
!     tcase_add_test(tc1_1, neverending_story);
      suite_add_tcase(s1, tc1_2);
      tcase_add_test(tc1_2, math_problem);
      suite_add_tcase(s2, tc2_1);
--- 72,88 ----
  int main(void)
  {
      Suite *s1 = suite_create("A Suite");
!     TCase *tc1_1 = tcase_create("ase A Test Case");
!     TCase *tc1_2 = tcase_create("ase Another Test Case");
      Suite *s2 = suite_create("Another Suite");
!     TCase *tc2_1 = tcase_create("ase A Test Case for Another Suite");
!     TCase *tc2_2 = tcase_create("ase A Basket Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
      tcase_add_test(tc1_1, hello_world);
!     tcase_add_test(tc1_1, everending_story);
      suite_add_tcase(s1, tc1_2);
      tcase_add_test(tc1_2, math_problem);
      suite_add_tcase(s2, tc2_1);
Test multiple_everything FAILED.

Running test between_the_lines...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/between_the_lines/output  Thu Jul 16 21:29:08 2020
***************
*** 26,32 ****
  int main(void)
  {
      Suite *s1 = suite_create("A");
!     TCase *tc1_1 = tcase_create("B");
      SRunner *sr = srunner_create(s1);
      int nf;

--- 26,32 ----
  int main(void)
  {
      Suite *s1 = suite_create("A");
!     TCase *tc1_1 = tcase_create("ase B");
      SRunner *sr = srunner_create(s1);
      int nf;

Test between_the_lines FAILED.

Running test repeated_suites...
Unexpected error differences:
*** x_err   Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/repeated_suites/err   Thu Jul 16 21:29:08 2020
***************
*** 1 ****
! checkmk: in line 10: Suite "Halibut" already exists.
--- 1 ----
! checkmk: in line 10: Suite "Halibu" already exists.
Test repeated_suites FAILED.

Running test repeated_tcases...
Unexpected error differences:
*** x_err   Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/repeated_tcases/err   Thu Jul 16 21:29:08 2020
***************
*** 1 ****
! checkmk: in line 12: Test Case "Chopin" already exists.
--- 1 ----
! checkmk: in line 12: Test Case "ase Chopi" already exists.
Test repeated_tcases FAILED.

Running test repeated_tests...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/repeated_tests/output Thu Jul 16 21:29:08 2020
***************
*** 10,16 ****

! START_TEST(repeat)
  {
  #line 8
      fail_if(MISERABLY);
--- 10,16 ----

! START_TEST(epea)
  {
  #line 8
      fail_if(MISERABLY);
Unexpected error differences:
*** x_err   Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/repeated_tests/err    Thu Jul 16 21:29:08 2020
***************
*** 1 ****
! checkmk: in line 14: Test "repeat" already exists.
--- 1 ----
! checkmk: in line 14: Test "epea" already exists.
Test repeated_tests FAILED.

Running test not_really_repeated...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/not_really_repeated/output    Thu Jul 16 21:29:08 2020
***************
*** 38,46 ****
  int main(void)
  {
      Suite *s1 = suite_create("Baz");
!     TCase *tc1_1 = tcase_create("Quux");
      Suite *s2 = suite_create("Foo");
!     TCase *tc2_1 = tcase_create("Bar");
      SRunner *sr = srunner_create(s1);
      int nf;

--- 38,46 ----
  int main(void)
  {
      Suite *s1 = suite_create("Baz");
!     TCase *tc1_1 = tcase_create("ase Quux");
      Suite *s2 = suite_create("Foo");
!     TCase *tc2_1 = tcase_create("ase Ba");
      SRunner *sr = srunner_create(s1);
      int nf;

Test not_really_repeated FAILED.

Running test tcase_implied_repeat...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/tcase_implied_repeat/output   Thu Jul 16 21:29:08 2020
***************
*** 23,25 ****
--- 23,55 ----
     but the suite name implies a tcase name of the same value until we
     override it. */

+ START_TEST(uh_oh)
+ {
+ #line 17
+     /* Uh-oh! Now we're using the implied tcase Luck, which already
+      * exists! */
+ }
+ END_TEST
+ 
+ int main(void)
+ {
+     Suite *s1 = suite_create("Lady");
+     TCase *tc1_1 = tcase_create("ase Luck");
+     Suite *s2 = suite_create("Luck");
+     TCase *tc2_1 = tcase_create("Luck");
+     SRunner *sr = srunner_create(s1);
+     int nf;
+ 
+     suite_add_tcase(s1, tc1_1);
+     tcase_add_test(tc1_1, song);
+     suite_add_tcase(s2, tc2_1);
+     tcase_add_test(tc2_1, uh_oh);
+ 
+     srunner_add_suite(sr, s2);
+ 
+     srunner_run_all(sr, CK_ENV);
+     nf = srunner_ntests_failed(sr);
+     srunner_free(sr);
+ 
+     return nf == 0 ? 0 : 1;
+ }
Unexpected error differences:
*** x_err   Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/tcase_implied_repeat/err  Thu Jul 16 21:29:08 2020
***************
*** 1 ****
- checkmk: in line 16: Test Case "Luck" already exists.
--- 0 ----
Expected exit status of 1, but got 0.
Test tcase_implied_repeat FAILED.

Running test case_insensitive_pp...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/case_insensitive_pp/output    Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 28,39 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 28,39 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("aSe The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test case_insensitive_pp FAILED.

Running test trailing_ws...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/trailing_ws/output    Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 28,39 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 28,39 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case    ");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test trailing_ws FAILED.

Running test non_word_chars...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/non_word_chars/output Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 28,39 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite (of Test Cases/\\TCases)");
!     TCase *tc1_1 = tcase_create("The \"Test Case\"");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 28,39 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite (of Test Cases/\\TCases)");
!     TCase *tc1_1 = tcase_create("ase The \"Test Case\"");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test non_word_chars FAILED.

Running test test_chars...
Unexpected error differences:
*** x_err   Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/test_chars/err    Thu Jul 16 21:29:08 2020
***************
*** 1 ****
! checkmk: in line 7: Malformed test name "test@me" (must be a C identifier).
--- 1 ----
! checkmk: in line 7: Malformed test name "est@me" (must be a C identifier).
Test test_chars FAILED.

Running test num_start_test_name...
Test num_start_test_name passed.

Running test no_args...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/no_args/output    Thu Jul 16 21:29:08 2020
***************
*** 11,17 ****

! START_TEST(the_test)
  {
      int nc;
      const char msg[] = "\n\n    Hello, world!\n";
--- 11,17 ----

! START_TEST(he_tes)
  {
      int nc;
      const char msg[] = "\n\n    Hello, world!\n";
***************
*** 27,33 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

--- 27,33 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

***************
*** 36,42 ****

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 36,42 ----

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test no_args FAILED.

Running test clean_mode...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/clean_mode/output Thu Jul 16 21:29:08 2020
***************
*** 11,17 ****

! START_TEST(the_test)
  {
      int nc;
      const char msg[] = "\n\n    Hello, world!\n";
--- 11,17 ----

! START_TEST(he_tes)
  {
      int nc;
      const char msg[] = "\n\n    Hello, world!\n";
***************
*** 26,37 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 26,37 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test clean_mode FAILED.

Running test declarations...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/declarations/output   Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 29,35 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

--- 29,35 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

***************
*** 38,44 ****
      int declare_me = 0;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 38,44 ----
      int declare_me = 0;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test declarations FAILED.

Running test test_after_main_pre...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/test_after_main_pre/output    Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 29,35 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

--- 29,35 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

Test test_after_main_pre FAILED.

Running test main_pre_multiple...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/main_pre_multiple/output  Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 29,35 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

--- 29,35 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

Test main_pre_multiple FAILED.

Running test main_post...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/main_post/output  Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 29,40 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 29,40 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test main_post FAILED.

Running test main_pre_after_post...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/main_pre_after_post/output    Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 29,40 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 29,40 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test main_pre_after_post FAILED.

Running test test_after_main_post...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/test_after_main_post/output   Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 29,40 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 29,40 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test test_after_main_post FAILED.

Running test main_post_multiple...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/main_post_multiple/output Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_tes)
  {
  #line 10
      int nc;
***************
*** 29,40 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 29,40 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test main_post_multiple FAILED.

Running test ucn...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/ucn/output    Thu Jul 16 21:29:08 2020
***************
*** 12,18 ****

! START_TEST(the_\u4ECA\u65E5\u306F_test)
  {
  #line 10
      int nc;
--- 12,18 ----

! START_TEST(he_\u4ECA\u65E5\u306F_tes)
  {
  #line 10
      int nc;
***************
*** 28,39 ****
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, the_\u4ECA\u65E5\u306F_test);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 28,39 ----
  int main(void)
  {
      Suite *s1 = suite_create("The Suite");
!     TCase *tc1_1 = tcase_create("ase The Test Case");
      SRunner *sr = srunner_create(s1);
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_test(tc1_1, he_\u4ECA\u65E5\u306F_tes);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test ucn FAILED.

Running test invalid_ucn...
Unexpected error differences:
*** x_err   Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/invalid_ucn/err   Thu Jul 16 21:29:08 2020
***************
*** 1 ****
! checkmk: in line 9: Malformed test name "the_\u4ECA\u65E5\u306_test" (must be a C identifier).
--- 1 ----
! checkmk: in line 9: Malformed test name "he_\u4ECA\u65E5\u306_tes" (must be a C identifier).
Test invalid_ucn FAILED.

Running test argument_ws...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/argument_ws/output    Thu Jul 16 21:29:09 2020
***************
*** 6,291 ****
  #include <check.h>

  #line 1 "in"
! START_TEST(test1)
  {
  #line 2
    ck_assert(0 == 0);
  }
  END_TEST

! START_TEST(test2)
  {
  #line 4
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test3)
! {
! #line 6
    ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test4)
! {
! #line 8
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test5)
! {
! #line 10
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test6)
! {
! #line 12
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test7)
! {
! #line 14
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test8)
! {
! #line 16
        ck_assert(1 == 0);

  }
  END_TEST

! START_TEST(test9)
  {
  #line 19
    ck_assert(0 == 0);
  }
  END_TEST

! START_TEST(test10)
  {
  #line 21
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test11)
! {
! #line 23
    ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test12)
! {
! #line 25
        ck_assert(1 == 2);
! }
! END_TEST
! 
! START_TEST(test13)
! {
! #line 27
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test14)
! {
! #line 29
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test15)
! {
! #line 31
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test16)
! {
! #line 33
        ck_assert(1 == 0);

  }
  END_TEST

! START_TEST(test17)
  {
  #line 36
    ck_assert(0 == 0);
  }
  END_TEST

! START_TEST(test18)
  {
  #line 38
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test19)
! {
! #line 40
    ck_assert(1 == 1);
! }
! END_TEST
! 
! START_TEST(test20)
! {
! #line 42
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test21)
! {
! #line 44
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test22)
! {
! #line 46
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test23)
! {
! #line 48
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test24)
! {
! #line 50
        ck_assert(1 == 1);

  }
  END_TEST

! START_TEST(test25)
  {
  #line 53
    ck_assert(0 == 1);
  }
  END_TEST

! START_TEST(test26)
  {
  #line 55
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test27)
! {
! #line 57
    ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test28)
! {
! #line 59
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test29)
! {
! #line 61
        ck_assert(1 == 1);
! }
! END_TEST
! 
! START_TEST(test30)
! {
! #line 63
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test31)
! {
! #line 65
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test32)
! {
! #line 67
        ck_assert(1 == 0);

  }
  END_TEST

! START_TEST(test33)
  {
  #line 70
    ck_assert(0 == 0);
  }
  END_TEST

! START_TEST(test34)
  {
  #line 72
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test35)
! {
! #line 74
    ck_assert(1 == 1);
! }
! END_TEST
! 
! START_TEST(test36)
! {
! #line 76
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test37)
! {
! #line 78
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test38)
! {
! #line 80
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test39)
! {
! #line 82
        ck_assert(1 == 0);
! }
! END_TEST
! 
! START_TEST(test40)
! {
! #line 84
        ck_assert(1 == 1);
  }
  END_TEST
--- 6,141 ----
  #include <check.h>

  #line 1 "in"
! START_TEST(est1)
  {
  #line 2
    ck_assert(0 == 0);
  }
  END_TEST

! START_TEST(est2)
  {
  #line 4
        ck_assert(1 == 0);
!   #test-exit ( 0)     test3
    ck_assert(1 == 0);
!         #test-exit ( +0 )       test4
        ck_assert(1 == 0);
!           #test-exit (    -1 )      test5
        ck_assert(1 == 0);
!             #test-exit   (    -  1 )        test6
        ck_assert(1 == 0);
!             #test-exit    (-    0     )     test7
        ck_assert(1 == 0);
!             #test-exit      (  + 1      )       test8
        ck_assert(1 == 0);

  }
  END_TEST

! START_TEST(est9)
  {
  #line 19
    ck_assert(0 == 0);
  }
  END_TEST

! START_TEST(est10)
  {
  #line 21
        ck_assert(1 == 0);
!   #test-signal ( 0)   test11
    ck_assert(1 == 0);
!         #test-signal ( +0 )     test12
        ck_assert(1 == 2);
!           #test-signal (  -1 )      test13
        ck_assert(1 == 0);
!             #test-signal   (  -  1 )        test14
        ck_assert(1 == 0);
!             #test-signal      (-    0     )     test15
        ck_assert(1 == 0);
!             #test-signal    (  + 1      )       test16
        ck_assert(1 == 0);

  }
  END_TEST

! START_TEST(est17)
  {
  #line 36
    ck_assert(0 == 0);
  }
  END_TEST

! START_TEST(est18)
  {
  #line 38
        ck_assert(1 == 0);
!   #test-loop ( 0  ,  1)   test19
    ck_assert(1 == 1);
!         #test-loop ( +0  ,  -2)     test20
        ck_assert(1 == 0);
!           #test-loop (    -1  ,+  3)        test21
        ck_assert(1 == 0);
!             #test-loop   (    -  1,   +  2 )        test22
        ck_assert(1 == 0);
!             #test-loop    (-    0     ,     -  2)       test23
        ck_assert(1 == 0);
!             #test-loop      (  + 1      ,     -   3     )       test24
        ck_assert(1 == 1);

  }
  END_TEST

! START_TEST(est25)
  {
  #line 53
    ck_assert(0 == 1);
  }
  END_TEST

! START_TEST(est26)
  {
  #line 55
        ck_assert(1 == 0);
!   #test-loop-exit ( 2  ,0  ,  1)      test27
    ck_assert(1 == 0);
!         #test-loop-exit ( -1  , +0  ,  -2)      test28
        ck_assert(1 == 0);
!           #test-loop-exit (  -  3  ,  -1  ,+  3)        test29
        ck_assert(1 == 1);
!             #test-loop-exit   (   +  0,   -  1,   +  2 )        test30
        ck_assert(1 == 0);
!             #test-loop-exit   (- 4    ,-    0     ,     -  2)       test31
        ck_assert(1 == 0);
!             #test-loop-exit     (  +2  ,  +   1     ,     -   3     )       test32
        ck_assert(1 == 0);

  }
  END_TEST

! START_TEST(est33)
  {
  #line 70
    ck_assert(0 == 0);
  }
  END_TEST

! START_TEST(est34)
  {
  #line 72
        ck_assert(1 == 0);
!   #test-loop-signal ( 2  ,0  ,  1)    test35
    ck_assert(1 == 1);
!         #test-loop-signal (   -1  , +0  ,  -2)      test36
        ck_assert(1 == 0);
!           #test-loop-signal (  -  3    ,  -1  ,+  3)        test37
        ck_assert(1 == 0);
!             #test-loop-signal   ( +  0,   -  1,   +  2 )        test38
        ck_assert(1 == 0);
!             #test-loop-signal     (- 4    ,-    0     ,     -  2)       test39
        ck_assert(1 == 0);
!             #test-loop-signal       (  +2  ,  +   1     ,     -   3     )       test40
        ck_assert(1 == 1);
  }
  END_TEST
***************
*** 298,343 ****
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_exit_test(tc1_1, test1, 0);
!     tcase_add_exit_test(tc1_1, test2, 1);
!     tcase_add_exit_test(tc1_1, test3, 0);
!     tcase_add_exit_test(tc1_1, test4, +0);
!     tcase_add_exit_test(tc1_1, test5, -1);
!     tcase_add_exit_test(tc1_1, test6, -1);
!     tcase_add_exit_test(tc1_1, test7, -0);
!     tcase_add_exit_test(tc1_1, test8, +1);
!     tcase_add_test_raise_signal(tc1_1, test9, 0);
!     tcase_add_test_raise_signal(tc1_1, test10, 1);
!     tcase_add_test_raise_signal(tc1_1, test11, 0);
!     tcase_add_test_raise_signal(tc1_1, test12, +0);
!     tcase_add_test_raise_signal(tc1_1, test13, -1);
!     tcase_add_test_raise_signal(tc1_1, test14, -1);
!     tcase_add_test_raise_signal(tc1_1, test15, -0);
!     tcase_add_test_raise_signal(tc1_1, test16, +1);
!     tcase_add_loop_test(tc1_1, test17, 0, 2);
!     tcase_add_loop_test(tc1_1, test18, 1, 0);
!     tcase_add_loop_test(tc1_1, test19, 0, 1);
!     tcase_add_loop_test(tc1_1, test20, +0, -2);
!     tcase_add_loop_test(tc1_1, test21, -1, +3);
!     tcase_add_loop_test(tc1_1, test22, -1, +2);
!     tcase_add_loop_test(tc1_1, test23, -0, -2);
!     tcase_add_loop_test(tc1_1, test24, +1, -3);
!     tcase_add_loop_exit_test(tc1_1, test25, 1, 0, 2);
!     tcase_add_loop_exit_test(tc1_1, test26, 2, 1, 0);
!     tcase_add_loop_exit_test(tc1_1, test27, 2, 0, 1);
!     tcase_add_loop_exit_test(tc1_1, test28, -1, +0, -2);
!     tcase_add_loop_exit_test(tc1_1, test29, -3, -1, +3);
!     tcase_add_loop_exit_test(tc1_1, test30, +0, -1, +2);
!     tcase_add_loop_exit_test(tc1_1, test31, -4, -0, -2);
!     tcase_add_loop_exit_test(tc1_1, test32, +2, +1, -3);
!     tcase_add_loop_test_raise_signal(tc1_1, test33, 1, 0, 2);
!     tcase_add_loop_test_raise_signal(tc1_1, test34, 2, 1, 0);
!     tcase_add_loop_test_raise_signal(tc1_1, test35, 2, 0, 1);
!     tcase_add_loop_test_raise_signal(tc1_1, test36, -1, +0, -2);
!     tcase_add_loop_test_raise_signal(tc1_1, test37, -3, -1, +3);
!     tcase_add_loop_test_raise_signal(tc1_1, test38, +0, -1, +2);
!     tcase_add_loop_test_raise_signal(tc1_1, test39, -4, -0, -2);
!     tcase_add_loop_test_raise_signal(tc1_1, test40, +2, +1, -3);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
--- 148,163 ----
      int nf;

      suite_add_tcase(s1, tc1_1);
!     tcase_add_exit_test(tc1_1, est1, 0);
!     tcase_add_exit_test(tc1_1, est2, 1);
!     tcase_add_test_raise_signal(tc1_1, est9, 0);
!     tcase_add_test_raise_signal(tc1_1, est10, 1);
!     tcase_add_loop_test(tc1_1, est17, 0, 2);
!     tcase_add_loop_test(tc1_1, est18, 1, 0);
!     tcase_add_loop_exit_test(tc1_1, est25, 1, 0, 2);
!     tcase_add_loop_exit_test(tc1_1, est26, 2, 1, 0);
!     tcase_add_loop_test_raise_signal(tc1_1, est33, 1, 0, 2);
!     tcase_add_loop_test_raise_signal(tc1_1, est34, 2, 1, 0);

      srunner_run_all(sr, CK_ENV);
      nf = srunner_ntests_failed(sr);
Test argument_ws FAILED.

Running test repeated_argument_tests...
Unexpected output differences:
*** x_output    Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/repeated_argument_tests/output    Thu Jul 16 21:29:09 2020
***************
*** 8,21 ****
  #line 1 "in"
  /* Fail when tests with identical name are detected */

! START_TEST(test1)
  {
  #line 4
    ck_assert(1 == 1);
  }
  END_TEST

! START_TEST(test2)
  {
  #line 6
    ck_assert(1 == 1);
--- 8,21 ----
  #line 1 "in"
  /* Fail when tests with identical name are detected */

! START_TEST(est1)
  {
  #line 4
    ck_assert(1 == 1);
  }
  END_TEST

! START_TEST(est2)
  {
  #line 6
    ck_assert(1 == 1);
Unexpected error differences:
*** x_err   Thu Jul 16 21:22:47 2020
--- /~/check/checkmk/test.out/repeated_argument_tests/err   Thu Jul 16 21:29:09 2020
***************
*** 1 ****
! checkmk: in line 9: Test "test2" already exists.
--- 1 ----
! checkmk: in line 9: Test "est2" already exists.
Test repeated_argument_tests FAILED.

====================
 Test Run Complete
====================
Total:  29
Passed: 3
Failed: 26

****************************************
          TEST RUN FAILED!!!!
****************************************
FAIL test/check_checkmk (exit status: 1)
zfields commented 4 years ago

After changing the base of the image to debian from alpine, make check executed correctly. This appears to be a portability problem between the OS's.

brarcher commented 4 years ago

Thanks for the update.

I'm not familiar with Alpine. I see from their website that they use busybox. Maybe the behavior of busybox's awk is different in a few cases, which is what checkmk uses. I see here some mentions of behavior differences.

zfields commented 4 years ago

Thanks for the pointer to awk. If I get some time, I'll play around with installing a different utility to see if it will use it instead and yield better results.

zfields commented 4 years ago

You were right on the money! I installed gawk and all tests passed!

For others who find this, the answer is...

apk add gawk