#define MAX_BUF_SIZE 4096
#define TEST_PATH "/run/.sensord_test.socket"
+#define SLEEP_1S sleep(1)
typedef bool (*process_func_t)(const char *msg, int size, int count);
msg.enclose(buf, MAX_BUF_SIZE);
- usleep(10000);
+ SLEEP_1S;
ch->send_sync(&msg);
/* Test */
- sleep(1);
+ SLEEP_1S;
ch->read_sync(reply);
reply.disclose(buf);
msg.enclose(buf, MAX_BUF_SIZE);
- usleep(10000);
+ SLEEP_1S;
int buf_size;
ch->get_option(SO_RCVBUF, buf_size);
msg.enclose(buf, MAX_BUF_SIZE);
- usleep(10000);
+ SLEEP_1S;
for (int i = 0; i < 256; ++i) {
ch->send_sync(&msg);
msg.enclose("TESTTESTTEST", 12);
ch[0]->send_sync(&msg);
- usleep(100000);
+ SLEEP_1S;
ch[0]->read_sync(reply);
reply.disclose(buf);
ret = strncmp(buf, "TEXTTEXTTEXTTEXT", 16);
msg.enclose("TESTTESTTEST", 12);
ch[1]->send_sync(&msg);
- usleep(100000);
+ SLEEP_1S;
ch[1]->read_sync(reply);
reply.disclose(buf);
ret = strncmp(buf, "TEXTTEXTTEXTTEXT", 16);
msg.enclose("TESTTESTTEST", 12);
ch->send_sync(&msg);
- usleep(100000);
+ SLEEP_1S;
ch->read_sync(reply);
reply.disclose(buf);
pid_t pid = run_process(run_ipc_server_echo, NULL, 0, 0);
EXPECT_GE(pid, 0);
- usleep(100000);
+ SLEEP_1S;
for (int i = 0; i < 3; ++i) {
pid = run_process(run_ipc_client_1M, NULL, 0, 0);
bool ret = run_ipc_client_sleep_10s(NULL, 0, 0);
ASSERT_TRUE(ret);
- usleep(100000);
+ SLEEP_1S;
return true;
}
pid_t pid = run_process(run_ipc_server_echo, NULL, 0, 0);
EXPECT_GE(pid, 0);
- usleep(100000);
+ SLEEP_1S;
for (int i = 0; i < 3; ++i) {
pid = run_process(run_ipc_client_1M, NULL, 0, 0);
bool ret = run_ipc_client_small_buffer(NULL, 0, 0);
ASSERT_TRUE(ret);
- usleep(100000);
+ SLEEP_1S;
return true;
}
pid_t pid = run_process(run_ipc_server_echo, NULL, 0, 0);
EXPECT_GE(pid, 0);
- usleep(100000);
+ SLEEP_1S;
for (int i = 0; i < 30; ++i) {
pid = run_process(run_ipc_client_1M, NULL, 0, 0);
bool ret = run_ipc_client_1M(NULL, 0, 0);
ASSERT_TRUE(ret);
- usleep(100000);
+ SLEEP_1S;
return true;
}
pid_t pid = run_process(run_ipc_server, NULL, 0, 0);
EXPECT_GE(pid, 0);
- usleep(100000);
+ SLEEP_1S;
bool ret = run_ipc_client_2_channel_message(NULL, 0, 0);
ASSERT_TRUE(ret);
- usleep(100000);
+ SLEEP_1S;
return true;
}
pid_t pid = run_process(run_ipc_server, NULL, 0, 0);
EXPECT_GE(pid, 0);
- usleep(100000);
+ SLEEP_1S;
bool ret = run_ipc_client_2_channel(NULL, 0, 0);
ASSERT_TRUE(ret);
- usleep(100000);
+ SLEEP_1S;
return true;
}
pid_t pid = run_process(run_ipc_server, NULL, 0, 0);
EXPECT_GE(pid, 0);
- usleep(100000);
+ SLEEP_1S;
for (int i = 0; i < 99; ++i) {
pid = run_process(run_ipc_client, NULL, 0, 0);
bool ret = run_ipc_client(NULL, 0, 0);
ASSERT_TRUE(ret);
- usleep(100000);
+ SLEEP_1S;
return true;
}
pid_t pid = run_process(run_ipc_server, NULL, 0, 0);
EXPECT_GE(pid, 0);
- usleep(100000);
+ SLEEP_1S;
pid = run_process(run_ipc_client, NULL, 0, 0);
EXPECT_GE(pid, 0);
bool ret = run_ipc_client(NULL, 0, 0);
ASSERT_TRUE(ret);
- usleep(100000);
+ SLEEP_1S;
return true;
}
pid_t pid = run_process(run_ipc_server, NULL, 0, 0);
EXPECT_GE(pid, 0);
- usleep(100000);
+ SLEEP_1S;
bool ret = run_ipc_client(NULL, 0, 0);
ASSERT_TRUE(ret);
- usleep(100000);
+ SLEEP_1S;
return true;
}