check_check_fixture.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658
  1. /*
  2. * Check: a unit test framework for C
  3. * Copyright (C) 2001, 2002 Arien Malec
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Lesser General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2.1 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public
  16. * License along with this library; if not, write to the
  17. * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  18. * MA 02110-1301, USA.
  19. */
  20. #include "../lib/libcompat.h"
  21. #include <stdlib.h>
  22. #include <signal.h>
  23. #include <stdio.h>
  24. #include <string.h>
  25. #include <check.h>
  26. #include "check_error.h"
  27. #include "check_str.h"
  28. #include "check_check.h"
  29. static char errm[200];
  30. static void fixture_sub_setup (void)
  31. {
  32. ck_abort_msg("Test failure in fixture");
  33. }
  34. static SRunner *fixture_sr;
  35. void setup_fixture (void)
  36. {
  37. TCase *tc;
  38. Suite *fixture_s;
  39. fixture_s = suite_create("Fix Sub");
  40. tc = tcase_create("Fix Sub");
  41. tcase_add_unchecked_fixture(tc, fixture_sub_setup, NULL);
  42. suite_add_tcase (fixture_s, tc);
  43. fixture_sr = srunner_create(fixture_s);
  44. srunner_run_all(fixture_sr,CK_VERBOSE);
  45. }
  46. void teardown_fixture (void)
  47. {
  48. srunner_free(fixture_sr);
  49. }
  50. START_TEST(test_fixture_fail_counts)
  51. {
  52. int nrun, nfail;
  53. nrun = srunner_ntests_run(fixture_sr);
  54. nfail = srunner_ntests_failed(fixture_sr);
  55. ck_assert_msg (nrun == 1 && nfail == 1,
  56. "Counts for run and fail for fixture failure not correct");
  57. }
  58. END_TEST
  59. START_TEST(test_print_counts)
  60. {
  61. char *srstat = sr_stat_str(fixture_sr);
  62. const char *exp = "0%: Checks: 1, Failures: 1, Errors: 0";
  63. ck_assert_msg(strcmp(srstat, exp) == 0,
  64. "SRunner stat string incorrect with setup failure");
  65. free(srstat);
  66. }
  67. END_TEST
  68. START_TEST(test_setup_failure_msg)
  69. {
  70. TestResult **tra;
  71. char *trm;
  72. const char *trmexp = "check_check_fixture.c:36:S:Fix Sub:unchecked_setup:0: Test failure in fixture";
  73. tra = srunner_failures(fixture_sr);
  74. trm = tr_str(tra[0]);
  75. free(tra);
  76. if (strstr(trm, trmexp) == 0) {
  77. snprintf(errm, sizeof(errm),
  78. "Bad setup tr msg (%s)", trm);
  79. ck_abort_msg("%s", errm);
  80. }
  81. free(trm);
  82. }
  83. END_TEST
  84. #if defined(HAVE_FORK) && HAVE_FORK==1
  85. int testval_up;
  86. int testval_down;
  87. static void sub_ch_setup_norm (void)
  88. {
  89. testval_up += 2;
  90. }
  91. static void sub_ch_teardown_norm(void)
  92. {
  93. testval_down += 2;
  94. }
  95. START_TEST(test_sub_ch_setup_norm)
  96. {
  97. if (testval_up == 1)
  98. ck_abort_msg("Setup not run correctly");
  99. else if (testval_up > 3)
  100. ck_abort_msg("Test side-effects persist across runs");
  101. testval_up++;
  102. }
  103. END_TEST
  104. START_TEST(test_ch_setup)
  105. {
  106. TCase *tc;
  107. Suite *s;
  108. SRunner *sr;
  109. s = suite_create("Fixture Norm Sub");
  110. tc = tcase_create("Fixture Norm Sub");
  111. sr = srunner_create(s);
  112. suite_add_tcase(s, tc);
  113. tcase_add_test(tc,test_sub_ch_setup_norm);
  114. tcase_add_test(tc,test_sub_ch_setup_norm);
  115. tcase_add_checked_fixture(tc,sub_ch_setup_norm,sub_ch_teardown_norm);
  116. srunner_run_all(sr, CK_VERBOSE);
  117. ck_assert_msg(srunner_ntests_failed(sr) == 0,
  118. "Checked setup not being run correctly");
  119. srunner_free(sr);
  120. }
  121. END_TEST
  122. static void setup_sub_fail (void)
  123. {
  124. ck_abort_msg("Failed setup"); /* check_check_fixture.c:130 */
  125. }
  126. static void teardown_sub_fail (void)
  127. {
  128. ck_abort_msg("Failed teardown");
  129. }
  130. static void setup_sub_signal (void)
  131. {
  132. mark_point();
  133. raise(SIGFPE);
  134. }
  135. static void teardown_sub_signal(void)
  136. {
  137. mark_point();
  138. raise(SIGFPE);
  139. }
  140. START_TEST(test_sub_fail)
  141. {
  142. ck_abort_msg("Should never run");
  143. }
  144. END_TEST
  145. START_TEST(test_sub_pass)
  146. {
  147. ck_assert_msg(1 == 1, "Always pass");
  148. }
  149. END_TEST
  150. START_TEST(test_ch_setup_fail)
  151. {
  152. TCase *tc;
  153. Suite *s;
  154. SRunner *sr;
  155. TestResult ** tr;
  156. char *strstat;
  157. char *trm;
  158. s = suite_create("Setup Fail");
  159. tc = tcase_create("Setup Fail");
  160. suite_add_tcase(s, tc);
  161. tcase_add_test(tc,test_sub_fail);
  162. tcase_add_checked_fixture(tc,setup_sub_fail, NULL);
  163. sr = srunner_create(s);
  164. srunner_run_all(sr,CK_VERBOSE);
  165. ck_assert_msg (srunner_ntests_run(sr) == 1,
  166. "Test run counts not correct for checked setup failure");
  167. ck_assert_msg (srunner_ntests_failed(sr) == 1,
  168. "Failure counts not correct for checked setup failure");
  169. strstat= sr_stat_str(sr);
  170. ck_assert_msg(strcmp(strstat,
  171. "0%: Checks: 1, Failures: 1, Errors: 0") == 0,
  172. "SRunner stat string incorrect with checked setup failure");
  173. free(strstat);
  174. tr = srunner_failures(sr);
  175. trm = tr_str(tr[0]);
  176. /* Search for check_check_fixture.c:150 if this fails. */
  177. if (strstr(trm,
  178. "check_check_fixture.c:150:S:Setup Fail:test_sub_fail:0: Failed setup")
  179. == 0) {
  180. snprintf(errm, sizeof(errm),
  181. "Bad failed checked setup tr msg (%s)", trm);
  182. ck_abort_msg("%s", errm);
  183. }
  184. free(trm);
  185. free(tr);
  186. }
  187. END_TEST
  188. START_TEST(test_ch_setup_fail_nofork)
  189. {
  190. TCase *tc;
  191. Suite *s;
  192. SRunner *sr;
  193. s = suite_create("Setup Fail Nofork");
  194. tc = tcase_create("Setup Fail Nofork");
  195. suite_add_tcase(s, tc);
  196. tcase_add_test(tc, test_sub_fail);
  197. tcase_add_checked_fixture(tc, setup_sub_fail, NULL);
  198. sr = srunner_create(s);
  199. srunner_set_fork_status(sr, CK_NOFORK);
  200. srunner_run_all(sr, CK_VERBOSE);
  201. ck_assert_msg (srunner_ntests_run(sr) == 1,
  202. "Test run counts not correct for checked setup failure");
  203. ck_assert_msg (srunner_ntests_failed(sr) == 1,
  204. "Failure counts not correct for checked setup failure");
  205. srunner_free(sr);
  206. }
  207. END_TEST
  208. START_TEST(test_ch_setup_fail_nofork_2)
  209. {
  210. TCase *tc;
  211. Suite *s;
  212. SRunner *sr;
  213. s = suite_create("Setup Fail Nofork 2");
  214. tc = tcase_create("Setup Fail Nofork 2");
  215. suite_add_tcase(s, tc);
  216. tcase_add_test(tc, test_sub_fail);
  217. tcase_add_checked_fixture(tc, sub_ch_setup_norm, NULL);
  218. tcase_add_checked_fixture(tc, setup_sub_fail, NULL);
  219. sr = srunner_create(s);
  220. srunner_set_fork_status(sr, CK_NOFORK);
  221. srunner_run_all(sr, CK_VERBOSE);
  222. ck_assert_msg (srunner_ntests_run(sr) == 1,
  223. "Test run counts not correct for checked setup failure");
  224. ck_assert_msg (srunner_ntests_failed(sr) == 1,
  225. "Failure counts not correct for checked setup failure");
  226. srunner_free(sr);
  227. }
  228. END_TEST
  229. START_TEST(test_ch_setup_pass_nofork)
  230. {
  231. TCase *tc;
  232. Suite *s;
  233. SRunner *sr;
  234. s = suite_create("Setup Pass Multiple fixtures");
  235. tc = tcase_create("Setup Pass Multiple fixtures");
  236. suite_add_tcase(s, tc);
  237. tcase_add_test(tc, test_sub_pass);
  238. tcase_add_checked_fixture(tc, sub_ch_setup_norm, sub_ch_teardown_norm);
  239. tcase_add_checked_fixture(tc, sub_ch_setup_norm, sub_ch_teardown_norm);
  240. tcase_add_checked_fixture(tc, sub_ch_setup_norm, sub_ch_teardown_norm);
  241. sr = srunner_create(s);
  242. srunner_set_fork_status(sr, CK_NOFORK);
  243. testval_up = 1;
  244. testval_down = 1;
  245. srunner_run_all(sr, CK_VERBOSE);
  246. ck_assert_msg(testval_up == 7, "Multiple setups failed");
  247. ck_assert_msg(testval_down == 7, "Multiple teardowns failed");
  248. ck_assert_msg (srunner_ntests_run(sr) == 1,
  249. "Test run counts not correct for checked setup failure");
  250. ck_assert_msg (srunner_ntests_failed(sr) == 0,
  251. "Failure counts not correct for checked setup failure");
  252. srunner_free(sr);
  253. }
  254. END_TEST
  255. /* This test currently does not work on Cygwin, as it results in a
  256. * SIGSEGV instead of a SIGFPE. However, a simple program that installs
  257. * a SIGFPE handler then raise(SIGFPE) works as expected. Further
  258. * investigation is necessary. */
  259. #if !defined(__CYGWIN__)
  260. /*
  261. * This test will fail without fork, as it results in a checked
  262. * fixture raising a signal, which terminates the test runner early.
  263. */
  264. START_TEST(test_ch_setup_sig)
  265. {
  266. TCase *tc;
  267. Suite *s;
  268. SRunner *sr;
  269. TestResult **tr;
  270. char *strstat;
  271. char *trm;
  272. s = suite_create("Setup Sig");
  273. tc = tcase_create("Setup Sig");
  274. suite_add_tcase(s, tc);
  275. tcase_add_test(tc,test_sub_fail);
  276. tcase_add_checked_fixture(tc,setup_sub_signal, NULL);
  277. sr = srunner_create(s);
  278. srunner_run_all(sr,CK_VERBOSE);
  279. ck_assert_msg (srunner_ntests_failed(sr) == 1,
  280. "Failure counts not correct for checked setup signal");
  281. ck_assert_msg (srunner_ntests_run(sr) == 1,
  282. "Test run counts not correct for checked setup signal");
  283. strstat= sr_stat_str(sr);
  284. ck_assert_msg(strcmp(strstat,
  285. "0%: Checks: 1, Failures: 0, Errors: 1") == 0,
  286. "SRunner stat string incorrect with checked setup signal");
  287. free(strstat);
  288. tr = srunner_failures(sr);
  289. trm = tr_str(tr[0]);
  290. if (strstr(trm,
  291. "check_check_fixture.c:160:S:Setup Sig:test_sub_fail:0: "
  292. "(after this point) Received signal 8")
  293. == 0) {
  294. snprintf(errm, sizeof(errm),
  295. "Msg was (%s)", trm);
  296. ck_abort_msg("%s", errm);
  297. }
  298. free(trm);
  299. srunner_free(sr);
  300. free(tr);
  301. }
  302. END_TEST
  303. #endif /* !defined(__CYGWIN__) */
  304. static void sub_ch_setup_dual_1(void)
  305. {
  306. ck_assert_msg(testval_up == 1, "Wrong start value");
  307. testval_up += 2;
  308. }
  309. static void sub_ch_setup_dual_2(void)
  310. {
  311. ck_assert_msg(testval_up == 3, "First setup failed");
  312. testval_up += 3;
  313. }
  314. START_TEST(test_sub_two_setups)
  315. {
  316. ck_assert_msg(testval_up == 6, "Multiple setups failed");
  317. }
  318. END_TEST
  319. /*
  320. * This test will not work without fork, as checked fixtures are
  321. * not supported
  322. */
  323. START_TEST(test_ch_setup_two_setups_fork)
  324. {
  325. TCase *tc;
  326. Suite *s;
  327. SRunner *sr;
  328. s = suite_create("Fixture Two setups");
  329. tc = tcase_create("Fixture Two setups");
  330. sr = srunner_create(s);
  331. suite_add_tcase(s, tc);
  332. tcase_add_test(tc,test_sub_two_setups);
  333. tcase_add_checked_fixture(tc,sub_ch_setup_dual_1,NULL);
  334. tcase_add_checked_fixture(tc,sub_ch_setup_dual_2,NULL);
  335. testval_up = 1;
  336. srunner_run_all(sr, CK_VERBOSE);
  337. ck_assert_msg(srunner_ntests_failed(sr) == 0,
  338. "Problem with several setups");
  339. srunner_free(sr);
  340. }
  341. END_TEST
  342. START_TEST(test_ch_teardown_fail)
  343. {
  344. TCase *tc;
  345. Suite *s;
  346. SRunner *sr;
  347. TestResult **tr;
  348. char *strstat;
  349. char *trm;
  350. s = suite_create("Teardown Fail");
  351. tc = tcase_create("Teardown Fail");
  352. suite_add_tcase(s, tc);
  353. tcase_add_test(tc,test_sub_pass);
  354. tcase_add_checked_fixture(tc,NULL, teardown_sub_fail);
  355. sr = srunner_create(s);
  356. srunner_run_all(sr,CK_VERBOSE);
  357. ck_assert_msg (srunner_ntests_failed(sr) == 1,
  358. "Failure counts not correct for checked teardown failure");
  359. ck_assert_msg (srunner_ntests_run(sr) == 1,
  360. "Test run counts not correct for checked teardown failure");
  361. strstat= sr_stat_str(sr);
  362. ck_assert_msg(strcmp(strstat,
  363. "0%: Checks: 1, Failures: 1, Errors: 0") == 0,
  364. "SRunner stat string incorrect with checked setup failure");
  365. free(strstat);
  366. tr = srunner_failures(sr);
  367. trm = tr_str(tr[0]);
  368. if (strstr(trm,
  369. "check_check_fixture.c:155:S:Teardown Fail:test_sub_pass:0: Failed teardown")
  370. == 0) {
  371. snprintf(errm, sizeof(errm),
  372. "Bad failed checked teardown tr msg (%s)", trm);
  373. ck_abort_msg("%s", errm);
  374. }
  375. free(trm);
  376. free(tr);
  377. }
  378. END_TEST
  379. START_TEST(test_ch_teardown_fail_nofork)
  380. {
  381. TCase *tc;
  382. Suite *s;
  383. SRunner *sr;
  384. TestResult **tr;
  385. char *strstat;
  386. char *trm;
  387. s = suite_create("Teardown Fail No Fork");
  388. tc = tcase_create("Teardown Fail No Fork");
  389. suite_add_tcase(s, tc);
  390. tcase_add_test(tc,test_sub_pass);
  391. tcase_add_checked_fixture(tc,NULL, teardown_sub_fail);
  392. sr = srunner_create(s);
  393. srunner_set_fork_status(sr, CK_NOFORK);
  394. srunner_run_all(sr,CK_VERBOSE);
  395. ck_assert_msg (srunner_ntests_failed(sr) == 1,
  396. "Failure counts not correct for checked teardown failure");
  397. ck_assert_msg (srunner_ntests_run(sr) == 1,
  398. "Test run counts not correct for checked teardown failure");
  399. strstat= sr_stat_str(sr);
  400. ck_assert_msg(strcmp(strstat,
  401. "0%: Checks: 1, Failures: 1, Errors: 0") == 0,
  402. "SRunner stat string incorrect with checked setup failure");
  403. free(strstat);
  404. tr = srunner_failures(sr);
  405. trm = tr_str(tr[0]);
  406. if (strstr(trm,
  407. "check_check_fixture.c:155:S:Teardown Fail No Fork:test_sub_pass:0: Failed teardown")
  408. == 0) {
  409. snprintf(errm, sizeof(errm),
  410. "Bad failed checked teardown tr msg (%s)", trm);
  411. ck_abort_msg("%s", errm);
  412. }
  413. free(trm);
  414. free(tr);
  415. }
  416. END_TEST
  417. /* This test currently does not work on Cygwin, as it results in a
  418. * SIGSEGV instead of a SIGFPE. However, a simple program that installs
  419. * a SIGFPE handler then raise(SIGFPE) works as expected. Further
  420. * investigation is necessary. */
  421. #if !defined(__CYGWIN__)
  422. /*
  423. * This test will fail without fork, as it results in a checked
  424. * fixture raising a signal, which terminates the test runner early.
  425. */
  426. START_TEST(test_ch_teardown_sig)
  427. {
  428. TCase *tc;
  429. Suite *s;
  430. SRunner *sr;
  431. TestResult **tr;
  432. char *strstat;
  433. char *trm;
  434. s = suite_create("Teardown Sig");
  435. tc = tcase_create("Teardown Sig");
  436. suite_add_tcase(s, tc);
  437. tcase_add_test(tc,test_sub_pass);
  438. tcase_add_checked_fixture(tc,NULL, teardown_sub_signal);
  439. sr = srunner_create(s);
  440. srunner_run_all(sr,CK_VERBOSE);
  441. ck_assert_msg (srunner_ntests_failed(sr) == 1,
  442. "Failure counts not correct for checked teardown signal");
  443. ck_assert_msg (srunner_ntests_run(sr) == 1,
  444. "Test run counts not correct for checked teardown signal");
  445. strstat= sr_stat_str(sr);
  446. ck_assert_msg(strcmp(strstat,
  447. "0%: Checks: 1, Failures: 0, Errors: 1") == 0,
  448. "SRunner stat string incorrect with checked teardown signal");
  449. free(strstat);
  450. tr = srunner_failures(sr);
  451. trm = tr_str(tr[0]);
  452. if (strstr(trm,
  453. "check_check_fixture.c:166:S:Teardown Sig:test_sub_pass:0: "
  454. "(after this point) Received signal 8")
  455. == 0) {
  456. snprintf(errm, sizeof(errm),
  457. "Bad msg (%s)", trm);
  458. ck_abort_msg("%s", errm);
  459. }
  460. free(trm);
  461. srunner_free(sr);
  462. free(tr);
  463. }
  464. END_TEST
  465. #endif /* !defined(__CYGWIN__) */
  466. /* Teardowns are run in reverse order */
  467. static void sub_ch_teardown_dual_1(void)
  468. {
  469. ck_assert_msg(testval_down == 6, "Second teardown failed");
  470. }
  471. static void sub_ch_teardown_dual_2(void)
  472. {
  473. ck_assert_msg(testval_down == 3, "First teardown failed");
  474. testval_down += 3;
  475. }
  476. START_TEST(test_sub_two_teardowns)
  477. {
  478. testval_down += 2;
  479. }
  480. END_TEST
  481. /*
  482. * This test will not work without fork, as checked fixtures are
  483. * not supported
  484. */
  485. START_TEST(test_ch_teardown_two_teardowns_fork)
  486. {
  487. TCase *tc;
  488. Suite *s;
  489. SRunner *sr;
  490. int nr_of_failures;
  491. char errm[1024] = {0};
  492. s = suite_create("Fixture Two teardowns");
  493. tc = tcase_create("Fixture Two teardowns");
  494. sr = srunner_create(s);
  495. suite_add_tcase(s, tc);
  496. tcase_add_test(tc,test_sub_two_teardowns);
  497. tcase_add_checked_fixture(tc,NULL,sub_ch_teardown_dual_1);
  498. tcase_add_checked_fixture(tc,NULL,sub_ch_teardown_dual_2);
  499. testval_down = 1;
  500. srunner_run_all(sr, CK_VERBOSE);
  501. nr_of_failures = srunner_ntests_failed(sr);
  502. if (nr_of_failures > 0) {
  503. TestResult **tra = srunner_failures(sr);
  504. int i;
  505. for (i = 0; i < nr_of_failures; i++) {
  506. char *trm = tr_str(tra[i]);
  507. if (strlen(errm) + strlen(trm) > 1022) {
  508. free(trm);
  509. break;
  510. }
  511. strcat(errm, trm);
  512. strcat(errm, "\n");
  513. free(trm);
  514. }
  515. free(tra);
  516. }
  517. ck_assert_msg(nr_of_failures == 0, "Problem with several teardowns\n %s",
  518. errm);
  519. srunner_free(sr);
  520. }
  521. END_TEST
  522. #endif /* HAVE_FORK */
  523. Suite *make_fixture_suite (void)
  524. {
  525. Suite *s;
  526. TCase *tc;
  527. s = suite_create("Fixture");
  528. tc = tcase_create("Core");
  529. suite_add_tcase (s, tc);
  530. tcase_add_test(tc,test_fixture_fail_counts);
  531. tcase_add_test(tc,test_print_counts);
  532. tcase_add_test(tc,test_setup_failure_msg);
  533. #if defined(HAVE_FORK) && HAVE_FORK==1
  534. /*
  535. * This test assumes that CK_FORK is being used,
  536. * as it tests that side effects from checked
  537. * fixtures do not persist between tests.
  538. */
  539. tcase_add_test(tc,test_ch_setup);
  540. tcase_add_test(tc,test_ch_setup_fail);
  541. tcase_add_test(tc,test_ch_setup_fail_nofork);
  542. tcase_add_test(tc,test_ch_setup_fail_nofork_2);
  543. tcase_add_test(tc,test_ch_setup_pass_nofork);
  544. #if !defined(__CYGWIN__)
  545. tcase_add_test(tc,test_ch_setup_sig);
  546. #endif /* !defined(__CYGWIN__) */
  547. tcase_add_test(tc,test_ch_setup_two_setups_fork);
  548. tcase_add_test(tc,test_ch_teardown_fail);
  549. tcase_add_test(tc,test_ch_teardown_fail_nofork);
  550. #if !defined(__CYGWIN__)
  551. tcase_add_test(tc,test_ch_teardown_sig);
  552. #endif /* !defined(__CYGWIN__) */
  553. tcase_add_test(tc,test_ch_teardown_two_teardowns_fork);
  554. #endif
  555. return s;
  556. }