Skip to content

Allow changing specific check if others have been configured by default #3611

@bgoncalv

Description

@bgoncalv

When multiple checks are configured in the main root file, it is not possible in the test level to change the configuration of one of them.

example:

main.fmf on repo root:

check:
  - how: avc
  - how: dmesg
    failure-pattern:
      # These are default patterns
      - 'Call Trace:'
  - how: watchdog
adjust:
  - when: check-result == info
    check:
      - how: avc
        result: info
      - how: dmesg
        result: info
        failure-pattern:
          # These are default patterns
          - 'Call Trace:'
      - how: watchdog
        result: info
  - when: check-result == disabled
    check:
      - how: avc
        enabled: false
      - how: dmesg
        enabled: false
      - how: watchdog
        enabled: false

on test metadata add:

check+:                                                                         
  - how: avc                                                                    
    enabled: false

Currently this happens:

tmt test show <test>
the check is added as an additional one, that leaves 2 avc checks, one enabled and other disabled

                   check - how: avc
                           enabled: false
                           result: respect
                         - how: avc
                           enabled: true
                           result: respect

tmt -c check-result=info test show <test>
the check defined in the test level is not being set when setting a context that adjust the check.

                   check - how: avc
                           enabled: true
                           result: info

Metadata

Metadata

Assignees

No one assigned

    Labels

    area | checkTest check implementation

    Type

    No type

    Projects

    Status

    done

    Status

    triaged

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions