/kernel/liteos_a/testsuites/unittest/libc/io/full/ |
H A D | IO_test_pselect_001.cpp | 42 int pipeFd[2], ret; /* 2, pipe return 2 file descirpter */ in Testcase1() local 44 ret = pipe(pipeFd); in Testcase1() 46 ret = write(pipeFd[1], "Hello World", TAR_STR_LEN); in Testcase1() 49 FD_SET(pipeFd[0], &reads); in Testcase1() 50 ret = select(pipeFd[0] + 1, &reads, nullptr, nullptr, nullptr); in Testcase1() 52 ret = FD_ISSET(pipeFd[0], &reads); in Testcase1() 54 close(pipeFd[0]); in Testcase1() 55 close(pipeFd[1]); in Testcase1() 58 close(pipeFd[0]); in Testcase1() 59 close(pipeFd[ in Testcase1() 70 int pipeFd[2]; /* 2, pipe id num */ testcase() local [all...] |
H A D | IO_test_epoll_001.cpp | 45 int pipeFd[2]; /* 2, pipe id num */ in testcase() local 56 retval = pipe(pipeFd); in testcase() 61 FD_SET(pipeFd[0], &rfds); in testcase() 68 retval = epoll_ctl(epFd, EPOLL_CTL_ADD, pipeFd[0], &ev); in testcase() 73 close(pipeFd[1]); in testcase() 78 close(pipeFd[0]); in testcase() 87 close(pipeFd[0]); in testcase() 88 retval = write(pipeFd[1], "0123456789012345678901234567890123456789", 40); /* write 40 bytes to stdin(fd 0) */ in testcase() 90 close(pipeFd[1]); in testcase() 100 close(pipeFd[ in testcase() [all...] |
H A D | It_stdlib_poll_003.cpp | 43 int pipeFd[2], ret, err; // 2, pipe return 2 file descirpter in Testcase() local 52 ret = pipe(pipeFd); in Testcase() 54 ret = write(pipeFd[1], "hello world", TEST_STR_LEN); in Testcase() 58 pollFd.fd = pipeFd[0]; in Testcase() 74 close(pipeFd[0]); in Testcase() 75 close(pipeFd[1]); in Testcase() 78 close(pipeFd[0]); in Testcase() 79 close(pipeFd[1]); in Testcase()
|
H A D | IO_test_epoll_002.cpp | 51 int pipeFd[2]; /* 2, pipe id num */ in testcase() local 77 retval = pipe(pipeFd); in testcase() 82 FD_SET(pipeFd[0], &rfds); in testcase() 92 retval = epoll_ctl(epFd, EPOLL_CTL_ADD, pipeFd[0], &ev); in testcase() 98 close(pipeFd[1]); in testcase() 101 evWait[0].data.fd = pipeFd[0]; in testcase() 104 close(pipeFd[0]); in testcase() 113 close(pipeFd[0]); in testcase() 120 close(pipeFd[1]); in testcase() 131 close(pipeFd[ in testcase() [all...] |
H A D | IO_test_pselect_002.cpp | 51 int pipeFd[2]; /* 2, pipe id num */ in testcase() local 75 retval = pipe(pipeFd); in testcase() 80 FD_SET(pipeFd[0], &rfds); in testcase() 88 close(pipeFd[1]); in testcase() 90 retval = pselect(pipeFd[0] + 1, &rfds, nullptr, nullptr, &tv, &mask); in testcase() 92 close(pipeFd[0]); in testcase() 101 close(pipeFd[0]); in testcase() 108 close(pipeFd[1]); in testcase()
|
/kernel/liteos_a/testsuites/unittest/extended/signal/full/ |
H A D | It_ipc_fdset_001.cpp | 39 int pipeFd[TEST_LOOP_NUM][2], ret, i; // 2, pipe return 2 file descirpter in Testcase() local 48 ret = pipe(pipeFd[i]); in Testcase() 50 fdmax = pipeFd[i][1] > fdmax ? pipeFd[i][1] : fdmax; in Testcase() 51 fdmax = pipeFd[i][0] > fdmax ? pipeFd[i][0] : fdmax; in Testcase() 52 ret = write(pipeFd[i][1], "Aloha World", TAR_STR_LEN); in Testcase() 60 FD_SET(pipeFd[0][0], &reads); in Testcase() 63 ret = FD_ISSET(pipeFd[0][0], &reads); in Testcase() 66 FD_SET(pipeFd[ in Testcase() [all...] |
H A D | It_ipc_fdclr_001.cpp | 38 int pipeFd[TEST_LOOP_NUM][2], ret, i; // 2, pipe return 2 file descirpter in Testcase() local 46 ret = pipe(pipeFd[i]); in Testcase() 48 fdmax = pipeFd[i][1] > fdmax ? pipeFd[i][1] : fdmax; in Testcase() 49 ret = write(pipeFd[i][1], "aloha world", TAR_STR_LEN); in Testcase() 57 FD_SET(pipeFd[0][0], &reads); in Testcase() 60 ret = FD_ISSET(pipeFd[0][0], &reads); in Testcase() 62 FD_SET(pipeFd[1][0], &reads); in Testcase() 63 FD_SET(pipeFd[2][0], &reads); // 2, pipe return on the 2nd loop in Testcase() 64 FD_SET(pipeFd[ in Testcase() [all...] |
H A D | It_ipc_fdzero_001.cpp | 39 int pipeFd[TEST_LOOP_NUM][2], ret, i; // 2, pipe return 2 file descirpter in Testcase() local 48 ret = pipe(pipeFd[i]); in Testcase() 50 fdmax = pipeFd[i][1] > fdmax ? pipeFd[i][1] : fdmax; in Testcase() 51 ret = write(pipeFd[i][1], "Aloha world", TAR_STR_LEN); in Testcase() 59 FD_SET(pipeFd[0][0], &reads); in Testcase() 62 ret = FD_ISSET(pipeFd[0][0], &reads); in Testcase() 65 FD_SET(pipeFd[1][0], &reads); in Testcase() 66 FD_SET(pipeFd[2][0], &reads); // 2, pipe return on the 2nd loop in Testcase() 67 FD_SET(pipeFd[ in Testcase() [all...] |
H A D | It_ipc_pipe_003.cpp | 38 int pipeFd[2], ret, spid; // 2, pipe return 2 file descripter in Testcase() local 43 ret = pipe(pipeFd); in Testcase() 54 close(pipeFd[0]); in Testcase() 55 ret = write(pipeFd[1], "Hello world", TAR_STR_LEN); in Testcase() 61 close(pipeFd[1]); in Testcase() 64 close(pipeFd[1]); in Testcase() 69 ret = read(pipeFd[0], buffer, TAR_STR_LEN); in Testcase() 78 close(pipeFd[0]); in Testcase() 81 close(pipeFd[0]); in Testcase()
|
H A D | It_ipc_pipe_002.cpp | 36 int pipeFd[2], ret, spid; // 2, pipe return 2 file descripter in Testcase() local 41 ret = pipe(pipeFd); in Testcase() 52 close(pipeFd[0]); in Testcase() 53 ret = write(pipeFd[1], "hello world", 12); // 12, "hello world" length and '\0' in Testcase() 59 close(pipeFd[1]); in Testcase() 62 close(pipeFd[1]); in Testcase() 67 ret = read(pipeFd[0], buffer, 12); // 12, "hello world" length and '\0' in Testcase() 76 close(pipeFd[0]); in Testcase() 79 close(pipeFd[0]); in Testcase()
|
/kernel/liteos_a/testsuites/unittest/extended/signal/smoke/ |
H A D | It_ipc_fdisset_001.cpp | 38 int pipeFd[2], ret; // 2, pipe return 2 file descirpter in Testcase() local 40 ret = pipe(pipeFd); in Testcase() 42 ret = write(pipeFd[1], "Hello World", TAR_STR_LEN); in Testcase() 46 FD_SET(pipeFd[0], &reads); in Testcase() 47 ret = select(pipeFd[0] + 1, &reads, NULL, NULL, NULL); in Testcase() 49 ret = FD_ISSET(pipeFd[0], &reads); in Testcase() 51 close(pipeFd[0]); in Testcase() 52 close(pipeFd[1]); in Testcase() 56 close(pipeFd[0]); in Testcase() 57 close(pipeFd[ in Testcase() [all...] |