1 /* $OpenBSD: sigio_pipe.c,v 1.1 2020/09/16 14:02:23 mpi Exp $ */
2
3 /*
4 * Copyright (c) 2018 Visa Hankala
5 *
6 * Permission to use, copy, modify, and distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
9 *
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
17 */
18
19 #include <assert.h>
20 #include <fcntl.h>
21 #include <signal.h>
22 #include <unistd.h>
23
24 #include "common.h"
25
26 int
test_pipe_badpgid(void)27 test_pipe_badpgid(void)
28 {
29 int fds[2];
30
31 assert(pipe(fds) == 0);
32 return test_common_badpgid(fds[0]);
33 }
34
35 int
test_pipe_badsession(void)36 test_pipe_badsession(void)
37 {
38 int fds[2];
39
40 assert(pipe(fds) == 0);
41 return test_common_badsession(fds[0]);
42 }
43
44 int
test_pipe_cansigio(void)45 test_pipe_cansigio(void)
46 {
47 int fds[2];
48
49 assert(pipe(fds) == 0);
50 return test_common_cansigio(fds);
51 }
52
53 int
test_pipe_getown(void)54 test_pipe_getown(void)
55 {
56 int fds[2];
57
58 assert(pipe(fds) == 0);
59 return test_common_getown(fds[0]);
60 }
61
62 int
test_pipe_read(void)63 test_pipe_read(void)
64 {
65 int fds[2];
66
67 assert(pipe(fds) == 0);
68 return test_common_read(fds);
69 }
70
71 int
test_pipe_write(void)72 test_pipe_write(void)
73 {
74 int fds[2];
75
76 assert(pipe(fds) == 0);
77 return test_common_write(fds);
78 }
79