Home
last modified time | relevance | path

Searched refs:res (Results 1 – 25 of 405) sorted by relevance

12345678910>>...17

/Zephyr-latest/tests/subsys/fs/fat_fs_dual_drive/src/
Dtest_fat_file.c18 int res; in test_file_open() local
29 res = fs_open(&filep, path, FS_O_CREATE | FS_O_RDWR); in test_file_open()
30 if (res) { in test_file_open()
31 TC_PRINT("Failed opening file [%d]\n", res); in test_file_open()
32 return res; in test_file_open()
37 return res; in test_file_open()
43 int res; in test_file_write() local
48 res = fs_seek(&filep, 0, FS_SEEK_SET); in test_file_write()
49 if (res) { in test_file_write()
50 TC_PRINT("fs_seek failed [%d]\n", res); in test_file_write()
[all …]
Dtest_fat_dir.c22 int res; in test_mkdir() local
37 res = fs_mkdir(dir); in test_mkdir()
38 if (res) { in test_mkdir()
39 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
40 return res; in test_mkdir()
43 res = fs_open(&filep, file, FS_O_CREATE | FS_O_RDWR); in test_mkdir()
44 if (res) { in test_mkdir()
45 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
46 return res; in test_mkdir()
49 res = test_file_write(); in test_mkdir()
[all …]
/Zephyr-latest/tests/subsys/fs/multi-fs/src/
Dtest_common_dir.c22 int res; in test_mkdir() local
27 res = sprintf(file_path, "%s/%s", dir_path, file); in test_mkdir()
28 __ASSERT_NO_MSG(res < sizeof(file_path)); in test_mkdir()
41 res = fs_mkdir(dir_path); in test_mkdir()
42 if (res) { in test_mkdir()
43 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
44 return res; in test_mkdir()
47 res = fs_open(&filep, file_path, FS_O_CREATE | FS_O_RDWR); in test_mkdir()
48 if (res) { in test_mkdir()
49 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
[all …]
Dtest_common_file.c14 int res; in test_file_open() local
25 res = fs_open(filep, file_path, FS_O_CREATE | FS_O_RDWR); in test_file_open()
26 if (res) { in test_file_open()
27 TC_PRINT("Failed opening file [%d]\n", res); in test_file_open()
28 return res; in test_file_open()
33 return res; in test_file_open()
39 int res; in test_file_write() local
44 res = fs_seek(filep, 0, FS_SEEK_SET); in test_file_write()
45 if (res) { in test_file_write()
46 TC_PRINT("fs_seek failed [%d]\n", res); in test_file_write()
[all …]
/Zephyr-latest/tests/subsys/fs/fat_fs_api/src/
Dtest_fat_rename.c13 int res = 0; in delete_it() local
15 res = fs_unlink(path); in delete_it()
16 if (res && !quiet) { in delete_it()
17 TC_PRINT("Couldn't delete %s [%d]\n", path, res); in delete_it()
21 return res; in delete_it()
27 int res = 0; in create_file() local
31 res = fs_open(&fp, path, FS_O_CREATE | FS_O_RDWR); in create_file()
32 if (!res) { in create_file()
33 res = fs_close(&fp); in create_file()
35 TC_PRINT("Couldn't open %s [%d]\n", path, res); in create_file()
[all …]
Dtest_fat_dir.c17 int res; in test_mkdir() local
32 res = fs_mkdir(TEST_DIR); in test_mkdir()
33 if (res) { in test_mkdir()
34 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
35 return res; in test_mkdir()
38 res = fs_open(&filep, TEST_DIR_FILE, FS_O_CREATE | FS_O_RDWR); in test_mkdir()
39 if (res) { in test_mkdir()
40 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
41 return res; in test_mkdir()
44 res = test_file_write(); in test_mkdir()
[all …]
Dtest_fat_file.c13 int res; in test_file_open() local
24 res = fs_open(&filep, TEST_FILE, FS_O_CREATE | FS_O_RDWR); in test_file_open()
25 if (res) { in test_file_open()
26 TC_PRINT("Failed opening file [%d]\n", res); in test_file_open()
27 return res; in test_file_open()
36 return res; in test_file_open()
42 int res; in test_file_write() local
47 res = fs_seek(&filep, 0, FS_SEEK_SET); in test_file_write()
48 if (res) { in test_file_write()
49 TC_PRINT("fs_seek failed [%d]\n", res); in test_file_write()
[all …]
Dtest_fat_file_reentrant.c27 int res; in test_reentrant_access() local
47 res = fs_open(&filep, TEST_FILE, FS_O_CREATE | FS_O_RDWR); in test_reentrant_access()
48 zassert_ok(res, "Err: File could not be opened [%d]\n", res); in test_reentrant_access()
56 res = fs_close(&filep); in test_reentrant_access()
57 zassert_ok(res, "Error closing file [%d]\n", res); in test_reentrant_access()
58 res = fs_unlink(TEST_FILE); in test_reentrant_access()
59 zassert_ok(res, "Error deleting file [%d]\n", res); in test_reentrant_access()
63 return res; in test_reentrant_access()
68 int res; in test_reentrant_parallel_file_access() local
73 res = fs_open(&filep, TEST_FILE, FS_O_CREATE | FS_O_RDWR); in test_reentrant_parallel_file_access()
[all …]
/Zephyr-latest/tests/net/socket/socketpair/src/
Dpoll.c26 int res; in test_socketpair_poll_timeout_common() local
32 res = zsock_poll(fds, 1, 1); in test_socketpair_poll_timeout_common()
33 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in test_socketpair_poll_timeout_common()
36 res = zsock_send(fixture->sv[0], "x", 1, 0); in test_socketpair_poll_timeout_common()
37 zassert_equal(res, 1, "send() failed: %d", res); in test_socketpair_poll_timeout_common()
43 res = zsock_poll(fds, 1, 1); in test_socketpair_poll_timeout_common()
44 zassert_equal(res, 0, "poll: expected: 0 actual: %d", res); in test_socketpair_poll_timeout_common()
55 int res; in ZTEST_USER_F() local
57 res = zsock_fcntl(fixture->sv[0], F_GETFL, 0); in ZTEST_USER_F()
58 zassert_not_equal(res, -1, "fcntl failed: %d", errno); in ZTEST_USER_F()
[all …]
Dclosed_ends.c10 int res; in ZTEST_USER_F() local
13 res = zsock_close(fixture->sv[i]); in ZTEST_USER_F()
14 zassert_equal(res, 0, "close(fixture->sv[%u]) failed: %d", i, errno); in ZTEST_USER_F()
17 res = zsock_send(fixture->sv[(!i) & 1], "x", 1, 0); in ZTEST_USER_F()
18 zassert_equal(res, -1, "expected send() to fail"); in ZTEST_USER_F()
19 zassert_equal(res, -1, "errno: expected: EPIPE actual: %d", in ZTEST_USER_F()
22 res = zsock_close(fixture->sv[(!i) & 1]); in ZTEST_USER_F()
23 zassert_equal(res, 0, "close(fixture->sv[%u]) failed: %d", i, errno); in ZTEST_USER_F()
26 res = zsock_socketpair(AF_UNIX, SOCK_STREAM, 0, fixture->sv); in ZTEST_USER_F()
27 zassert_equal(res, 0, "socketpair() failed: %d", errno); in ZTEST_USER_F()
[all …]
Dnonblock.c11 int res; in ZTEST_USER_F() local
17 res = zsock_send(fixture->sv[i], "x", 1, 0); in ZTEST_USER_F()
18 zassert_equal(res, 1, "send() failed: %d", errno); in ZTEST_USER_F()
22 res = zsock_fcntl(fixture->sv[i], F_GETFL, 0); in ZTEST_USER_F()
23 zassert_not_equal(res, -1, "fcntl() failed: %d", i, errno); in ZTEST_USER_F()
25 res = zsock_fcntl(fixture->sv[i], F_SETFL, res | O_NONBLOCK); in ZTEST_USER_F()
26 zassert_not_equal(res, -1, "fcntl() failed: %d", i, errno); in ZTEST_USER_F()
29 res = zsock_send(fixture->sv[i], "x", 1, 0); in ZTEST_USER_F()
30 zassert_equal(res, -1, "expected send to fail"); in ZTEST_USER_F()
38 int res; in ZTEST_USER_F() local
[all …]
/Zephyr-latest/subsys/fs/
Dfat_fs.c120 FRESULT res; in fatfs_open() local
133 res = f_open(zfp->filep, translate_path(file_name), fs_mode); in fatfs_open()
135 if (res != FR_OK) { in fatfs_open()
140 return translate_error(res); in fatfs_open()
145 FRESULT res; in fatfs_close() local
147 res = f_close(zfp->filep); in fatfs_close()
153 return translate_error(res); in fatfs_close()
158 int res = -ENOTSUP; in fatfs_unlink() local
161 res = f_unlink(translate_path(path)); in fatfs_unlink()
163 res = translate_error(res); in fatfs_unlink()
[all …]
/Zephyr-latest/tests/posix/fs/src/
Dtest_fs_file.c17 int res; in test_file_open() local
19 res = open(TEST_FILE, O_CREAT | O_RDWR, 0660); in test_file_open()
20 if (res < 0) { in test_file_open()
21 TC_ERROR("Failed opening file: %d, errno=%d\n", res, errno); in test_file_open()
23 __ASSERT_NO_MSG(res >= 0); in test_file_open()
26 file = res; in test_file_open()
34 off_t res; in test_file_write() local
36 res = lseek(file, 0, SEEK_SET); in test_file_write()
37 if (res != 0) { in test_file_write()
38 TC_PRINT("lseek failed [%d]\n", (int)res); in test_file_write()
[all …]
Dtest_fs_dir.c22 int res; in test_mkdir() local
27 res = mkdir(TEST_DIR, S_IRWXG); in test_mkdir()
28 if (res) { in test_mkdir()
29 TC_PRINT("Error creating dir[%d]\n", res); in test_mkdir()
30 return res; in test_mkdir()
33 res = open(TEST_DIR_FILE, O_CREAT | O_RDWR, 0770); in test_mkdir()
35 if (res < 0) { in test_mkdir()
36 TC_PRINT("Failed opening file [%d]\n", res); in test_mkdir()
37 return res; in test_mkdir()
39 file = res; in test_mkdir()
[all …]
Dtest_fat_mount.c23 int res; in test_mount() local
25 res = fs_mount(&fatfs_mnt); in test_mount()
26 if (res < 0) { in test_mount()
27 TC_ERROR("Error mounting fs [%d]\n", res); in test_mount()
29 __ASSERT_NO_MSG(res == 0); in test_mount()
37 int res; in test_unmount() local
40 res = fs_unmount(&fatfs_mnt); in test_unmount()
41 if (res < 0) { in test_unmount()
42 TC_ERROR("Error unmounting fs [%d]\n", res); in test_unmount()
44 __ASSERT_NO_MSG(res == 0); in test_unmount()
/Zephyr-latest/samples/net/sockets/socketpair/src/
Dmain.c41 int res; in hello() local
45 res = write(fd, name, strlen(name)); in hello()
46 if (res < 0) { in hello()
48 } else if (res != strlen(name)) { in hello()
49 printf("only wrote %d/%d bytes", res, (int)strlen(name)); in hello()
53 res = read(fd, buf, sizeof(buf) - 1); in hello()
54 if (res < 0) { in hello()
56 } else if (res != strlen(name)) { in hello()
57 printf("only read %d/%d bytes", res, (int)strlen(name)); in hello()
86 int res = -1; in fd_to_idx() local
[all …]
/Zephyr-latest/tests/net/socket/poll/src/
Dmain.c36 int res; in ZTEST() local
54 res = zsock_bind(s_sock, (struct sockaddr *)&s_addr, sizeof(s_addr)); in ZTEST()
55 zassert_equal(res, 0, "bind failed"); in ZTEST()
57 res = zsock_connect(c_sock, (struct sockaddr *)&s_addr, sizeof(s_addr)); in ZTEST()
58 zassert_equal(res, 0, "connect failed"); in ZTEST()
68 res = zsock_poll(pollfds, ARRAY_SIZE(pollfds), 0); in ZTEST()
70 zassert_equal(res, 0, ""); in ZTEST()
82 res = zsock_poll(pollfds, ARRAY_SIZE(pollfds), 30); in ZTEST()
86 zassert_equal(res, 0, ""); in ZTEST()
93 res = zsock_poll(pollfds, ARRAY_SIZE(pollfds), 30); in ZTEST()
[all …]
/Zephyr-latest/subsys/net/lib/sntp/
Dsntp_simple.c15 int res; in sntp_simple_helper() local
21 res = sntp_init(&sntp_ctx, addr, addr_len); in sntp_simple_helper()
22 if (res < 0) { in sntp_simple_helper()
23 return res; in sntp_simple_helper()
37 res = sntp_query(&sntp_ctx, iter_timeout, ts); in sntp_simple_helper()
39 if (res != -ETIMEDOUT) { in sntp_simple_helper()
40 if (false == first_iter && -ERANGE == res) { in sntp_simple_helper()
41 while (-ERANGE == res) { in sntp_simple_helper()
48 res = sntp_recv_response(&sntp_ctx, iter_timeout, ts); in sntp_simple_helper()
51 if (res != ETIMEDOUT) { in sntp_simple_helper()
[all …]
/Zephyr-latest/drivers/sensor/tdk/icm42688/
Dicm42688_common.c22 int res; in icm42688_reset() local
30 res = icm42688_spi_single_write(&dev_cfg->spi, REG_DEVICE_CONFIG, BIT_SOFT_RESET); in icm42688_reset()
32 if (res) { in icm42688_reset()
34 return res; in icm42688_reset()
41 res = icm42688_spi_read(&dev_cfg->spi, REG_INT_STATUS, &value, 1); in icm42688_reset()
43 if (res) { in icm42688_reset()
44 return res; in icm42688_reset()
52 res = icm42688_spi_read(&dev_cfg->spi, REG_WHO_AM_I, &value, 1); in icm42688_reset()
53 if (res) { in icm42688_reset()
54 return res; in icm42688_reset()
[all …]
/Zephyr-latest/tests/net/lib/http_server/common/src/
Dmain.c161 HTTP_RESOURCE_FOREACH(service_A, res) { in ZTEST()
162 if (res == &resource_0) { in ZTEST()
164 } else if (res == &resource_1) { in ZTEST()
166 } else if (res == &resource_2) { in ZTEST()
171 res, &resource_0, &resource_1, &resource_2); in ZTEST()
183 HTTP_RESOURCE_FOREACH(service_B, res) { in ZTEST()
184 if (res == &resource_3) { in ZTEST()
186 } else if (res == &resource_4) { in ZTEST()
190 "res (%p) not equal to &resource_3 (%p) or &resource_4 (%p)", res, in ZTEST()
201 HTTP_SERVICE_FOREACH_RESOURCE(&service_C, res) { in ZTEST()
[all …]
/Zephyr-latest/subsys/net/lib/sockets/
Dsocketpair.c163 int res; in spair_delete() local
176 res = k_sem_take(&remote->sem, K_FOREVER); in spair_delete()
177 if (res == 0) { in spair_delete()
180 res = k_poll_signal_raise(&remote->readable, in spair_delete()
182 __ASSERT(res == 0, in spair_delete()
184 res); in spair_delete()
191 res = k_poll_signal_raise(&spair->writeable, SPAIR_SIG_CANCEL); in spair_delete()
192 __ASSERT(res == 0, "k_poll_signal_raise() failed: %d", res); in spair_delete()
221 int res; in spair_new() local
225 res = k_mem_slab_alloc(&spair_slab, (void **) &spair, K_NO_WAIT); in spair_new()
[all …]
/Zephyr-latest/tests/net/lib/coap_server/common/src/
Dmain.c159 COAP_RESOURCE_FOREACH(service_A, res) { in ZTEST()
160 if (res == &resource_0) { in ZTEST()
162 } else if (res == &resource_1) { in ZTEST()
166 "res (%p) not equal to &resource_0 (%p) or &resource_1 (%p)", res, in ZTEST()
179 COAP_RESOURCE_FOREACH(service_B, res) { in ZTEST()
180 if (res == &resource_2) { in ZTEST()
182 } else if (res == &resource_3) { in ZTEST()
186 "res (%p) not equal to &resource_2 (%p) or &resource_3 (%p)", res, in ZTEST()
199 COAP_RESOURCE_FOREACH(service_C, res) { in ZTEST()
200 if (res == &resource_4) { in ZTEST()
[all …]
/Zephyr-latest/tests/bluetooth/bt_crypto/src/
Dtest_bt_crypto.c34 uint8_t res[16]; in ZTEST() local
36 bt_crypto_aes_cmac(key, M, 0, res); in ZTEST()
37 zassert_mem_equal(res, exp_mac1, 16); in ZTEST()
39 bt_crypto_aes_cmac(key, M, 16, res); in ZTEST()
40 zassert_mem_equal(res, exp_mac2, 16); in ZTEST()
42 bt_crypto_aes_cmac(key, M, 40, res); in ZTEST()
43 zassert_mem_equal(res, exp_mac3, 16); in ZTEST()
45 bt_crypto_aes_cmac(key, M, 64, res); in ZTEST()
46 zassert_mem_equal(res, exp_mac4, 16); in ZTEST()
63 uint8_t res[16]; in ZTEST() local
[all …]
/Zephyr-latest/tests/net/socket/getaddrinfo/src/
Dmain.c228 struct zsock_addrinfo *res = NULL; in ZTEST() local
238 (void)zsock_getaddrinfo(QUERY_HOST, NULL, NULL, &res); in ZTEST()
247 zsock_freeaddrinfo(res); in ZTEST()
252 struct zsock_addrinfo *res = NULL; in ZTEST() local
255 ret = zsock_getaddrinfo(QUERY_HOST, NULL, NULL, &res); in ZTEST()
267 zsock_freeaddrinfo(res); in ZTEST()
272 struct zsock_addrinfo *res = NULL; in ZTEST() local
275 ret = zsock_getaddrinfo(NULL, NULL, NULL, &res); in ZTEST()
279 zassert_is_null(res, "ai_addr is not NULL"); in ZTEST()
281 zsock_freeaddrinfo(res); in ZTEST()
[all …]
/Zephyr-latest/drivers/flash/
Djesd216.c14 struct jesd216_instr *res) in extract_instr() argument
16 bool rv = (res != NULL); in extract_instr()
19 res->instr = packed >> 8; in extract_instr()
20 res->mode_clocks = (packed >> 5) & 0x07; in extract_instr()
21 res->wait_states = packed & 0x1F; in extract_instr()
29 struct jesd216_instr *res) in jesd216_bfp_read_support() argument
53 rv = extract_instr(dw4 >> 0, res); in jesd216_bfp_read_support()
60 rv = extract_instr(dw3 >> 16, res); in jesd216_bfp_read_support()
68 rv = extract_instr(dw17 >> 16, res); in jesd216_bfp_read_support()
76 rv = extract_instr(dw4 >> 16, res); in jesd216_bfp_read_support()
[all …]

12345678910>>...17