<div dir="ltr">On 14 November 2017 at 12:06, Patrick Ohly <span dir="ltr"><<a href="mailto:patrick.ohly@intel.com" target="_blank">patrick.ohly@intel.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, 2017-11-06 at 17:55 +0000, Ross Burton wrote:<br>
> testcommand = 'ls /etc/' + fileboot_name<br>
<br>
</span>Can't this be removed?<br>
<span class=""><br>
> with runqemu('core-image-minimal') as qemu:<br>
> - ssh = SSHControl(ip=qemu.ip, logfile=qemu.sshlog)<br>
> - status, output = ssh.run(testcommand)<br>
> + status, output = qemu.run_serial("-f /etc/" + fileboot_name)<br>
<br>
</span>Did you mean "test -f"?</blockquote><div><br></div><div>Yes! Argh.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
> self.assertEqual(status, 0, 'File %s was not created at first boot (%s)' % (fileboot_name, output))<br>
<br>
</span>run_serial has the quirk that status == 1 on *success*. Yes, weird.<br></blockquote><div><br></div><div>Oh <redacted>.</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">The test probably passed because it was testing for failure, and the<br>
missing "test" ensured that the command failed.<br></blockquote><div><br></div><div>Thanks. Sorry.</div><div><br></div><div>Ross </div></div></div></div>