Skip to content

test/system: Unbreak the line count checks with Bats >= 1.10.0 - #1387

Merged
debarshiray merged 2 commits into
containers:mainfrom
debarshiray:wip/rishi/test-system-bats-1.10-keep-empty-lines
Oct 12, 2023
Merged

debarshiray merged 2 commits into
containers:mainfrom
debarshiray:wip/rishi/test-system-bats-1.10-keep-empty-lines

Conversation

@debarshiray

Copy link
Copy Markdown
Member

Until Bats 1.10.0, 'run --keep-empty-lines' had a bug where it counted the trailing newline on the last line as a separate line [1]. However, Bats 1.10.0 is only available in Fedora >= 39 and is absent from Fedoras 37 and 38.

[1] Bats commit 6648e2143bffb933
bats-core/bats-core@6648e2143bffb933
bats-core/bats-core#708

Until Bats 1.10.0, 'run --keep-empty-lines' had a bug where it counted
the trailing newline on the last line as a separate line [1].  However,
Bats 1.10.0 is only available in Fedora >= 39 and is absent from Fedoras
37 and 38.

[1] Bats commit 6648e2143bffb933
    bats-core/bats-core@6648e2143bffb933
    bats-core/bats-core#708

containers#1387
@debarshiray
debarshiray force-pushed the wip/rishi/test-system-bats-1.10-keep-empty-lines branch from 6fb06c7 to 7abfa70 Compare October 12, 2023 09:11
@softwarefactory-delete-me

Copy link
Copy Markdown

With the recent expansion of the test suite, it's necessary to increase
the timeout for all Fedora nodes to prevent the CI from timing out.

containers#1387
@softwarefactory-delete-me

Copy link
Copy Markdown

@debarshiray

debarshiray commented Oct 12, 2023 •

Copy link
Copy Markdown
Member Author

This pull requests fixes some of the test failures on Fedora Rawhide and Fedora 39.

Before this, there were some failures caused by the com.github.containers.toolbox label being missing from the fedora-toolbox:39 and fedora-toolbox:40 images available from registry.fedoraproject.org. This happened during the ToolbxReleaseBlocker Change for Fedora 39 that started building the images as part of the nightly Fedora composes. The images got migrated from Dockerfiles to fedora-kickstart and pungi-fedora, and this bug crept in during the transition.

The only failures left are these two:

fedora-rawhide | not ok 3 help: Run command 'help' in 177ms
fedora-rawhide | # (from function `assert_line' in file test/system/libs/bats-assert/src/assert.bash, line 479,
fedora-rawhide | #  in test file test/system/002-help.bats, line 45)
fedora-rawhide | #   `assert_line --index 0 --partial "toolbox(1)"' failed
fedora-rawhide | # /usr/bin/man
fedora-rawhide | #
fedora-rawhide | # -- line does not contain substring --
fedora-rawhide | # index     : 0
fedora-rawhide | # substring : toolbox(1)
fedora-rawhide | # line      : troff:<standard input>:33: warning: cannot select font 'C'
fedora-rawhide | # --
fedora-rawhide | #
...
...
fedora-rawhide | not ok 5 help: Use flag '--help' (it should show usage screen) in 649ms
fedora-rawhide | # (from function `assert_output' in file test/system/libs/bats-assert/src/assert.bash, line 247,
fedora-rawhide | #  in test file test/system/002-help.bats, line 69)
fedora-rawhide | #   `assert_output --partial "toolbox - Tool for containerized command line environments on Linux"' failed
fedora-rawhide | #
fedora-rawhide | # -- output does not contain substring --
fedora-rawhide | # substring (1 lines):
fedora-rawhide | #   toolbox - Tool for containerized command line environments on Linux
fedora-rawhide | # output (174 lines):
fedora-rawhide | #   troff:<standard input>:33: warning: cannot select font 'C'
fedora-rawhide | #   troff:<standard input>:43: warning: cannot select font 'C'
fedora-rawhide | #   troff:<standard input>:69: warning: cannot select font 'C'
...
...

These test failures are caused by a bug in go-md2man(1) that was exposed by GNU roff 1.23. They will go away once we have a new go-md2man in Fedora >= 39.

@debarshiray
debarshiray merged commit b8138e0 into containers:main Oct 12, 2023
@debarshiray
debarshiray deleted the wip/rishi/test-system-bats-1.10-keep-empty-lines branch October 12, 2023 12:14
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jan 27, 2026
Until Bats 1.10.0, 'run --keep-empty-lines' had a bug where it counted
the trailing newline on the last line as a separate line [1].  However,
Bats 1.10.0 is only available in Fedora >= 39 and is absent from Fedoras
37 and 38.

[1] Bats commit 6648e2143bffb933
    bats-core/bats-core@6648e2143bffb933
    bats-core/bats-core#708

containers#1352
containers#1387
containers#1744
(backported from commits f716b23 and
 7abfa70)
debarshiray added a commit to debarshiray/toolbox that referenced this pull request Jan 27, 2026
With the recent expansion of the test suite, it's necessary to increase
the timeout for all Fedora nodes to prevent the CI from timing out.

containers#1387
containers#1744
(cherry picked from commit b8138e0)
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.

1 participant