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