Lines Matching full:flags
12 static int sys_membarrier(int cmd, int flags) in sys_membarrier() argument
14 return syscall(__NR_membarrier, cmd, flags); in sys_membarrier()
19 int cmd = -1, flags = 0; in test_membarrier_cmd_fail() local
22 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_cmd_fail()
24 "%s test: command = %d, flags = %d. Should fail, but passed\n", in test_membarrier_cmd_fail()
25 test_name, cmd, flags); in test_membarrier_cmd_fail()
29 "%s test: flags = %d. Should return (%d: \"%s\"), but returned (%d: \"%s\").\n", in test_membarrier_cmd_fail()
30 test_name, flags, EINVAL, strerror(EINVAL), in test_membarrier_cmd_fail()
35 "%s test: command = %d, flags = %d, errno = %d. Failed as expected\n", in test_membarrier_cmd_fail()
36 test_name, cmd, flags, errno); in test_membarrier_cmd_fail()
42 int cmd = MEMBARRIER_CMD_QUERY, flags = 1; in test_membarrier_flags_fail() local
43 const char *test_name = "sys membarrier MEMBARRIER_CMD_QUERY invalid flags"; in test_membarrier_flags_fail()
45 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_flags_fail()
47 "%s test: flags = %d. Should fail, but passed\n", in test_membarrier_flags_fail()
48 test_name, flags); in test_membarrier_flags_fail()
52 "%s test: flags = %d. Should return (%d: \"%s\"), but returned (%d: \"%s\").\n", in test_membarrier_flags_fail()
53 test_name, flags, EINVAL, strerror(EINVAL), in test_membarrier_flags_fail()
58 "%s test: flags = %d, errno = %d. Failed as expected\n", in test_membarrier_flags_fail()
59 test_name, flags, errno); in test_membarrier_flags_fail()
65 int cmd = MEMBARRIER_CMD_GLOBAL, flags = 0; in test_membarrier_global_success() local
68 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_global_success()
70 "%s test: flags = %d, errno = %d\n", in test_membarrier_global_success()
71 test_name, flags, errno); in test_membarrier_global_success()
75 "%s test: flags = %d\n", test_name, flags); in test_membarrier_global_success()
81 int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED, flags = 0; in test_membarrier_private_expedited_fail() local
84 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_private_expedited_fail()
86 "%s test: flags = %d. Should fail, but passed\n", in test_membarrier_private_expedited_fail()
87 test_name, flags); in test_membarrier_private_expedited_fail()
91 "%s test: flags = %d. Should return (%d: \"%s\"), but returned (%d: \"%s\").\n", in test_membarrier_private_expedited_fail()
92 test_name, flags, EPERM, strerror(EPERM), in test_membarrier_private_expedited_fail()
97 "%s test: flags = %d, errno = %d\n", in test_membarrier_private_expedited_fail()
98 test_name, flags, errno); in test_membarrier_private_expedited_fail()
104 int cmd = MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED, flags = 0; in test_membarrier_register_private_expedited_success() local
107 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_register_private_expedited_success()
109 "%s test: flags = %d, errno = %d\n", in test_membarrier_register_private_expedited_success()
110 test_name, flags, errno); in test_membarrier_register_private_expedited_success()
114 "%s test: flags = %d\n", in test_membarrier_register_private_expedited_success()
115 test_name, flags); in test_membarrier_register_private_expedited_success()
121 int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED, flags = 0; in test_membarrier_private_expedited_success() local
124 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_private_expedited_success()
126 "%s test: flags = %d, errno = %d\n", in test_membarrier_private_expedited_success()
127 test_name, flags, errno); in test_membarrier_private_expedited_success()
131 "%s test: flags = %d\n", in test_membarrier_private_expedited_success()
132 test_name, flags); in test_membarrier_private_expedited_success()
138 int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE, flags = 0; in test_membarrier_private_expedited_sync_core_fail() local
141 if (sys_membarrier(cmd, flags) != -1) { in test_membarrier_private_expedited_sync_core_fail()
143 "%s test: flags = %d. Should fail, but passed\n", in test_membarrier_private_expedited_sync_core_fail()
144 test_name, flags); in test_membarrier_private_expedited_sync_core_fail()
148 "%s test: flags = %d. Should return (%d: \"%s\"), but returned (%d: \"%s\").\n", in test_membarrier_private_expedited_sync_core_fail()
149 test_name, flags, EPERM, strerror(EPERM), in test_membarrier_private_expedited_sync_core_fail()
154 "%s test: flags = %d, errno = %d\n", in test_membarrier_private_expedited_sync_core_fail()
155 test_name, flags, errno); in test_membarrier_private_expedited_sync_core_fail()
161 int cmd = MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE, flags = 0; in test_membarrier_register_private_expedited_sync_core_success() local
164 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_register_private_expedited_sync_core_success()
166 "%s test: flags = %d, errno = %d\n", in test_membarrier_register_private_expedited_sync_core_success()
167 test_name, flags, errno); in test_membarrier_register_private_expedited_sync_core_success()
171 "%s test: flags = %d\n", in test_membarrier_register_private_expedited_sync_core_success()
172 test_name, flags); in test_membarrier_register_private_expedited_sync_core_success()
178 int cmd = MEMBARRIER_CMD_PRIVATE_EXPEDITED, flags = 0; in test_membarrier_private_expedited_sync_core_success() local
181 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_private_expedited_sync_core_success()
183 "%s test: flags = %d, errno = %d\n", in test_membarrier_private_expedited_sync_core_success()
184 test_name, flags, errno); in test_membarrier_private_expedited_sync_core_success()
188 "%s test: flags = %d\n", in test_membarrier_private_expedited_sync_core_success()
189 test_name, flags); in test_membarrier_private_expedited_sync_core_success()
195 int cmd = MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED, flags = 0; in test_membarrier_register_global_expedited_success() local
198 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_register_global_expedited_success()
200 "%s test: flags = %d, errno = %d\n", in test_membarrier_register_global_expedited_success()
201 test_name, flags, errno); in test_membarrier_register_global_expedited_success()
205 "%s test: flags = %d\n", in test_membarrier_register_global_expedited_success()
206 test_name, flags); in test_membarrier_register_global_expedited_success()
212 int cmd = MEMBARRIER_CMD_GLOBAL_EXPEDITED, flags = 0; in test_membarrier_global_expedited_success() local
215 if (sys_membarrier(cmd, flags) != 0) { in test_membarrier_global_expedited_success()
217 "%s test: flags = %d, errno = %d\n", in test_membarrier_global_expedited_success()
218 test_name, flags, errno); in test_membarrier_global_expedited_success()
222 "%s test: flags = %d\n", in test_membarrier_global_expedited_success()
223 test_name, flags); in test_membarrier_global_expedited_success()
297 int flags = 0, ret; in test_membarrier_query() local
299 ret = sys_membarrier(MEMBARRIER_CMD_QUERY, flags); in test_membarrier_query()