Cyril Hrubis | ed69cd5 | 2013-06-24 17:51:00 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2013 Cyril Hrubis chrubis@suse.cz |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or |
| 5 | * modify it under the terms of the GNU General Public License |
| 6 | * as published by the Free Software Foundation; either version 2 |
| 7 | * of the License, or (at your option) any later version. |
| 8 | * |
| 9 | * This program is distributed in the hope that it will be useful, |
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 12 | * GNU General Public License for more details. |
| 13 | * |
| 14 | * You should have received a copy of the GNU General Public License |
| 15 | * along with this program; if not, write to the Free Software |
| 16 | * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 17 | * This program is free software; you can redistribute it and/or modify it |
| 18 | * under the terms of version 2 of the GNU General Public License as |
| 19 | * published by the Free Software Foundation. |
| 20 | */ |
| 21 | |
| 22 | #ifndef __LTP_PRIV_H__ |
| 23 | #define __LTP_PRIV_H__ |
| 24 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 25 | #include <stdarg.h> |
| 26 | |
Cyril Hrubis | ed69cd5 | 2013-06-24 17:51:00 +0200 | [diff] [blame] | 27 | /* declared in tst_tmpdir.c */ |
| 28 | const char *tst_get_startwd(void); |
| 29 | |
Cyril Hrubis | 812521d | 2013-06-25 18:23:06 +0200 | [diff] [blame] | 30 | /* |
| 31 | * This is the default temporary directory used by tst_tmpdir(). |
| 32 | * |
| 33 | * This is used when TMPDIR env variable is not set. |
| 34 | */ |
| 35 | #define TEMPDIR "/tmp" |
| 36 | |
Cyril Hrubis | e6c24c1 | 2014-06-19 12:46:45 +0200 | [diff] [blame] | 37 | /* |
| 38 | * Default filesystem to be used for tests. |
| 39 | */ |
| 40 | #define DEFAULT_FS_TYPE "ext2" |
| 41 | |
Cyril Hrubis | 06f9fe4 | 2013-06-26 14:55:48 +0200 | [diff] [blame] | 42 | /* environment variables for controlling tst_res verbosity */ |
| 43 | #define TOUT_VERBOSE_S "VERBOSE" /* All test cases reported */ |
| 44 | #define TOUT_NOPASS_S "NOPASS" /* No pass test cases are reported */ |
| 45 | #define TOUT_DISCARD_S "DISCARD" /* No output is reported */ |
| 46 | |
Cyril Hrubis | 06f9fe4 | 2013-06-26 14:55:48 +0200 | [diff] [blame] | 47 | #define USC_ITERATION_ENV "USC_ITERATIONS" |
Cyril Hrubis | 06f9fe4 | 2013-06-26 14:55:48 +0200 | [diff] [blame] | 48 | #define USC_LOOP_WALLTIME "USC_LOOP_WALLTIME" |
Cyril Hrubis | 06f9fe4 | 2013-06-26 14:55:48 +0200 | [diff] [blame] | 49 | #define USC_NO_FUNC_CHECK "USC_NO_FUNC_CHECK" |
Cyril Hrubis | 06f9fe4 | 2013-06-26 14:55:48 +0200 | [diff] [blame] | 50 | #define USC_LOOP_DELAY "USC_LOOP_DELAY" |
Cyril Hrubis | 06f9fe4 | 2013-06-26 14:55:48 +0200 | [diff] [blame] | 51 | |
Cyril Hrubis | d6d11d0 | 2015-03-09 17:35:43 +0100 | [diff] [blame] | 52 | const char *parse_opts(int ac, char **av, const option_t *user_optarr, void |
| 53 | (*uhf)(void)); |
| 54 | |
Cyril Hrubis | bbdb9f7 | 2016-03-16 15:53:57 +0100 | [diff] [blame] | 55 | /* Interface for rerouting to new lib calls from tst_res.c */ |
| 56 | extern void *tst_test; |
| 57 | |
| 58 | void tst_vbrk_(const char *file, const int lineno, int ttype, |
| 59 | const char *fmt, va_list va) __attribute__((noreturn)); |
| 60 | |
| 61 | void tst_brk_(const char *file, const int lineno, int ttype, |
| 62 | const char *msg, ...) __attribute__((noreturn)); |
| 63 | |
| 64 | void tst_vres_(const char *file, const int lineno, int ttype, |
| 65 | const char *fmt, va_list va); |
| 66 | |
| 67 | void tst_res_(const char *file, const int lineno, int ttype, |
| 68 | const char *msg, ...); |
| 69 | |
| 70 | |
| 71 | #define NO_NEWLIB_ASSERT(file, lineno) \ |
| 72 | if (tst_test) { \ |
| 73 | tst_brk_(file, lineno, TBROK, \ |
| 74 | "%s() executed from newlib!", __FUNCTION__); \ |
| 75 | } |
| 76 | |
Cyril Hrubis | ed69cd5 | 2013-06-24 17:51:00 +0200 | [diff] [blame] | 77 | #endif /* __LTP_PRIV_H__ */ |