Bug 772178 - [rfe] report NVRs of tested packages
[rfe] report NVRs of tested packages
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: beakerlib (Show other bugs)
rawhide
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Petr Muller
: Patch
Depends On:
Blocks: 798718 772180 772622 893064
  Show dependency treegraph
 
Reported: 2012-01-06 05:26 EST by Martin Cermak
Modified: 2013-06-27 12:39 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 893064 (view as bug list)
Environment:
Last Closed: 2013-06-27 12:39:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
proposed patch (1.18 KB, patch)
2012-04-06 10:17 EDT, Martin Cermak
no flags Details | Diff

  None (edit)
Description Martin Cermak 2012-01-06 05:26:34 EST
Description of problem:

   In terms of Test Results Evaluation Improvement Project [1] I'd like to be 
   able to get additional informations from beaker test along with usual test
   result (PASS/FAIL). 

   I don't want to change the code of existing tests, so this should be 
   a beakerlib core functionality.

   Additional informations I'm interested in are NVRs of certain packages
   against which the test was run. 


How should it work?

   Let's have some special variable PKGNVR dedicated for this purpose.

   Example: Imagine we pass a parameter like this to the test: 
   PKGNVR=nc;bind-utils After the test finishes, we'll get
   nc-1.84-22.el6.x86_64, bind-utils-9.7.3-8.P3.el6.x86_64 along with 
   test results in the resulting XML. 


How should it be implemented?

   I think these new data should be stored in the beakerlib journal.

   Rationale: I'd  like to be able to (over)write data acquired using the
   "PKGNVR" mechanism with some rl* function later in the test - during its 
   run. That's because some tests may use yum or rpm, so I need a way to 
   force-write the NVR to the journal during the test run.

   The aforementioned rl* function could be already existing rlAssertRpm 
   after small modification.



---------------
[1] https://wiki.test.redhat.com/BaseOs/Daemons/TestResutsEvaluationImprovementProject
Comment 1 Martin Cermak 2012-01-06 05:30:15 EST
Note that I created a rlAssertRpm modification request: bz772180.
Comment 2 Petr Muller 2012-01-06 08:39:05 EST
Yes, I already have infrastructure support for this in the (yet unfinished) journal rewrite. Coming to your Beaker box in early 2012.
Comment 3 Petr Šplíchal 2012-01-19 10:29:16 EST
(In reply to comment #0)
>    Let's have some special variable PKGNVR dedicated for this purpose.
> 
>    Example: Imagine we pass a parameter like this to the test: 
>    PKGNVR=nc;bind-utils After the test finishes, we'll get
>    nc-1.84-22.el6.x86_64, bind-utils-9.7.3-8.P3.el6.x86_64 along with 
>    test results in the resulting XML. 

What about reporting NVRs of all packages mentioned in Requires?
Comment 4 Martin Cermak 2012-01-19 11:30:09 EST
A separate bugzilla for this is already filed: 772622.
Comment 5 Martin Cermak 2012-01-30 05:36:36 EST
Petr, do you have any estimation when this could be complete? Can I help you with the implementation?
Comment 6 Petr Muller 2012-01-30 13:14:27 EST
I hope I will have the new journal in production until the end of FY.
Comment 7 Martin Cermak 2012-04-06 10:17:12 EDT
Created attachment 575756 [details]
proposed patch

This patch reuses XML element "pkgdetails" which is already present in the journal. It adds package details for comma separated list of packages passed to the test via PKGNVR environmental variable:

Examples:

export PKGNVR=kernel,selinux-policy
make run

export PKGNVR=kernel,somenonsense
make run

unset PKGNVR
make run

...

Note that this also works when multiple packages with identical names (e.g. kernel) are installed. 

I hope that this would work in beaker like this: bkr workflow-tcms --task=/test/name --taskparam=PKGNVR='kernel,selinux-policy' ...
Comment 8 Petr Muller 2012-05-02 14:06:38 EDT
I've put in a slightly pythonized patch without the ugly try: (...) except: pass construction.

http://git.fedorahosted.org/git?p=beakerlib.git;a=commit;h=7782b2db85f1fc9662817cfd077d4392d4c56177
Comment 9 Martin Cermak 2012-05-03 02:57:28 EDT
Yeah, that's a bit better :) Thanks!
Comment 12 Petr Muller 2013-01-08 09:20:09 EST
beakerlib-1.6-1 is already in fedora

Note You need to log in before you can comment on or make changes to this bug.