Files
cryptsetup/tests
Guilhem Moulin 9b5ed35078 bitlk-compat-test: Use eval in load_vars().
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.
2025-06-16 17:34:12 +02:00
..
2025-05-22 14:48:56 +02:00
2022-01-21 12:29:36 +01:00
2025-01-15 23:09:36 +01:00
2025-01-27 11:05:08 +00:00
2025-01-15 23:09:36 +01:00
2022-11-14 21:50:18 +01:00
2024-03-07 11:30:21 +00:00
2025-05-22 14:48:56 +02:00
2025-01-15 23:09:36 +01:00
2025-01-15 23:09:36 +01:00
2025-01-15 23:09:36 +01:00