summaryrefslogtreecommitdiffstats
path: root/kernel/tests/include/libsigwait.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/libsigwait.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/libsigwait.h')
-rw-r--r--kernel/tests/include/libsigwait.h44
1 files changed, 44 insertions, 0 deletions
diff --git a/kernel/tests/include/libsigwait.h b/kernel/tests/include/libsigwait.h
new file mode 100644
index 0000000..2fca578
--- /dev/null
+++ b/kernel/tests/include/libsigwait.h
@@ -0,0 +1,44 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
+ * Copyright (c) 2020 Linaro Limited. All rights reserved.
+ * Author: Viresh Kumar <viresh.kumar@linaro.org>
+ */
+
+#ifndef SIGWAIT_H__
+#define SIGWAIT_H__
+
+#include "tst_test.h"
+#include "tst_timer.h"
+#include <signal.h>
+
+/* swi: sigwaitinfo() */
+typedef int (*swi_func) (const sigset_t * set, siginfo_t * info,
+ void * timeout);
+typedef void (*test_func) (swi_func, int, enum tst_ts_type type);
+
+struct sigwait_test_desc {
+ test_func tf;
+ int signo;
+};
+
+void test_empty_set(swi_func sigwaitinfo, int signo,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void test_timeout(swi_func sigwaitinfo, int signo, enum tst_ts_type type);
+void test_unmasked_matching(swi_func sigwaitinfo, int signo,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void test_unmasked_matching_noinfo(swi_func sigwaitinfo, int signo,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void test_masked_matching(swi_func sigwaitinfo, int signo,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void test_masked_matching_rt(swi_func sigwaitinfo, int signo,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void test_masked_matching_noinfo(swi_func sigwaitinfo, int signo,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void test_bad_address(swi_func sigwaitinfo, int signo,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void test_bad_address2(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void test_bad_address3(swi_func sigwaitinfo, int signo LTP_ATTRIBUTE_UNUSED,
+ enum tst_ts_type type LTP_ATTRIBUTE_UNUSED);
+void sigwait_setup(void);
+#endif /* SIGWAIT_H__ */