<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">This isn't really a solution - but I'd strongly recommend getting this working on the same node first (multiple vms, but the same node), and then moving on to multiple nodes…<div><br></div><div>cheers<br><div><div>
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin: 0in 0in 0.0001pt; "><font class="Apple-style-span" color="#1f497d" face="Calibri, sans-serif"><span class="Apple-style-span" style="font-size: 15px; "><b><i><div style="margin: 0px; font-style: normal; font-weight: normal; font-family: Calibri; "><a href="http://www.gravatar.com/avatar/204a87f81a0d9764c1f3364f53e8facf.png"><b><i>Mahesh Paolini-Subramanya</i></b></a></div></i></b></span></font></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); ">That Tall Bald Indian Guy...</span></div></div><div style="margin: 0in 0in 0.0001pt; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(31, 73, 125); "><div style="margin: 0px; font-family: Calibri; color: rgb(1, 108, 226); "><span style="text-decoration: underline; "><a href="https://plus.google.com/u/0/108074935470209044442/posts">Google+</a></span><span style="color: rgb(31, 73, 125); ">  | <a href="http://dieswaytoofast.blogspot.com/"><span style="color: rgb(1, 108, 226); ">Blog</span></a></span><span style="text-decoration: underline; "> </span><span style="color: rgb(31, 73, 125); ">  | <span style="color: rgb(1, 108, 226); "><a href="https://twitter.com/dieswaytoofast">Twitter</a></span></span><span style="color: rgb(31, 73, 125); ">  | </span><a href="http://www.linkedin.com/in/dieswaytoofast">LinkedIn</a></div></span></div></div>
</div>
<br><div><div>On Jul 19, 2013, at 8:31 AM, Fred Hebert <<a href="mailto:mononcqc@ferd.ca">mononcqc@ferd.ca</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Answers inline.<br><br>On 07/18, Sylvain Benner wrote:<br><blockquote type="cite">I'm currently learning Common Test via the great LYSE book and I am not<br>able to make the distributed tests work.<br><br></blockquote><br>Glad you like it! Let's see for the CT stuff.<br><br><blockquote type="cite">%%<br>------------------------------------------------------------------------------<br>{node, a, '<a href="mailto:a@localhost.local">a@localhost.local</a>'}.<br>{node, b, '<a href="mailto:b@localhost.local">b@localhost.local</a>'}.<br></blockquote>< [...]<br><blockquote type="cite">------------------------------------------------------------------------------<br><br>1) If I create manually the nodes a and b, the spec runs flawlessly.<br>2) If I don't than I've got boot_timeout errors:<br><br>%%<br>------------------------------------------------------------------------------<br>(ct@localhost)13> ct_master:run("dist.spec").<br>=== Master Logdir ===<br></blockquote><br>First problem is right here! You started a node with a short name<br>(-sname) but the spec mentions nodes with long names (-name, using a '.'<br>in their name elevates them to FQDN). Start the master node with<br><br>    erl -name <a href="mailto:ct@localhost.local">ct@localhost.local</a> ...<br><br>And it should probably fix it. It's not possible for a short name node<br>to discuss with a long-name node.<br><br><blockquote type="cite"><br>I dug into ct_slave.erl and replicated the ssh commands of<br>spawn_remote_node/3 in a shell:<br><br>%%<br>------------------------------------------------------------------------------<br>(<a href="mailto:testssh@localhost.local">testssh@localhost.local</a>)5> {ok, SSHConnRef} =<br>ssh:connect("localhost.local", 22, []).<br>ssh password:<br>...<br>(<a href="mailto:testssh@localhost.local">testssh@localhost.local</a>)9> net_adm:ping('<a href="mailto:node_from_ssh@localhost.local">node_from_ssh@localhost.local</a>').<br>pong<br>%%<br>------------------------------------------------------------------------------<br><br>It works.<br><br></blockquote><br>And I would expect so given your node name tells me this one is actually<br>using a long name to connect! That sounds like a confirmation for the<br>soliution.<br><br><blockquote type="cite">So here are the questions:<br><br>1) Do you have any idea about the ssh_connection:setenv failure ?<br></blockquote><br>No specific idea, but I'm guessing it's the name of the nodes that is<br>your first issue. Once that's cleared, you can check and try over again.<br><br><blockquote type="cite">2) Do I need ct_master to test a protocol ? What is the erlang way for<br>testing protocols between 2 nodes ?<br></blockquote><br>To test between two nodes it can make sense to have two nodes. I like to<br>try and find ways to avoid that, although it's not necessarily easy. For<br>most TCP-based protocols, I try to just have the test code have a<br>'trusted' side and spawn a server, my test behaving as the client, or<br>the other way around. It helps to test some behaivour, but not all of<br>it.<br><br>If you've got more time and want to make sure the protocol stands on its<br>own, I would look into Quickcheck or PropEr as a way to model everything<br>and do fancier testing. It's considerably trickier to get things right<br>in there if you haven't done it before, though.<br><br>Regards,<br>Fred.<br>_______________________________________________<br>erlang-questions mailing list<br><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>http://erlang.org/mailman/listinfo/erlang-questions<br></blockquote></div><br></div></div></body></html>