Bug 603719

Summary: Providing parameters to a test has no effect
Product: [Retired] Beaker Reporter: Petr Šplíchal <psplicha>
Component: beahAssignee: Raymond Mancy <rmancy>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: 0.5CC: bpeck, cward, ebaak, kbaker, mcsontos, ohudlick, rmancy
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-08-05 17:56:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Šplíchal 2010-06-14 12:38:43 UTC
Description of problem:

I've scheduled a job with a parameter passed to the test. However,
it seems it did not have any effect.

Version-Release number of selected component (if applicable):
Version - 0.5.42 

Snip from the job XML:

    <task name="/CoreOS/httpd/Multihost/stress" role="SERVERS">
        <params>
            <param name="PROTOCOLS" value="IPv4 IPv6"/>
        </params>
    </task>

The actual job run IPv4 test only. Manual testing with

    export TEST_PARAM_PROTOCOLS="IPv4 IPv6"

works as expected and runs both IPv4 and IPv6 subtests.

    https://beaker.engineering.redhat.com/jobs/2935

Passing parameters confirmed to work in RHTS. Marking as
regression and suggesting a blocker.

Comment 1 Bill Peck 2010-06-14 12:53:59 UTC
Hi Petr,

Can you tell me how you ran this job?  using the new bkr workflow-simple command?  I think I may have not implemented --task-param correctly.  At least not like old single_workflow.  

If you notice above the param is PROTOCOLS in the xml and your test seems to expect TEST_PARAM_PROTOCOLS.  Should I be pre-pending TEST_PARAM_ to?  Seems bad to me to hard code that.


I've cloned the job and pre-pended TEST_PARAM_ to see if that will work.

Comment 2 Bill Peck 2010-06-14 13:21:36 UTC
I confirmed that it works when the correct param is passed. 

I'm just waiting on feedback on how this should be dealt with.  I don't think pre-pending TEST_PARAM_ to everything passed in is a great idea.  What if I have a test that expects a param that doesn't have TEST_PARAM_ as the begining?

Comment 3 Petr Šplíchal 2010-06-14 13:36:29 UTC
Oh, I see. So it's only a different behavior in Beaker. But I
must admit I like the new way better. +1 for not prepending the
awkward prefix. Perhaps, for backward compatibility the
TEST_PARAM_* should be set as well. But I don't know how many
people/old tests this affects. I can happily live without the
ugly prefix :-)

Comment 4 Petr Šplíchal 2010-06-14 13:39:03 UTC
By the way, this should be documented. I could not find any
mention about passing paramaters to tests in the User Guide.

Comment 5 Bill Peck 2010-06-21 12:50:56 UTC
Ray,

Can you document?

Comment 6 Chris Ward 2010-07-13 12:09:14 UTC
+1 on documenting this. I just pinged around looking for this info and found it here or all places :)