[qmtest] os.system0 use in resource SetUp methods
Steve Byan
smb at egenera.com
Mon Nov 24 15:56:14 UTC 2003
On Nov 21, 2003, at 8:39 PM, Mark Mitchell wrote:
> On Fri, 2003-11-21 at 13:54, Steve Byan wrote:
>> I've written a couple of test extension classes modeled on
>> ShellCommandTest and ShellScriptTest which use a remote shell to
>> execute the tests on a remote host specified by a "node" resource
>> extension class, which selects one host from those provided in the
>> context by a target extension class.
>>
>> I'd like to check the state of the selected host in the resource SetUp
>> method. I've tried using code like this:
>>
>> # test that pServer is up and running
>> if os.system("ping -c 3 " + remote_host + " >/dev/null") !=
>> 0:
>> cause = "Can't ping " + blade + " at hostname " +
>> remote_host
>> result.Fail(cause=cause)
>> return
>
> Does this problem happen with the CVS version of QMTest or only with
> QMTest 2.0.3? In 2.0.3, there were some bugs involving test/resource
> dependencies that might have caused problems here.
I've only tried 2.0.3; I haven't set up access to the QMTest CVS
repository. I'll retest when 2.1 is out.
> I can't think of any reason that the GUI should present particular
> problems here; we'll have to have more information to figure out what's
> going wrong.
I suspect the problem is somewhere in the platform thread support. The
problem turns out to be platform-specific, or at least python-version
specific. The GUI hangs on MacOS X, 10.3.1 which comes with python
2.3, but not on RedHat 9.0, which comes with python 2.2.2. In previous
versions of Mac OS X, the POSIX thread support was reputed to be weak.
(Of course, so is Linux's :-)
For now, I'll use the "run it on Linux" work-around.
Regards,
-Steve
--------
Steve Byan <smb at egenera.com>
Software Architect
Egenera, Inc.
165 Forest Street
Marlboro, MA 01752
(508) 858-3125
More information about the qmtest
mailing list