[go: up one dir, main page]

tests fail if /tmp is a symlink

E.g.:

$ ls -l /tmp
lrwxrwxrwx 1 root root 8 May 17 12:14 /tmp -> /ram/tmp

then:

 ✗ broken image errors
   (in test file run/ch-run_misc.bats, line 309)
     `[[ $output = *"can't bind: not found: ${img}/${f}"* ]]' failed
   ch-run[6365]: can't execve(2): true: No such file or directory (charliecloud.c:430 2)
   required: etc/group
   ls: cannot access /tmp/bats.tmp.reidpr/broken-image/etc/group: No such file or directory
   ch-run[6396]: can't bind: not found: /ram/tmp/bats.tmp.reidpr/broken-image/etc/group (charliecloud.c:122)

Note that the error message is actually correct, but the tests aren't matching it because they expect /tmp and the message says /ram/tmp.

One can't simply canonicalize $BATS_TMPDIR, because then you run into #278 (closed).

A decent fix for now would be to use regular expressions in the test to allow any image, instead of ${img}.