#130 TAP validity check fails to recognize duplicated header
Closed: Fixed None Opened 9 years ago by kparal.

Before we fixed D118, this was the output (ignore duplicated lines):

$ runtask -i xchat-2.8.8-21.fc20 -t koji_build -a x86_64 rpmlint.yml
[libtaskotron:logger.py:65] 2014-06-04 15:56:09 DEBUG   doing stream logging
[libtaskotron:config.py:155] 2014-06-04 15:56:09 DEBUG   Trying to open configuration file: /etc/taskotron/taskotron.yaml
[libtaskotron:config.py:165] 2014-06-04 15:56:09 DEBUG   Trying to parse configuration file: /etc/taskotron/taskotron.yaml
[libtaskotron:config.py:63] 2014-06-04 15:56:09 DEBUG   Using config profile: development
[libtaskotron:config.py:243] 2014-06-04 15:56:09 WARNING Failed to create a required directory, please create it manually: [Errno 13] Permission denied: '/var/log/taskotron'
[libtaskotron:koji_directive.py:72] 2014-06-04 15:56:09 INFO    Getting RPMs for koji build xchat-2.8.8-21.fc20 (['x86_64', 'noarch']) and downloading to /var/tmp/taskotron/task-8IQnzg
[libtaskotron:koji_utils.py:42] 2014-06-04 15:56:09 INFO    Querying Koji for a list of RPMS for: xchat-2.8.8-21.fc20
[libtaskotron:koji_utils.py:85] 2014-06-04 15:56:11 INFO    Fetching RPMs for: xchat-2.8.8-21.fc20
[libtaskotron:koji_utils.py:87] 2014-06-04 15:56:11 INFO      fetching http://kojipkgs.fedoraproject.org/packages/xchat/2.8.8/21.fc20/x86_64/xchat-2.8.8-21.fc20.x86_64.rpm
[libtaskotron:file_utils.py:94] 2014-06-04 15:56:11 INFO    Downloading: http://kojipkgs.fedoraproject.org/packages/xchat/2.8.8/21.fc20/x86_64/xchat-2.8.8-21.fc20.x86_64.rpm
xchat-2.8.8-21.fc20.x86_64.rpm                                                                                                                                                              | 952 kB  00:00:01     
[libtaskotron:koji_utils.py:87] 2014-06-04 15:56:13 INFO      fetching http://kojipkgs.fedoraproject.org/packages/xchat/2.8.8/21.fc20/x86_64/xchat-tcl-2.8.8-21.fc20.x86_64.rpm
[libtaskotron:file_utils.py:94] 2014-06-04 15:56:13 INFO    Downloading: http://kojipkgs.fedoraproject.org/packages/xchat/2.8.8/21.fc20/x86_64/xchat-tcl-2.8.8-21.fc20.x86_64.rpm
xchat-tcl-2.8.8-21.fc20.x86_64.rpm                                                                                                                                                          |  48 kB  00:00:00     
[libtaskotron:resultsdb_directive.py:139] 2014-06-04 15:56:17 INFO    TAP is OK.
INFO:libtaskotron:TAP is OK.
[libtaskotron:resultsdb_directive.py:140] 2014-06-04 15:56:17 INFO    Reporting to ResultsDB is disabled.
INFO:libtaskotron:Reporting to ResultsDB is disabled.
[libtaskotron:resultsdb_directive.py:141] 2014-06-04 15:56:17 INFO    Once enabled, the following would be reported:
INFO:libtaskotron:Once enabled, the following would be reported:
[libtaskotron:resultsdb_directive.py:142] 2014-06-04 15:56:17 INFO    <CheckDetail: {'_outcome': 'PASSED',
 'item': 'xchat-2.8.8-21.fc20.x86_64.rpm',
 'keyvals': {},
 'output': '<stripped out>',
 'report_type': 'koji_build',
 'summary': 'RPMLINT PASSED for xchat-2.8.8-21.fc20.x86_64.rpm'}>
<CheckDetail: {'_outcome': 'PASSED',
 'item': 'xchat-tcl-2.8.8-21.fc20.x86_64.rpm',
 'keyvals': {},
 'output': '<stripped out>',
 'report_type': 'koji_build',
 'summary': 'RPMLINT PASSED for xchat-tcl-2.8.8-21.fc20.x86_64.rpm'}>
INFO:libtaskotron:<CheckDetail: {'_outcome': 'PASSED',
 'item': 'xchat-2.8.8-21.fc20.x86_64.rpm',
 'keyvals': {},
 'output': '<stripped out>',
 'report_type': 'koji_build',
 'summary': 'RPMLINT PASSED for xchat-2.8.8-21.fc20.x86_64.rpm'}>
<CheckDetail: {'_outcome': 'PASSED',
 'item': 'xchat-tcl-2.8.8-21.fc20.x86_64.rpm',
 'keyvals': {},
 'output': '<stripped out>',
 'report_type': 'koji_build',
 'summary': 'RPMLINT PASSED for xchat-tcl-2.8.8-21.fc20.x86_64.rpm'}>
[libtaskotron:runner.py:200] 2014-06-04 15:56:17 INFO    Check execution finished. Showing stored variables:
INFO:libtaskotron:Check execution finished. Showing stored variables:
[libtaskotron:runner.py:202] 2014-06-04 15:56:17 INFO    ${rpmlint_output}:
TAP version 13
1..1
ok - $CHECKNAME for Koji build xchat-2.8.8-21.fc20.x86_64.rpm
  ---
  details:
    output: |
      xchat.x86_64: W: file-not-utf8 /usr/share/doc/xchat/ChangeLog
      xchat.x86_64: W: non-conffile-in-etc /etc/gconf/schemas/apps_xchat_url_handler.schemas
      xchat.x86_64: W: no-manual-page-for-binary xchat
      1 packages and 0 specfiles checked; 0 errors, 3 warnings.
  item: xchat-2.8.8-21.fc20.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for xchat-2.8.8-21.fc20.x86_64.rpm
  type: koji_build
  ...
TAP version 13
1..1
ok - $CHECKNAME for Koji build xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  ---
  details:
    output: |
      xchat-tcl.x86_64: W: no-documentation
      1 packages and 0 specfiles checked; 0 errors, 1 warnings.
  item: xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  type: koji_build
  ...
INFO:libtaskotron:${rpmlint_output}:
TAP version 13
1..1
ok - $CHECKNAME for Koji build xchat-2.8.8-21.fc20.x86_64.rpm
  ---
  details:
    output: |
      xchat.x86_64: W: file-not-utf8 /usr/share/doc/xchat/ChangeLog
      xchat.x86_64: W: non-conffile-in-etc /etc/gconf/schemas/apps_xchat_url_handler.schemas
      xchat.x86_64: W: no-manual-page-for-binary xchat
      1 packages and 0 specfiles checked; 0 errors, 3 warnings.
  item: xchat-2.8.8-21.fc20.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for xchat-2.8.8-21.fc20.x86_64.rpm
  type: koji_build
  ...
TAP version 13
1..1
ok - $CHECKNAME for Koji build xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  ---
  details:
    output: |
      xchat-tcl.x86_64: W: no-documentation
      1 packages and 0 specfiles checked; 0 errors, 1 warnings.
  item: xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  outcome: PASSED
  summary: RPMLINT PASSED for xchat-tcl-2.8.8-21.fc20.x86_64.rpm
  type: koji_build
  ...

The TAP output is incorrect, those are two TAP outputs joined together with a newline. So the TAP header is included twice, in the beginning and in the middle. But our validation check assumes it's correct:

[libtaskotron:resultsdb_directive.py:139] 2014-06-04 15:56:17 INFO    TAP is OK.

Fix the validation and raise an error in these cases. Add unit tests.


This ticket had assigned some Differential requests:
D132

I changed the code in [[ https://bitbucket.org/fedoraqa/pytap13/commits/423c2bc7b0d31571f28b62b2fbd22e7f0ea0d61c | pytap13 ]], parser now rises error on multiple TAP headers. @jskladan should release new version in pypi, so I can change requirements.txt.

Login to comment on this ticket.

Metadata