Skip to content

Conversation

@ricardobranco777
Copy link
Contributor

@ricardobranco777 ricardobranco777 commented Dec 25, 2025

This variable is set by hack/bats and it fails because PODMAN_CMD is unset in basic_teardown. I could manually reproduce as well when calling bats directly with PODMAN_BATS_LEAK_CHECK=1.

Otherwise you get errors like this:
https://openqa-assets.opensuse.org/tests/5555887/file/podman-bats-user-local.tap.txt

# [teardown] $ podman pod rm -t 0 --all --force --ignore
# timeout: failed to run command ‘pod’: No such file or directory
# [teardown] $ podman rm -t 0 --all --force --ignore
# rm: invalid option -- 't' Try 'rm --help' for more information.
# [teardown] $ podman network prune --force
# timeout: failed to run command ‘network’: No such file or directory
# [teardown] $ podman volume rm -a -f
# timeout: failed to run command ‘volume’: No such file or directory
# setup(): removing stray external container error: (unknown)
# setup(): removing stray external container Usage: ()
# setup(): removing stray external container ps ([options])
# setup(): removing stray external container Try ('ps)
# setup(): removing stray external container or ('ps)
# setup(): removing stray external container for (additional)
# setup(): removing stray external container For (more)
# setup(): removing stray image timeout:
# setup(): removing stray image failed

Checklist

Ensure you have completed the following checklist for your pull request to be reviewed:

  • Certify you wrote the patch or otherwise have the right to pass it on as an open-source patch by signing all
    commits. (git commit -s). (If needed, use git commit -s --amend). The author email must match
    the sign-off email address. See CONTRIBUTING.md
    for more information.
  • Referenced issues using Fixes: #00000 in commit message (if applicable)
  • Tests have been added/updated (or no tests are needed)
  • Documentation has been updated (or no documentation changes are needed)
  • All commits pass make validatepr (format/lint checks)
  • Release note entered in the section below (or None if no user-facing changes)

Does this PR introduce a user-facing change?

None

Copy link
Member

@lsm5 lsm5 left a comment

Choose a reason for hiding this comment

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

LGTM as best I can tell. Clearly an improvement over main when run with PODMAN_BATS_LEAK_CHECK set.

@containers/podman-maintainers PTAL.

@mheon
Copy link
Member

mheon commented Jan 5, 2026

LGTM once comment addressed

This variable is set by hack/bats and it fails if PODMAN_CMD is unset.

Signed-off-by: Ricardo Branco <rbranco@suse.de>
@ricardobranco777
Copy link
Contributor Author

LGTM as best I can tell. Clearly an improvement over main when run with PODMAN_BATS_LEAK_CHECK set.

I was wondering why you didn't catch it earlier in your CI.

@ricardobranco777
Copy link
Contributor Author

Full verification run for latest change: https://openqa.opensuse.org/tests/5580232

Copy link
Member

@Luap99 Luap99 left a comment

Choose a reason for hiding this comment

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

I was wondering why you didn't catch it earlier in your CI.

Because we don't run with this option set in CI, which is the reason why we have this option to begin with. The leak check is considered to "slow" so we don't do it. WE rather have the few minutes of CI speed up

LGTM

@Luap99 Luap99 merged commit 417d82b into containers:main Jan 5, 2026
54 of 56 checks passed
@ricardobranco777
Copy link
Contributor Author

I was wondering why you didn't catch it earlier in your CI.

Because we don't run with this option set in CI, which is the reason why we have this option to begin with. The leak check is considered to "slow" so we don't do it. WE rather have the few minutes of CI speed up

LGTM

Wow. Our openQA jobs run for like ~2 hours on x86_64. Will check how much they take without this option and maybe unset it in slower arches like aarch64 & ppc64le.

@ricardobranco777 ricardobranco777 deleted the fix_bats_leak_check branch January 5, 2026 17:53
@Luap99
Copy link
Member

Luap99 commented Jan 5, 2026

see 81c90f5 for the history, I noted 400s back then (on x86_64) and of course with the more test cases it is likely more now. However that is only them not run in parallel, in parallel we cannot do the check anyway.

It is certainly good that we have someone testing with this option on regular to avoid broken or buggy tests. I agree that turning off on certain arches is fine.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants