On 08/28/2012 11:22 AM, Zhang, Zhi-Qiang (Allen@MC Linux) wrote:
Hi All,

I am confused on how to set the overall job status to be “Failed” to
reflect its every sub test type “Fail” status.

 From my autotest Job List page, it says my job is “Completed” status
but actually the sub test type(linux_provision_guest) my job contains
got Fail, as you can see following status.log output:

START        ----               ----
timestamp=1346161043               localtime=Aug 28 08:37:23

                     START        mclinux_provision_guest
mclinux_provision_guest
timestamp=1346161044                    localtime=Aug 28 08:37:24

FAIL            linux_provision_guest
linux_provision_guest
timestamp=1346161044                    localtime=Aug 28 08:37:24

                     END FAIL   linux_provision_guest
linux_provision_guest
timestamp=1346161044                    localtime=Aug 28 08:37:24

END GOOD                   ----               ----
timestamp=1346161045               localtime=Aug 28 08:37:25

I was trying to call a client test type “linux_provision_guest” from
server side, following is a piece of my server side control file:

...<snip>…

def run(vm_host):

     host = hosts.create_host(vm_host, initialize=False)

     vm_info = get_final_install_info(vm_host, vms_to_install)

     at = autotest_remote.Autotest(host)

     for vm in vm_info.keys():

         if ('profile' in vm_info[vm]):

             # switch the profile on cobbler server

             vmobj = hosts.create_host(vm, initialize=False)

             vmobj.modify_profile(profile=vm_info[vm]['profile'])

     at.run_test('mclinux_provision_guest', guest_names=vm_info.keys(),
disable_sysinfo=True)

job.parallel_simple(run, machines)

At this point, the overall status of my job returned “END GOOD”, I am
confused by this, it should be “Fail” also, did anyone meet this similar
case before? and how to reflect the whole job status.

A job comprises a number of operations on a test machine. It doesn't matter whether the individual tests PASSed or FAILed, the important thing job-wise is that the autotest client was installed and executed on a test client, that's all. There are actual job failures, that are:

1) Exceptions thrown outside a test context (Autotest client died)
2) Exceptions thrown outside the client context (Autotest server died)
2) Machine died (kernel crash)

So autotest is functioning as designed here. You're supposed to look at job results to see whether tests passed or failed, we even have functionality to send emails informing such results to users.



_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel

Reply via email to