summaryrefslogtreecommitdiffstats
path: root/kernel/tests/include/tst_safe_stdio.h
diff options
context:
space:
mode:
authorManuel Bentele2020-09-11 11:48:48 +0200
committerManuel Bentele2020-09-16 07:37:56 +0200
commita4215c3632c13218bb389d1f066549ab783028e3 (patch)
tree0468836ef5303f6eb94b876189ccaa60a7a2b453 /kernel/tests/include/tst_safe_stdio.h
parentUpdated README with documentation of general information and build options (diff)
downloadxloop-a4215c3632c13218bb389d1f066549ab783028e3.tar.gz
xloop-a4215c3632c13218bb389d1f066549ab783028e3.tar.xz
xloop-a4215c3632c13218bb389d1f066549ab783028e3.zip
Added testcases from the Linux testing project (LTP)
Diffstat (limited to 'kernel/tests/include/tst_safe_stdio.h')
-rw-r--r--kernel/tests/include/tst_safe_stdio.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/kernel/tests/include/tst_safe_stdio.h b/kernel/tests/include/tst_safe_stdio.h
new file mode 100644
index 0000000..e4bff34
--- /dev/null
+++ b/kernel/tests/include/tst_safe_stdio.h
@@ -0,0 +1,24 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright (c) 2013-2016 Cyril Hrubis <chrubis@suse.cz>
+ */
+
+#ifndef TST_SAFE_STDIO_H__
+#define TST_SAFE_STDIO_H__
+
+#include <stdio.h>
+
+#include "safe_stdio_fn.h"
+
+#define SAFE_FOPEN(path, mode) \
+ safe_fopen(__FILE__, __LINE__, NULL, path, mode)
+
+#define SAFE_FCLOSE(f) \
+ safe_fclose(__FILE__, __LINE__, NULL, f)
+
+#define SAFE_ASPRINTF(strp, fmt, ...) \
+ safe_asprintf(__FILE__, __LINE__, NULL, strp, fmt, __VA_ARGS__)
+
+#define SAFE_POPEN(command, type) \
+ safe_popen(__FILE__, __LINE__, NULL, command, type)
+
+#endif /* TST_SAFE_STDIO_H__ */