1*49cdfc7eSAndroid Build Coastguard Worker /* 2*49cdfc7eSAndroid Build Coastguard Worker * Copyright (c) 2013 Cyril Hrubis [email protected] 3*49cdfc7eSAndroid Build Coastguard Worker * 4*49cdfc7eSAndroid Build Coastguard Worker * This program is free software; you can redistribute it and/or 5*49cdfc7eSAndroid Build Coastguard Worker * modify it under the terms of the GNU General Public License 6*49cdfc7eSAndroid Build Coastguard Worker * as published by the Free Software Foundation; either version 2 7*49cdfc7eSAndroid Build Coastguard Worker * of the License, or (at your option) any later version. 8*49cdfc7eSAndroid Build Coastguard Worker * 9*49cdfc7eSAndroid Build Coastguard Worker * This program is distributed in the hope that it will be useful, 10*49cdfc7eSAndroid Build Coastguard Worker * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*49cdfc7eSAndroid Build Coastguard Worker * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12*49cdfc7eSAndroid Build Coastguard Worker * GNU General Public License for more details. 13*49cdfc7eSAndroid Build Coastguard Worker * 14*49cdfc7eSAndroid Build Coastguard Worker * You should have received a copy of the GNU General Public License 15*49cdfc7eSAndroid Build Coastguard Worker * along with this program; if not, write to the Free Software 16*49cdfc7eSAndroid Build Coastguard Worker * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 17*49cdfc7eSAndroid Build Coastguard Worker * This program is free software; you can redistribute it and/or modify it 18*49cdfc7eSAndroid Build Coastguard Worker * under the terms of version 2 of the GNU General Public License as 19*49cdfc7eSAndroid Build Coastguard Worker * published by the Free Software Foundation. 20*49cdfc7eSAndroid Build Coastguard Worker */ 21*49cdfc7eSAndroid Build Coastguard Worker 22*49cdfc7eSAndroid Build Coastguard Worker #ifndef __LTP_PRIV_H__ 23*49cdfc7eSAndroid Build Coastguard Worker #define __LTP_PRIV_H__ 24*49cdfc7eSAndroid Build Coastguard Worker 25*49cdfc7eSAndroid Build Coastguard Worker #include <stdarg.h> 26*49cdfc7eSAndroid Build Coastguard Worker #include "tst_defaults.h" 27*49cdfc7eSAndroid Build Coastguard Worker 28*49cdfc7eSAndroid Build Coastguard Worker /* environment variables for controlling tst_res verbosity */ 29*49cdfc7eSAndroid Build Coastguard Worker #define TOUT_VERBOSE_S "VERBOSE" /* All test cases reported */ 30*49cdfc7eSAndroid Build Coastguard Worker #define TOUT_NOPASS_S "NOPASS" /* No pass test cases are reported */ 31*49cdfc7eSAndroid Build Coastguard Worker #define TOUT_DISCARD_S "DISCARD" /* No output is reported */ 32*49cdfc7eSAndroid Build Coastguard Worker 33*49cdfc7eSAndroid Build Coastguard Worker #define USC_ITERATION_ENV "USC_ITERATIONS" 34*49cdfc7eSAndroid Build Coastguard Worker #define USC_LOOP_WALLTIME "USC_LOOP_WALLTIME" 35*49cdfc7eSAndroid Build Coastguard Worker #define USC_NO_FUNC_CHECK "USC_NO_FUNC_CHECK" 36*49cdfc7eSAndroid Build Coastguard Worker #define USC_LOOP_DELAY "USC_LOOP_DELAY" 37*49cdfc7eSAndroid Build Coastguard Worker 38*49cdfc7eSAndroid Build Coastguard Worker const char *parse_opts(int ac, char **av, const option_t *user_optarr, void 39*49cdfc7eSAndroid Build Coastguard Worker (*uhf)(void)); 40*49cdfc7eSAndroid Build Coastguard Worker 41*49cdfc7eSAndroid Build Coastguard Worker /* Interface for rerouting to new lib calls from tst_res.c */ 42*49cdfc7eSAndroid Build Coastguard Worker extern void *tst_test; 43*49cdfc7eSAndroid Build Coastguard Worker 44*49cdfc7eSAndroid Build Coastguard Worker void tst_vbrk_(const char *file, const int lineno, int ttype, 45*49cdfc7eSAndroid Build Coastguard Worker const char *fmt, va_list va) __attribute__((noreturn)); 46*49cdfc7eSAndroid Build Coastguard Worker 47*49cdfc7eSAndroid Build Coastguard Worker void tst_brk_(const char *file, const int lineno, int ttype, 48*49cdfc7eSAndroid Build Coastguard Worker const char *msg, ...); 49*49cdfc7eSAndroid Build Coastguard Worker 50*49cdfc7eSAndroid Build Coastguard Worker void tst_vres_(const char *file, const int lineno, int ttype, 51*49cdfc7eSAndroid Build Coastguard Worker const char *fmt, va_list va); 52*49cdfc7eSAndroid Build Coastguard Worker 53*49cdfc7eSAndroid Build Coastguard Worker void tst_res_(const char *file, const int lineno, int ttype, 54*49cdfc7eSAndroid Build Coastguard Worker const char *msg, ...); 55*49cdfc7eSAndroid Build Coastguard Worker 56*49cdfc7eSAndroid Build Coastguard Worker 57*49cdfc7eSAndroid Build Coastguard Worker #define NO_NEWLIB_ASSERT(file, lineno) \ 58*49cdfc7eSAndroid Build Coastguard Worker if (tst_test) { \ 59*49cdfc7eSAndroid Build Coastguard Worker tst_brk_(file, lineno, TBROK, \ 60*49cdfc7eSAndroid Build Coastguard Worker "%s() executed from newlib!", __FUNCTION__); \ 61*49cdfc7eSAndroid Build Coastguard Worker } 62*49cdfc7eSAndroid Build Coastguard Worker 63*49cdfc7eSAndroid Build Coastguard Worker #endif /* __LTP_PRIV_H__ */ 64