[go: up one dir, main page]

test-run fails if $CH_TEST_IMGDIR contains a symlink

E.g.:

$ echo $CH_TEST_IMGDIR
/var/tmp/images
$ realpath /var/tmp/images
/ram/var/tmp/images
$ ls -l /var/tmp
lrwxrwxrwx 1 root root 12 May 26  2015 /var/tmp -> /ram/var/tmp
$ make test-run
bats run.bats run_uidgid.bats run_auto.bats
[...]
 ✗ ch-run --bind errors
   (in test file run.bats, line 367)
     `[[ $output =~ $r ]]' failed
   ch-run: --bind can be used at most 10 times (ch-run.c:330)
   ch-run: option requires an argument -- 'b'
   Try `ch-run --help' or `ch-run --usage' for more information.
   ch-run: --bind: no source provided (ch-run.c:337)
   ch-run: --bind: no source provided (ch-run.c:337)
   ch-run: --bind: no destination provided (ch-run.c:338)
   ch-run: can't bind /var/tmp/images/hoops to /ram/var/tmp/images/chtest/mnt/0: No such file or directory (ch-run.c:242 2)

I believe the problem is that the tests are looking for $CH_TEST_IMGDIR verbatim in the output, but it's the canonical path that's printed in the error message.