bugfix: Fix test script usinf ext4 instead of VFAT

This commit is contained in:
Tommaso Gagliardoni 2025-10-19 23:49:40 +02:00
parent a723756544
commit 717e89ddcb

View file

@ -307,11 +307,11 @@ confirm() {
echo -e "${BLUE}Are you sure you want to proceed? All data on disk \"$BLOCK_DEVICE\" will be erased. (y/n)${NC}"
read -r response
case "$response" in
[yY] | [yY][eE][sS]) # Responded Yes
return 0 # Return 0 for Yes (success, convention for bash scripting)
[yY] | [yY][eE][sS]) # Responded Yes
return 0 # Return 0 for Yes (success, convention for bash scripting)
;;
[nN] | [nN][oO]) # Responded No
return 1 # Return 1 for No (error, convention for bash scripting)
[nN] | [nN][oO]) # Responded No
return 1 # Return 1 for No (error, convention for bash scripting)
;;
*) # Responded something else
echo "Please press only (y)es or (n)o."
@ -492,7 +492,7 @@ do_test() {
echo "New: $NEW_HASH2" >&2
exit 1
fi
# --- STAGE 4: CHECK SLICE RECOVERY (GARBAGE COLLECTION) ---
echo -e "${BLUE}--- STAGE 4: Checking slice recovery (garbage collection) ---${NC}"
@ -592,7 +592,7 @@ do_test() {
local SLICES_RECOVERED
SLICES_RECOVERED=$((SLICES_AFTER - SLICES_BEFORE))
local TOTAL_DELETED=1500 # 100MiB + 1400MiB = 1500 slices
local EXPECTED_RECOVERY=1200 # 80% of 1500, to account for filesystem shenanigans
local EXPECTED_RECOVERY=1200 # 80% of 1500
echo "Total slices deleted (approx): $TOTAL_DELETED"
echo "Slices recovered: $SLICES_RECOVERED"
@ -604,7 +604,7 @@ do_test() {
echo -e "${RED}FAILURE: Slice recovery test FAILED! Recovered only $SLICES_RECOVERED slices (< $EXPECTED_RECOVERY).${NC}" >&2
exit 1
fi
echo -e "${GREEN}--- ALL CONSISTENCY TESTS PASSED ---${NC}"
# The cleanup trap will handle unmounting and closing.
}
@ -617,9 +617,9 @@ do_test() {
#####################################################################
# BANNER
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 79 chars
# xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 79 chars
echo -e "${BLUE}===============================================================================${NC}"
echo -e "${BLUE} Consistency Test for Shufflecake Lite${NC}"
echo -e "${BLUE} Consistency Test for Shufflecake Lite${NC}"
echo -e "${BLUE}===============================================================================${NC}"
while [ "$#" -gt 0 ]; do