https://progress.opensuse.org/https://progress.opensuse.org/themes/openSUSE/favicon/favicon.ico?15829177842021-02-23T07:22:38ZopenSUSE Project Management ToolopenQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=3848922021-02-23T07:22:38Zokurzokurz@suse.com
<ul><li><strong>Project</strong> changed from <i>openQA Project</i> to <i>openQA Tests</i></li><li><strong>Category</strong> set to <i>Bugs in existing tests</i></li></ul><p>The method is part of os-autoinst-distri-opensuse, not part of os-autoinst so you can take a look into the method definition within the "lib/" folder of the test distribution. I don't have experience with the method myself and I doubt anyone from SUSE QE Tools has experience</p>
openQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=3849012021-02-23T07:27:45Zrfan1richard.fan@suse.com
<ul></ul><p>okurz wrote:</p>
<blockquote>
<p>The method is part of os-autoinst-distri-opensuse, not part of os-autoinst so you can take a look into the method definition within the "lib/" folder of the test distribution. I don't have experience with the method myself and I doubt anyone from SUSE QE Tools has experience</p>
</blockquote>
<p>Thanks Oliver!</p>
openQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=3849192021-02-23T08:27:14Zlivdywanliv.dywan@suse.com
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/384919/diff?detail_id=365566">diff</a>)</li></ul> openQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=3947422021-04-02T15:09:34ZXiaojing_liuxliu1@suse.com
<ul></ul><p>Did some tests with <a class="user active user-mention" href="https://progress.opensuse.org/users/34730">@rfan1</a>. Here are the results:</p>
<ol>
<li><p>when <code>$self->select_serial_terminal</code>, the output will include command line, such as </p>
<pre><code>rw7ER-0-
# (script -qe -a /dev/null -c '
> dsidm localhost account reset_password uid=wilber,ou=people,dc=example,dc=com
> '; echo EOS~~~$?) |& tee /dev/ttyS0
Enter new password for uid=wilber,ou=people,dc=example,dc=com :
</code></pre>
<p>Then <code>script_run_interactive</code> die because the output matches <code>EOS~~~</code>.<br>
See: <a href="https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/utils.pm#L1612" class="external">https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/utils.pm#L1612</a></p></li>
<li><p>in the second step, the output does not match the regex because the regex we used is an array. Here is an example:<br>
Output is <code>YES \n Enter passphrase for /root/testfile:</code>, <br>
And regex is </p>
<pre><code>["Are you sure.*",
"Enter passphrase.*",
"Verify passphrase.*",
qr/EOS~~~(\d+)/ ]
</code></pre>
<p>In the serial terminal, we put the items in the array together and make a regex. See: <a href="https://github.com/os-autoinst/os-autoinst/blob/master/consoles/serial_screen.pm#L140" class="external">https://github.com/os-autoinst/os-autoinst/blob/master/consoles/serial_screen.pm#L140</a><br><br>
In the root console, there is no problem. Because we do the match one by one (in a for loop)<br>
If the check should return success when the output matches any one item in an array, we need to modify the code in os-autoinst.</p></li>
<li><p>We should use <code>EOS~~~(\d+)</code> to check if the command is done. Because the output will be cut according to the regex. If we use <code>EOS~~~</code>, the result of <code>$?</code> will be lost.<br>
see: <a href="https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/utils.pm#L1605" class="external">https://github.com/os-autoinst/os-autoinst-distri-opensuse/blob/master/lib/utils.pm#L1605</a></p></li>
</ol>
openQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=3954412021-04-07T12:52:55Ztjyrinki_susetjyrinki+redmine@suse.de
<ul><li><strong>Subject</strong> changed from <i>"script_run_interactive" didn't work fine if selecting serial terminal</i> to <i>[security] "script_run_interactive" didn't work fine if selecting serial terminal</i></li><li><strong>Start date</strong> deleted (<del><i>2021-02-23</i></del>)</li></ul> openQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=4015892021-04-28T08:31:15Zllzhaollzhao@suse.com
<ul><li><strong>Assignee</strong> set to <i>rfan1</i></li></ul> openQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=4019192021-04-29T00:34:26Zrfan1richard.fan@suse.com
<ul><li><strong>Category</strong> changed from <i>Bugs in existing tests</i> to <i>Enhancement to existing tests</i></li><li><strong>Status</strong> changed from <i>New</i> to <i>Workable</i></li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Low</i></li><li><strong>Estimated time</strong> set to <i>60.00 h</i></li></ul> openQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=5168862022-05-09T01:33:53Zllzhaollzhao@suse.com
<ul><li><strong>Subject</strong> changed from <i>[security] "script_run_interactive" didn't work fine if selecting serial terminal</i> to <i>[security][backlog] "script_run_interactive" didn't work fine if selecting serial terminal</i></li></ul> openQA Tests - action #89011: [security][backlog] "script_run_interactive" didn't work fine if selecting serial terminalhttps://progress.opensuse.org/issues/89011?journal_id=5332732022-07-04T03:39:55Zrfan1richard.fan@suse.com
<ul><li><strong>Status</strong> changed from <i>Workable</i> to <i>Rejected</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Close this ticket due to test case can passed in vnc/ssh console</p>