Home
last modified time | relevance | path

Searched refs:mqueue (Results 1 - 25 of 151) sorted by relevance

1234567

/kernel/liteos_a/testsuites/unittest/container/smoke/
H A DIt_ipc_container_003.cpp43 mqd_t mqueue; in childFunc() local
47 mqueue = mq_open(mqname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR, &attr); in childFunc()
48 if (mqueue == (mqd_t)-1) { in childFunc()
51 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in childFunc()
55 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in childFunc()
64 if (mqueue >= 0) { in childFunc()
65 ret = mq_close(mqueue); in childFunc()
96 mqd_t mqueue = mq_open(mqname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR, &attr); in IpcContainerUnshare() local
97 MQueueFinalizer mQueueFinalizer(mqueue, mqname); in IpcContainerUnshare()
99 ASSERT_NE(mqueue, (mqd_ in IpcContainerUnshare()
[all...]
H A DIt_ipc_container_002.cpp43 mqd_t mqueue; in childFunc() local
47 mqueue = mq_open(mqname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR, &attr); in childFunc()
48 if (mqueue == (mqd_t)-1) { in childFunc()
51 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in childFunc()
55 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in childFunc()
64 if (mqueue >= 0) { in childFunc()
65 ret = mq_close(mqueue); in childFunc()
82 mqd_t mqueue; in ItIpcContainer002() local
102 mqueue = mq_open(mqname, O_RDWR | O_CREAT, S_IRUSR | S_IWUSR, NULL); in ItIpcContainer002()
103 MQueueFinalizer mQueueFinalizer(mqueue, mqnam in ItIpcContainer002()
[all...]
/kernel/liteos_m/testsuites/sample/posix/mqueue/
H A DIt_posix_queue_018.c42 mqd_t mqueue; in Testcase() local
50 mqueue = mq_open(mqname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR, &attr); in Testcase()
51 ICUNIT_ASSERT_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue); in Testcase()
53 ret = mq_timedsend(mqueue, "1234567890123456789", QUEUE_MSG_SIZE, 0, &absTimeout); in Testcase()
56 ret = mq_receive(mqueue, msgrcd, QUEUE_MSG_SIZE, NULL); in Testcase()
59 ret = mq_close(mqueue); in Testcase()
62 mqueue = mq_open(mqname, O_RDWR | O_NONBLOCK, S_IRUSR | S_IWUSR, &attr); in Testcase()
63 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT in Testcase()
[all...]
H A DIt_posix_queue_051.c35 mqd_t mqueue; in Testcase() local
50 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
51 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT2); in Testcase()
53 ret = mq_send(mqueue, msgptr1, strlen(msgptr1), 0); in Testcase()
56 ret = mq_send(mqueue, msgptr2, strlen(msgptr2), 0); in Testcase()
59 ret = mq_send(mqueue, msgptr3, strlen(msgptr3), 0); in Testcase()
62 ret = mq_receive(mqueue, msgrcd, 0, NULL); in Testcase()
66 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
70 ret = mq_receive(mqueue, msgrc in Testcase()
[all...]
H A DIt_posix_queue_040.c36 mqd_t mqueue; in Testcase() local
46 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
47 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT2); in Testcase()
49 mqueue = (mqd_t)((UINTPTR)mqueue + PER_ADDED_VALUE); in Testcase()
50 ret = mq_receive(mqueue, msgrv, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
54 ret = mq_close((mqd_t)((UINTPTR)mqueue - PER_ADDED_VALUE)); in Testcase()
62 mq_close(mqueue); in Testcase()
H A DIt_posix_queue_038.c40 mqd_t mqueue; in Testcase() local
49 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
50 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT2); in Testcase()
52 ret = mq_send(mqueue, msgptr1, strlen(msgptr1), 0); in Testcase()
55 ret = mq_send(mqueue, msgptr2, strlen(msgptr2), 0); in Testcase()
58 ret = mq_receive(mqueue, msgrv1, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
61 ret = mq_receive(mqueue, msgrv2, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
73 ret = mq_close(mqueue); in Testcase()
81 mq_close(mqueue); in Testcase()
[all...]
H A DIt_posix_queue_002.c39 mqd_t mqueue; in Testcase() local
48 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
49 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
51 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
54 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
58 ret = mq_close(mqueue); in Testcase()
67 mq_close(mqueue); in Testcase()
H A DIt_posix_queue_022.c38 mqd_t mqueue; in Testcase() local
47 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
48 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
50 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
53 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
59 ret = mq_close(mqueue); in Testcase()
67 mq_close(mqueue); in Testcase()
H A DIt_posix_queue_032.c38 mqd_t mqueue; in Testcase() local
48 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
49 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
51 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
56 ret = mq_timedreceive(mqueue, msgrv, MQUEUE_STANDARD_NAME_LENGTH, NULL, &ts); in Testcase()
60 ret = mq_close(mqueue); in Testcase()
68 mq_close(mqueue); in Testcase()
H A DIt_posix_queue_035.c38 mqd_t mqueue; in Testcase() local
48 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
49 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
51 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
54 ret = mq_receive(mqueue, msgrv, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
58 ret = mq_close(mqueue); in Testcase()
66 mq_close(mqueue); in Testcase()
H A DIt_posix_queue_052.c38 mqd_t mqueue; in Testcase() local
48 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
49 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT2); in Testcase()
51 ret = mq_send(mqueue, NULL, 0, 0); in Testcase()
55 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
58 ret = mq_close(mqueue); in Testcase()
66 mq_close(mqueue); in Testcase()
/kernel/liteos_a/testsuites/unittest/libc/posix/mqueue/smoke/
H A DIt_posix_queue_028.cpp43 mqd_t mqueue; in Testcase() local
51 mqueue = mq_open(mqname, O_CREAT | O_RDWR | O_EXCL, S_IRUSR | S_IWUSR, &attr); in Testcase()
52 ICUNIT_ASSERT_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue); in Testcase()
54 ret = mq_timedsend(mqueue, "1234567890123456789", queue_msg_size, 0, &absTimeout); in Testcase()
57 ret = mq_receive(mqueue, msgrcd, queue_msg_size, NULL); in Testcase()
60 ret = mq_close(mqueue); in Testcase()
63 mqueue = mq_open(mqname, O_RDWR | O_NONBLOCK, S_IRUSR | S_IWUSR, &attr); in Testcase()
64 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT in Testcase()
[all...]
/kernel/liteos_a/testsuites/unittest/libc/posix/mqueue/full/
H A DIt_posix_queue_159.cpp40 mqd_t mqueue[LOSCFG_BASE_IPC_QUEUE_CONFIG + 1]; in Testcase() local
50 mqueue[i] = mq_open(mqname[i], O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
51 ICUNIT_GOTO_NOT_EQUAL(mqueue[i], (mqd_t)-1, mqueue[i], EXIT); in Testcase()
57 mqueue[i] = mq_open(mqname[i], O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
58 ICUNIT_GOTO_EQUAL(mqueue[i], (mqd_t)(-1), mqueue[i], EXIT); in Testcase()
60 mqueue[i] = (mqd_t)(-1); in Testcase()
63 ret = mq_send(mqueue[i], msgptr, strlen(msgptr), 0); in Testcase()
67 ret = mq_receive(mqueue[ in Testcase()
[all...]
H A DIt_posix_queue_187.cpp37 mqd_t mqueue; in Testcase() local
43 mqueue = mq_open(mqname, O_CREAT | O_NONBLOCK, S_IRUSR | S_IWUSR, 0); in Testcase()
44 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
46 ret = mq_close(mqueue); in Testcase()
52 mqueue = mq_open(mqname, O_CREAT | 0, S_IRUSR | S_IWUSR, 0); in Testcase()
53 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
55 ret = mq_close(mqueue); in Testcase()
63 mq_close(mqueue); in Testcase()
[all...]
H A DIt_posix_queue_157.cpp40 mqd_t mqueue[LOSCFG_BASE_IPC_QUEUE_CONFIG + 2]; in Testcase() local
50 mqueue[i] = mq_open(mqname[i], O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
51 ICUNIT_GOTO_NOT_EQUAL(mqueue[i], (mqd_t)-1, mqueue[i], EXIT); in Testcase()
57 mqueue[i] = mq_open(mqname[i], O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
58 ICUNIT_GOTO_EQUAL(mqueue[i], (mqd_t)-1, mqueue[i], EXIT); in Testcase()
61 ret = mq_send(mqueue[(count - 1)], msgptr, strlen(msgptr), 0); in Testcase()
64 ret = mq_receive(mqueue[(count - 1)], msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
69 ret = mq_close(mqueue[ in Testcase()
[all...]
H A DIt_posix_queue_163.cpp39 mqd_t mqueue[LOSCFG_BASE_IPC_QUEUE_CONFIG + 1]; in Testcase() local
47 mqueue[i] = mq_open(mqname[i], O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
48 ICUNIT_GOTO_NOT_EQUAL(mqueue[i], (mqd_t)-1, mqueue[i], EXIT); in Testcase()
54 mqueue[i] = mq_open(mqname[i], O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
55 ICUNIT_GOTO_EQUAL(mqueue[i], (mqd_t)-1, mqueue[i], EXIT1); in Testcase()
60 ret = mq_send(mqueue[i], msgptr, strlen(msgptr), 0); in Testcase()
65 ret = mq_close(mqueue[i]); in Testcase()
74 mq_close(mqueue[ in Testcase()
[all...]
H A DIt_posix_queue_070.cpp36 mqd_t mqueue; in Testcase() local
51 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
52 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
54 ret = mq_send(mqueue, msgptr1, strlen(msgptr1), 0); in Testcase()
57 ret = mq_send(mqueue, msgptr2, strlen(msgptr2), 0); in Testcase()
60 ret = mq_send(mqueue, msgptr3, strlen(msgptr3), 0); in Testcase()
63 ret = mq_receive(mqueue, msgrcd, 0, NULL); in Testcase()
67 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
71 ret = mq_receive(mqueue, msgrc in Testcase()
[all...]
H A DIt_posix_queue_057.cpp37 mqd_t mqueue; in Testcase() local
47 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
48 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
50 mqueue = (mqd_t)((UINTPTR)mqueue + PER_ADDED_VALUE); in Testcase()
51 ret = mq_receive(mqueue, msgrv, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
55 ret = mq_close((mqd_t)((UINTPTR)mqueue - PER_ADDED_VALUE)); in Testcase()
63 mq_close(mqueue); in Testcase()
H A DIt_posix_queue_106.cpp38 mqd_t mqueue; in Testcase() local
48 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
49 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
51 mqueue = (mqd_t)((UINTPTR)mqueue + PER_ADDED_VALUE); in Testcase()
54 ret = mq_timedreceive(mqueue, msgrv, MQUEUE_STANDARD_NAME_LENGTH, NULL, &ts); in Testcase()
58 ret = mq_close((mqd_t)((UINTPTR)mqueue - PER_ADDED_VALUE)); in Testcase()
66 mq_close(mqueue); in Testcase()
H A DIt_posix_queue_055.cpp41 mqd_t mqueue; in Testcase() local
50 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
51 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
53 ret = mq_send(mqueue, msgptr1, strlen(msgptr1), 0); in Testcase()
56 ret = mq_send(mqueue, msgptr2, strlen(msgptr2), 0); in Testcase()
59 ret = mq_receive(mqueue, msgrv1, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
62 ret = mq_receive(mqueue, msgrv2, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
74 ret = mq_close(mqueue); in Testcase()
82 mq_close(mqueue); in Testcase()
[all...]
H A DIt_posix_queue_164.cpp41 mqd_t mqueue; in Testcase() local
50 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
51 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
53 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
56 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
61 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
65 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
69 ret = mq_close(mqueue); in Testcase()
77 mq_close(mqueue); in Testcase()
[all...]
H A DIt_posix_queue_168.cpp41 mqd_t mqueue; in Testcase() local
51 mqueue = mq_open(mqname, FNONBLOCK | O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
52 ICUNIT_ASSERT_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue); in Testcase()
54 ret = mq_send(mqueue, msgptr, strlen(msgptr), MQUEUE_PRIORITY_TEST + 6); // 6, Mqueue priority. in Testcase()
58 ret = mq_send(mqueue, msgptr, strlen(msgptr), MQUEUE_PRIORITY_TEST + 10); // 10, Mqueue priority. in Testcase()
62 ret = mq_send(mqueue, msgptr, strlen(msgptr), MQUEUE_PRIORITY_TEST + 2); // 2, Mqueue priority. in Testcase()
66 ret = mq_send(mqueue, msgptr, strlen(msgptr), MQUEUE_PRIORITY_TEST + 8); // 8, Mqueue priority. in Testcase()
70 ret = mq_send(mqueue, msgptr, strlen(msgptr), MQUEUE_PRIORITY_TEST + 1); in Testcase()
74 ret = mq_receive(mqueue, msgrc in Testcase()
[all...]
H A DIt_posix_queue_206.cpp39 mqd_t mqueue; in Child() local
44 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, nullptr); in Child()
45 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT); in Child()
49 ret = mq_notify(mqueue, &notification); in Child()
55 ret = mq_notify(mqueue, &notification); in Child()
65 ret = mq_notify(mqueue, &notification); in Child()
72 ret = mq_notify(mqueue, &notification); in Child()
84 ret = mq_notify(mqueue, nullptr); in Child()
93 ret = mq_notify(mqueue, in Child()
[all...]
H A DIt_posix_queue_002.cpp40 mqd_t mqueue; in Testcase() local
49 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
50 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT2); in Testcase()
52 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
55 ret = mq_receive(mqueue, msgrcd, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
59 ret = mq_close(mqueue); in Testcase()
68 mq_close(mqueue); in Testcase()
H A DIt_posix_queue_052.cpp39 mqd_t mqueue; in Testcase() local
49 mqueue = mq_open(mqname, O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, &attr); in Testcase()
50 ICUNIT_GOTO_NOT_EQUAL(mqueue, (mqd_t)-1, mqueue, EXIT1); in Testcase()
52 ret = mq_send(mqueue, msgptr, strlen(msgptr), 0); in Testcase()
55 ret = mq_receive(mqueue, msgrv, MQUEUE_STANDARD_NAME_LENGTH, NULL); in Testcase()
59 ret = mq_close(mqueue); in Testcase()
67 mq_close(mqueue); in Testcase()

Completed in 6 milliseconds

1234567