Project

General

Profile

Actions

action #54368

closed

24-worker-job.t: two subtests fail unless autoinst-log.txt is pre-created

Added by AdamWill over 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
Regressions/Crashes
Target version:
-
Start date:
2019-07-17
Due date:
% Done:

0%

Estimated time:

Description

Two of 24-worker-job.t 's subtests fail unless the file autoinst-log.txt exists in the top-level source directory at the time they are run. However, that file is not part of the git repo, nor is it guaranteed to be created by the process of running the tests.

The failures look like this:

BUILDSTDERR: #   Failed test 'result and uploading logged'
BUILDSTDERR: #   at ./t/24-worker-job.t line 192.
BUILDSTDERR: # STDOUT & STDERR:
BUILDSTDERR: # [2019-07-17 20:15:10.44681] [13189] [info] [pid:13189] Trying to stop job gracefully by announcing it to command server via url/broadcast
BUILDSTDERR: # [2019-07-17 20:15:10.44920] [13189] [error] [pid:13189] Unable to stop the command server gracefully: 
BUILDSTDERR: # [2019-07-17 20:15:10.44944] [13189] [error] [pid:13189] Command server likely not reachable at all
BUILDSTDERR: # [2019-07-17 20:15:10.44969] [13189] [info] [pid:13189] +++ worker notes +++
BUILDSTDERR: # [2019-07-17 20:15:10.44994] [13189] [info] [pid:13189] End time: 2019-07-17 20:15:10
BUILDSTDERR: # [2019-07-17 20:15:10.45018] [13189] [info] [pid:13189] Result: done
BUILDSTDERR: # [2019-07-17 20:15:10.45058] [13189] [debug] [pid:13189] Setting job 2 to done
BUILDSTDERR: # 
BUILDSTDERR: # don't match:
BUILDSTDERR: # (?^s:Result\: done.*Uploading autoinst-log\.txt)
BUILDSTDERR: # as expected
BUILDSTDERR: #   Failed test 'would have uploaded logs'
BUILDSTDERR: #   at ./t/24-worker-job.t line 357.
BUILDSTDERR: #     Structures begin differing at:
BUILDSTDERR: #          $got->[0] = Does not exist
BUILDSTDERR: #     $expected->[0] = ARRAY(0x43998c8)
BUILDSTDERR: # []
BUILDSTDERR: # Looks like you failed 2 tests of 45.

This can be observed happening in OBS builds of the package, e.g. https://build.opensuse.org/public/build/devel:openQA/openSUSE_Factory/x86_64/openQA/_log . It doesn't fail those builds because the spec file used for OBS builds sticks a || on the end of the test execution line, effectively meaning "run the tests but if they fail, ignore it and continue". If you make the spec create autoinst-log.txt before running the tests, then the failures go away.

I noticed that .travis.yml pre-creates the file, so this problem doesn't show up when travis runs the tests. That doesn't seem to have been done to solve this problem - it was done in this commit:

https://github.com/os-autoinst/openQA/commit/4edac364fd1c712c2ed098a25544dc654ed017db#diff-354f30a63fb0907d4ad57269548329e3

and I think it's just there to make sure that cat autoinst-log.txt in after_failure doesn't blow up if the tests didn't get far enough to create the file. But it also happens to prevent this problem happening in Travis runs, I think.

Actions #1

Updated by SLindoMansilla over 4 years ago

  • Subject changed from 24-worker-job.t: two subtests fail unless autoinst-log.txt is pre-created to [tools] 24-worker-job.t: two subtests fail unless autoinst-log.txt is pre-created
Actions #2

Updated by okurz over 4 years ago

  • Category set to Bugs in existing tests
Actions #3

Updated by okurz about 4 years ago

  • Project changed from openQA Tests to openQA Project
  • Subject changed from [tools] 24-worker-job.t: two subtests fail unless autoinst-log.txt is pre-created to 24-worker-job.t: two subtests fail unless autoinst-log.txt is pre-created
  • Category changed from Bugs in existing tests to Regressions/Crashes
  • Status changed from New to Resolved
  • Assignee set to okurz

fixed meanwhile as we are not ignoring the exit code of tests within OBS anymore. Assigning to correct project. This project is only about "tests using openQA" not "tests of openQA"

Actions

Also available in: Atom PDF