• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // SPDX-License-Identifier: GPL-2.0-or-later
2 /*
3  * Copyright (c) 2016 Cyril Hrubis <chrubis@suse.cz>
4  */
5 
6 /*
7  * The tst_resm() and tst_brkm() should be rerouted to the new lib.
8  */
9 
10 #include "tst_test.h"
11 
12 void tst_resm_(char *, int, int, char *);
13 void tst_brkm_(char *, int, int, void (*)(void), char *);
14 
cleanup(void)15 static void cleanup(void)
16 {
17 }
18 
do_test(unsigned int i)19 static void do_test(unsigned int i)
20 {
21 	switch (i) {
22 	case 0:
23 		tst_resm_(__FILE__, __LINE__, TINFO, "info message");
24 		tst_resm_(__FILE__, __LINE__, TPASS, "passed message");
25 	break;
26 	case 1:
27 		tst_brkm_(__FILE__, __LINE__, TCONF, cleanup, "Non-NULL cleanup");
28 	break;
29 	}
30 }
31 
32 static struct tst_test test = {
33 	.tcnt = 2,
34 	.test = do_test,
35 };
36