Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

tests fail with Bats 0.4.0, which is latest in EPEL #552

Closed
reidpr opened this issue Sep 24, 2019 · 1 comment
Closed

tests fail with Bats 0.4.0, which is latest in EPEL #552

reidpr opened this issue Sep 24, 2019 · 1 comment
Assignees
Labels
Milestone

Comments

@reidpr
Copy link
Collaborator

reidpr commented Sep 24, 2019

The test suite fails with Bats version 0.4.0, which is what's currently in EPEL (sstephenson/bats@3b33a5a):

 ✗ broken image errors
   (in test file run/ch-run_misc.bats, line 582)
     `rm "${img}/${f}"' failed
   ch-run[19016]: can't execve(2): /bin/true: No such file or directory (charliecloud.c:476 2)
   required: etc/group etc/passwd
   rm: cannot remove '/tmp/bats.tmp.charlie/broken-image/etc/group etc/passwd': No such file or directory

The problem is that Bats' run command does not restore $IFS, so word breaking no longer works after you call it. This was fixed in PR sstephenson/bats#90, but the EPEL package does not have that PR.

The embedded Bats via our Git submodule works because it's Git master and does have the PR, but we want to get rid of embedded Bats.

We want the test suite to pass using readily available Bats, which it currently does not on RHEL/CentOS/Fedora.

I see two options:

  1. Wrap Bats run to restore $IFS. This would make EPEL Bats work, but adds cruft to our code.
  2. Require a Bats with the bug fix in question. This would have less cruft but require:
    • Update the Bats RPM. Currently it is unmaintained, and may be replaced with Bats-core, which does seem to have the bug fix. (Bats is no longer maintained upstream, and Bats-core is a maintained fork.)
    • Test that the Bats in use does not have the bug.
    • Document the required Bats version, which is more complicated than stating a simple version number.
@reidpr reidpr added the bug label Sep 24, 2019
@reidpr reidpr added this to the next milestone Sep 24, 2019
@reidpr
Copy link
Collaborator Author

reidpr commented Sep 24, 2019

Note that Debian Stretch (9) and Buster (10) both have the buggy Bats as well, and it seems Debian Bullseye (11) will have Bats-core.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants