Skip to content

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

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

test/system: Unbreak the line count checks with Bats >= 1.10.0#1387
debarshiray merged 2 commits intocontainers: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-project-zuul
Copy link
Copy Markdown

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/e50c361be8214858943dd9261c1f7d6a

✔️ unit-test SUCCESS in 9m 13s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 4m 09s
✔️ unit-test-restricted SUCCESS in 8m 10s
system-test-fedora-rawhide FAILURE in 47m 22s
system-test-fedora-39 TIMED_OUT in 40m 52s
system-test-fedora-38 TIMED_OUT in 40m 33s
✔️ system-test-fedora-37 SUCCESS in 39m 34s

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-project-zuul
Copy link
Copy Markdown

Build failed.
https://softwarefactory-project.io/zuul/t/local/buildset/766e07859a0e4f50936e0ad450106fc6

✔️ unit-test SUCCESS in 8m 40s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 41s
✔️ unit-test-restricted SUCCESS in 7m 41s
system-test-fedora-rawhide FAILURE in 40m 09s
system-test-fedora-39 FAILURE in 38m 33s
✔️ system-test-fedora-38 SUCCESS in 34m 12s
✔️ system-test-fedora-37 SUCCESS in 34m 17s

@debarshiray
Copy link
Copy Markdown
Member Author

debarshiray commented Oct 12, 2023

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