Skip to content

Conversation

@vkarak
Copy link
Contributor

@vkarak vkarak commented Dec 6, 2022

If a test had a join fixture over a parameterised test, whose parameterisation space is a single point only, ReFrame will erroneously include the fixture's parameter name in the display name of the test that is using it. This is not correct as tests with join fixtures do not inherit the fixture parameters. This bug was due to how display_name was checking if a fixture was a join or not; it was relying on the get_variant_info() information, which encodes the fixture space as a tuple only if it has more than two points. We instead use a much more robust check by checking directly the action of the fixture instance. The same bug was present also when constructing the FixtureProxy to allow early access to fixtures. Early access to join fixtures is not allowed, but the current implementation was giving access to join fixtures with a single point fixture space.

This is an example to demonstrate the display name before and after. Given the following test:

class X(rfm.RunOnlyRegressionTest):
    p = parameter([1])


@rfm.simple_test
class mytest(rfm.RunOnlyRegressionTest):
    valid_systems = ['*']
    valid_prog_environs = ['*']
    f = fixture(X, scope='session', action='join')

This lists mytest as follows if p has a single value:

- mytest %f.p=1 /f68d27da
    ^X %p=1 ~generic /2a18b33e

But if p has more than two values, then this is how it is displayed:

- mytest /f68d27da
    ^X %p=2 ~generic /d1dd186c
    ^X %p=1 ~generic /2a18b33e

This PR fixes the first case and now the display name is as expected:

- mytest /f68d27da
    ^X %p=1 ~generic /2a18b33e

@vkarak vkarak added this to the ReFrame sprint 22.12.1 milestone Dec 6, 2022
@vkarak vkarak requested review from ekouts, teojgo and victorusu December 6, 2022 22:57
@vkarak vkarak self-assigned this Dec 6, 2022
Copy link
Contributor

@victorusu victorusu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@vkarak vkarak merged commit 47d7d3a into reframe-hpc:master Dec 12, 2022
@vkarak vkarak deleted the bugfix/display-name-fixtures branch December 12, 2022 22:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants