It that appears using the `source` builtin with process substitution
yields a race condition:
./tests$ ./bitlk-compat-test; echo RV=$?
HEADER CHECK
bitlk-images/bitlk-aes-cbc-128-4k.img [OK]
bitlk-images/bitlk-aes-cbc-128.img [OK]
bitlk-images/bitlk-aes-cbc-256.img [OK]
bitlk-images/bitlk-aes-cbc-elephant-128.img [OK]
bitlk-images/bitlk-aes-cbc-elephant-256.img [OK]
bitlk-images/bitlk-aes-xts-128-4k.img [OK]
bitlk-images/bitlk-aes-xts-128-eow.img./bitlk-compat-test: trap: line 2: unexpected EOF while looking for matching `)'
./bitlk-compat-test: command substitution: line 70: syntax error near unexpected token `)'
./bitlk-compat-test: command substitution: line 70: `echo "$dump" | grep "Volume size:" | cut -d: -f2 | tr -d "\t\n ")'
WARNING: You must be root to run activation part of test, test skipped.
RV=0
This is with bash 5.2.37 on a Debian sid system. It doesn't fail the
test, but affects coverage as subsequent images are not tested.
`eval`'ing the output of a pipe solves the race condition.
It's arguably not robust code, but load_vars() appears to make
assumption about images.conf's content and didn't account for edge cases
either.