<div>After trying some different things with Ahmed, I've found out that the problem is the config file I'm passing to the slave nodes:<br></div><div><br></div><div><font face="courier new,monospace">[{kernel,
 [{distributed, [{m8ball,
                  5000,
                 ['<a href="mailto:a@li101-172.members.linode.com">a@li101-172.members.linode.com</a>', '<a href="mailto:b@li101-172.members.linode.com">b@li101-172.members.linode.com</a>']}]},
  {sync_nodes_mandatory, ['<a href="mailto:b@li101-172.members.linode.com">b@li101-172.members.linode.com</a>']},
  {sync_nodes_timeout, 5000}
 ]
}
].</font></div><div><br></div><div>This seems to override a few values needed by ct_slave when using distributed applications. Removing the config file solves the application:which_applications() problem.</div><div><br></div>

<div>What would be the best way to test distributed OTP applications with CT, then?</div><br><div class="gmail_quote">On Mon, Feb 13, 2012 at 7:34 AM, Fred Hebert <span dir="ltr"><<a href="mailto:mononcqc@gmail.com">mononcqc@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I tried it with R14B04 also, and it still doesn't work for me. I'll try a few more things to try and discover what it might be. I'm a bit surprised this can even happen in the first place, though.<div class="HOEnZb">

<div class="h5"><br><br><div class="gmail_quote">
On Mon, Feb 13, 2012 at 5:44 AM, Ahmed Omar <span dir="ltr"><<a href="mailto:spawn.think@gmail.com" target="_blank">spawn.think@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


I tried to reproduce it using same steps, but i get this when i use <span style="font-family:'courier new',monospace">ct:pal("~p",[application:</span><span style="font-family:'courier new',monospace">which_applications()])</span><div>



<font face="'courier new', monospace">i get</font></div><div><font face="'courier new', monospace"><div><br></div><div>*** User  2012-02-13 11:39:24.901 ***</div><div>[{crypto,"CRYPTO version 2","2.0.4"},</div>


<div>
<div> {stdlib,"ERTS  CXC 138 10","1.17.5"},</div><div> {kernel,"ERTS  CXC 138 10","2.14.5"}]</div></div></font><div><br></div><div>maybe i'm doing something different..</div><div>


<br>
</div>i'm using Erlang R14B04 (erts-5.8.5)</div><div><div><div><br><div class="gmail_quote">On Sun, Feb 12, 2012 at 4:59 PM, Fred Hebert <span dir="ltr"><<a href="mailto:mononcqc@gmail.com" target="_blank">mononcqc@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>I start them with distributed test specifications:<br></div><div><br></div><div>{n<font face="courier new,monospace">ode, master, 'ct@ferdmbp.local'}.</font></div>



<div><font face="courier new,monospace">{node, a, 'a@ferdmbp.local'}.</font></div>

<div><font face="courier new,monospace">{node, b, 'b@ferdmbp.local'}.</font></div><div><font face="courier new,monospace"><br></font></div><div><font face="courier new,monospace">{init, a, [{node_start, </font><font face="courier new,monospace">[{monitor_master, true},</font></div>





<div><font face="courier new,monospace">                         {boot_timeout, 10},</font></div><div><font face="courier new,monospace">                         {startup_functions, [{application,start,[crypto]},</font></div>





<div><font face="courier new,monospace">                                              {application,start,[m8ball]}]},</font></div><div><font face="courier new,monospace">                         {erl_flags, "-pa /Users/ferd/code/self/learn-you-some-erlang/m8ball/ebin/</font><font face="courier new,monospace">"</font></div>





<div><font face="courier new,monospace">                                     "-config dist_m8ball_SUITE_data/main.config"}]}]}.</font></div><div><font face="courier new,monospace">{init, b, [{node_start, [{monitor_master, true},</font></div>





<div><font face="courier new,monospace">                         {boot_timeout, 10},</font></div><div><font face="courier new,monospace">                         {startup_functions, </font><font face="courier new,monospace">[{application,start,[crypto]},</font></div>





<div><font face="courier new,monospace">                                              {application,start,[m8ball]}]},</font></div><div><font face="courier new,monospace">                         {erl_flags, "-pa /Users/ferd/code/self/learn-you-some-erlang/m8ball/ebin/ "</font></div>





<div><font face="courier new,monospace">                                     "-config dist_m8ball_SUITE_data/backup.config"}]}]}.</font></div><div><br></div><div>And I start it with:</div><div><font face="courier new,monospace"><br>





</font></div><div><font face="courier new,monospace">$ erl -name ct -pa ../ebin/</font></div><div><font face="courier new,monospace">Erlang R15B (erts-5.9) [source] [64-bit] [smp:4:4] [async-threads:0] [hipe] [kernel-poll:false]

Eshell V5.9  (abort with ^G)</font></div><div><font face="courier new,monospace"><br></font></div><div><font face="courier new,monospace">(ct@ferdmbp.local)1> ct_master:run("m8ball_dist.spec").</font></div><div>





<br></div><div>And whenever I use <font face="courier new,monospace">ct:pal("~p",[application:which_applications()])</font> in the suite, I get [] as a result. Further inspection shows that the distributed applications I have are read by the controllers, but stdlib and kernel are not started.</div>



<div><div>

<div><br></div><br><div class="gmail_quote">On Sun, Feb 12, 2012 at 5:45 AM, Ahmed Omar <span dir="ltr"><<a href="mailto:spawn.think@gmail.com" target="_blank">spawn.think@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





Hi Fred, <div>1- How do you start the ct_slave nodes?</div><div><div>(ct@omarmb)1> ct_slave:start(omarmb, testnode,[]).</div><div>{ok,testnode@omarmb}</div><div>(ct@omarmb)2> rpc:call('testnode@omarmb', application, which_applications,[]).</div>






<div>[{stdlib,"ERTS  CXC 138 10","1.17.5"},</div><div> {kernel,"ERTS  CXC 138 10","2.14.5"}]</div><div><br></div><div>2- You can use erl_flags to specify more options to your slave node, e.g: </div>






<div><div>(ct@omarmb)3> ct_slave:start(omarmb, testnode1,[{erl_flags, "-s mnesia"}]).</div><div>{ok,testnode1@omarmb}</div><div>(ct@omarmb)4> rpc:call('testnode1@omarmb', application, which_applications,[]).</div>






<div>[{mnesia,"MNESIA  CXC 138 12","4.5"},</div><div> {stdlib,"ERTS  CXC 138 10","1.17.5"},</div><div> {kernel,"ERTS  CXC 138 10","2.14.5"}]</div></div><br><div class="gmail_quote">





<div><div>
On Sun, Feb 12, 2012 at 6:22 AM, Fred Hebert <span dir="ltr"><<a href="mailto:mononcqc@gmail.com" target="_blank">mononcqc@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div><div>
I should specify this problem is something I noticed when using distributed tests based on ct_slave; I would suspect that local tests being run from a shell started manually do not suffer from this.<div><div>
<br><br><div class="gmail_quote">

On Sun, Feb 12, 2012 at 12:19 AM, Fred Hebert <span dir="ltr"><<a href="mailto:mononcqc@gmail.com" target="_blank">mononcqc@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">








<div>I've recently discovered that Common Test appears to not be starting basic applications such as kernel and stdlib, but it still starts things like application controllers and whatnot.<br></div><div><br></div><div>









This gives me a few problems because it breaks a few behaviours such as application:which_applications(), being able to start a few applications (they depend on stdlib and kernel. Sstdlib depends on kernel, and manually starting kernel fails because  a bunch of processes already have that name). </div>









<div><br></div><div>It will also play negatively with things like manually calling application:set_env/3 before starting an application to configure it (after loading it) as just starting it will overwrite all values, etc. </div>









<div> </div><div>This causes me a few problems because it forces me to test everything below the application level, and I can't automate testing of things like distributed applications and their failover/takeover mechanisms.</div>









<div><br></div><div>Is there any workaround for these problems?</div>
</blockquote></div><br>
</div></div><br></div></div>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br>