Fail when pressing Test button in a manual test with root command

Bug #383559 reported by Javier Collado
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
High
Marc Tardif

Bug Description

When executing a manual test case that makes use of the output of a command, that is run as root user, in its description there isn't any problem. However, if the Test button in the GTK interface is pressed to get a new description, the following traceback is displayed in the console:
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/checkbox_gtk/gtk_interface.py", line 254, in <lambda>
    lambda w, t=test: self._run_test(t))
  File "/usr/lib/python2.6/dist-packages/checkbox_gtk/gtk_interface.py", line 229, in _run_test
    result = self.show_wait(message, test.command)
  File "/usr/lib/python2.6/dist-packages/checkbox_gtk/gtk_interface.py", line 186, in show_wait
    result = self.do_function(function, *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/checkbox_gtk/gtk_interface.py", line 175, in do_function
    *args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/checkbox/user_interface.py", line 58, in do_function
    thread.exc_raise()
  File "/usr/lib/python2.6/dist-packages/checkbox/contrib/REThread.py", line 37, in run
    self._retval = self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.6/dist-packages/checkbox/command.py", line 88, in __call__
    return self.execute(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/checkbox/frontend.py", line 43, in __call__
    return getattr(self, self._method)(*args, **kwargs)
  File "/usr/lib/python2.6/dist-packages/checkbox/frontend.py", line 72, in get_test_result
    return TestResult(self.test, status, data, float(duration))
AttributeError: 'Frontend' object has no attribute 'test'

Related branches

David Murphy (schwuk)
Changed in checkbox:
assignee: nobody → Marc Tardif (cr3)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Javier Collado (javier.collado) wrote :

To reproduce the problem, a test case such as the following might be used:

name: test
plugin: manual
command: echo "command output"
user: root
description:
 Select test to run the command again:
 .
 $output

Revision history for this message
Javier Collado (javier.collado) wrote :

One more thing that I've observed is that after getting the backtrace in the bug description, the only "friendly" way to cancel checkbox is to press Ctrl-C.

After that, if the test case description is modified and checkbox is run again, the test case description isn't updated. As a workaround to solve the problem, I killed the backend and then then new test case was updated. Hence, it seems that the problem isn't only that checkbox doesn't perform the required action, but also that the backend remains stuck in some internal state.

Revision history for this message
Javier Collado (javier.collado) wrote :

Hello,

I've seen that suspend/resume test cases have the same problem. In this case the output isn't used for the description, so the problem isn't related only to commands for which the output is used in the description.

Best regards,
    Javier

Marc Tardif (cr3)
Changed in checkbox:
status: Triaged → Fix Committed
importance: Medium → High
Marc Tardif (cr3)
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.