1 /*
2 * Copyright (c) 2024 Abhinav Srivastava
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6 #include <zephyr/ztest.h>
7 #include <stropts.h>
8 #include <errno.h>
9
ZTEST(xsi_streams,test_putmsg)10 ZTEST(xsi_streams, test_putmsg)
11 {
12 const struct strbuf *ctrl = NULL;
13 const struct strbuf *data = NULL;
14 int fd = -1;
15 int ret = putmsg(fd, ctrl, data, 0);
16
17 zassert_equal(ret, -1, "Expected return value -1, got %d", ret);
18 zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
19 }
20
ZTEST(xsi_streams,test_fdetach)21 ZTEST(xsi_streams, test_fdetach)
22 {
23 char *path = NULL;
24 int ret = fdetach(path);
25
26 zassert_equal(ret, -1, "Expected return value -1, got %d", ret);
27 zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
28 }
29
ZTEST(xsi_streams,test_fattach)30 ZTEST(xsi_streams, test_fattach)
31 {
32 char *path = NULL;
33 int fd = -1;
34 int ret = fattach(fd, path);
35
36 zassert_equal(ret, -1, "Expected return value -1, got %d", ret);
37 zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
38 }
39
ZTEST(xsi_streams,test_getmsg)40 ZTEST(xsi_streams, test_getmsg)
41 {
42 struct strbuf *ctrl = NULL;
43 struct strbuf *data = NULL;
44 int fd = -1;
45 int ret = getmsg(fd, ctrl, data, 0);
46
47 zassert_equal(ret, -1, "Expected return value -1, got %d", ret);
48 zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
49 }
50
ZTEST(xsi_streams,test_getpmsg)51 ZTEST(xsi_streams, test_getpmsg)
52 {
53 struct strbuf *ctrl = NULL;
54 struct strbuf *data = NULL;
55 int fd = -1;
56 int ret = getpmsg(fd, ctrl, data, 0, 0);
57
58 zassert_equal(ret, -1, "Expected return value -1, got %d", ret);
59 zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
60 }
61
ZTEST(xsi_streams,test_isastream)62 ZTEST(xsi_streams, test_isastream)
63 {
64 int fd = -1;
65 int ret = isastream(fd);
66
67 zassert_equal(ret, -1, "Expected return value -1, got %d", ret);
68 zassert_equal(errno, ENOSYS, "Expected errno ENOSYS, got %d", errno);
69 }
70
71 ZTEST_SUITE(xsi_streams, NULL, NULL, NULL, NULL, NULL);
72