Bug 2383054 - python-virt-firmware: STI tests will no longer be run in F43
Summary: python-virt-firmware: STI tests will no longer be run in F43
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: python-virt-firmware
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Gerd Hoffmann
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: Disable, STI
TreeView+ depends on / blocked
 
Reported: 2025-07-23 14:05 UTC by Cristian Le
Modified: 2025-08-05 19:51 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-08-05 11:43:14 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Cristian Le 2025-07-23 14:05:25 UTC
Dear package maintainer,

This is an automated bug created due to the announced change proposal Disablement of STI tests.

Your project still has STI tests under `tests/tests*.yml`, which will no longer be run soon. We suggest you
migrate these tests to TMT format instead.

In the simplest case when the STI tests is a simple wrapper around a `tests/run_tests.sh`, the migration would
look like this:
```
$ tmt init
$ rm tests/tests.yml
$ cat <<EOF > ./plans.fmf
summary: Run all smoke tests
discover:
  how: fmf
execute:
  how: tmt
EOF
$ cat <<EOF > ./tests/main.fmf
summary: Smoke test
test: ./run_tests.sh
EOF
```

See https://fedoraproject.org/wiki/Changes/DisableSTI for more information, including a link to a migration
guide.

Feel free to reach out to us here or in #fedora-ci or #tmt matrix rooms if you need any help.

Comment 1 Gerd Hoffmann 2025-07-24 15:13:46 UTC
Well, I have tests upstream (in the tests/ subdirectory of the git repo).  One python script and a handfull of shell scripts.

The packaging simply copies them over and puts the directory as-is into the python3-virt-firmware-tests sub-rpm.

tests/tests.yml simply runs these scripts.

I guess simply adding one tests/$name.fmf file per test script into distgit would work.  But does that actually make sense?  The tmt docs suggest tmt metadata could also go to the upstream source repo.  Sounds like an attractive option, keeping tests and metadata in sync.  Drop one or more metadata files into tests/, package them up together with the test scripts in the python3-virt-firmware-tests sub-rpm, then have tmt find and use them.  I'm somewhat lost in the tmt documentation though ...

Any hints if the above makes sense and how to do that best?

Comment 2 Cristian Le 2025-07-25 08:31:06 UTC
Ok, here's an example structure that you can use. Note that the name and location of the files are arbitrary, if you want to organize them in a specific folder structure, let me know and I can help you with that.
```
$ cat <<EOF > ./plans.fmf
summary: Run various tests
discover:
  how: fmf
execute:
  how: tmt
EOF
$ cat <<EOF > ./tests.fmf
/virt-fw-dump:
  test: /usr/share/python-virt-firmware/tests/test-dump.sh
/virt-fw-vars:
  test: /usr/share/python-virt-firmware/tests/test-vars.sh
/virt-fw-sigdb:
  test: /usr/share/python-virt-firmware/tests/test-sigdb.sh
/virt-pe-utils:
  test: /usr/share/python-virt-firmware/tests/test-pe.sh
/kernel-bootcfg:
  test: /usr/share/python-virt-firmware/tests/test-bootcfg.sh
/python-unittest:
  test: python3 /usr/share/python-virt-firmware/tests/tests.py
EOF
```

This one you can put in both upstream and downstream and can synchronize the files with packit. Alternatively, once the files are in the dist-git srpm, you can use the following plan instead
```
$ cat <<EOF > ./plans.fmf
summary: Run various tests
discover:
  how: fmf
  dist-git-source: true
execute:
  how: tmt
EOF
```
(without needing to carry the `tests.fmf` anymore)

There is an extra design you can make use of that instead of installing the files in /usr/share/python-virt-firmware/tests, you can keep them in source if you use the `dist-git-source` method above, i.e. the tests.fmf can simplify to
```

$ cat <<EOF > ./tests.fmf
/virt-fw-dump:
  test: ./tests/test-dump.sh
/virt-fw-vars:
  test: ./tests/test-vars.sh
/virt-fw-sigdb:
  test: ./tests/test-sigdb.sh
/virt-pe-utils:
  test: ./tests/test-pe.sh
/kernel-bootcfg:
  test: ./tests/test-bootcfg.sh
/python-unittest:
  test: python3 ./tests/tests.py
EOF
```

---

Hope it helps, feel free to ping me if you have any other questions.

Comment 3 Gerd Hoffmann 2025-08-04 13:31:49 UTC
I want keep the tests scripts in the -tests subpackage.  I find it convenient to simply keep the package installed, then be able to run the tests at any time without much fuss.  So, I'm wondering if I can simply add the tests.fmf file to the package, then place this in distgit:

```
$ cat <<EOF > ./plans.fmf
summary: run tests
prepare:
  - how: install
    package: python3-virt-firmware-tests
discover:
  how: fmf
  <somehow tell tmt to use /usr/share/python-virt-firmware/tests/tests.fmf>
execute:
  how: tmt
EOF
```

If that is not possible I'll go simply place both fmf files in distgit.


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