[general]
-#profile = profile.Main2017_KantM
-profile = profile.tizen_phone_arm64_3_0
+profile = repo.tzmb_3.0_TM1_base
[obs.tizen_org]
url = https://api.tizen.org
############################################# Profile [profile.tzmb_3.0_TM2]
[repo.tzmb_3.0_TM2_base]
-#url = http://download.tizen.org/snapshots/tizen/base/tizen-base_20170421.1/repos/arm64/packages/
url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm64/packages/
[repo.tzmb_3.0_TM2_srk]
url = http://106.125.46.44/repo/tm2/packages/
[repo.tzmb_4.0_unified]
-#url = http://download.tizen.org/snapshots/tizen/unified/tizen-unified_20170421.1/repos/standard/packages/
url = http://download.tizen.org/snapshots/tizen/unified/latest/repos/standard/packages/
[profile.tzmb_3.0_TM2]
return "FAIL";
}
+ pid_t getPeerPid()
+ {
+ return service->getPeerPid();
+ }
+
+ pid_t getChildPid()
+ {
+ return getpid();
+ }
+
static AgentInterface& instance()
{
static AgentInterface _instance_;
{
service.reset(new rmi::Service(RMI_SERVICE_ADDRESS));
service->registerParametricMethod(this, (string)(AgentInterface::handshake)(string));
+ service->registerNonparametricMethod(this, (pid_t)(AgentInterface::getPeerPid)());
+ service->registerNonparametricMethod(this, (pid_t)(AgentInterface::getChildPid)());
}
~AgentInterface()
* 2. Connect client to service from parent process
* 3. Check correct handshake call
* 4. Check incorrect handshake call
- * 5. Disconnect client
+ * 5. Check client pid and service pid
+ * 6. Disconnect client
+ * 7. Kill service process
*/
TEST(test_rmi, handshakeCorrect)
{
ASSERT_NO_THROW(client.connect());
ASSERT_EQ("SYN-ACC", client.methodCall<string>("AgentInterface::handshake", string("SYN")));
ASSERT_EQ("FAIL", client.methodCall<string>("AgentInterface::handshake", string("NOTSYN")));
+ pid_t peerPid = client.methodCall<pid_t>("AgentInterface::getPeerPid");
+ pid_t childPid = client.methodCall<pid_t>("AgentInterface::getChildPid");
ASSERT_NO_THROW(client.disconnect());
+
+ // kill child process
+ ASSERT_EQ(peerPid, getpid());
+ ASSERT_TRUE(childPid > 0);
+ ASSERT_TRUE(childPid < 65000);
+ kill(childPid, SIGKILL);
}
else
{
FAIL();
- }
+ }
}