mirror of
https://codeberg.org/shufflecake/shufflecake-c.git
synced 2026-01-04 18:15:27 -05:00
bugfix: Fix test script usinf ext4 instead of VFAT
This commit is contained in:
parent
a723756544
commit
717e89ddcb
1 changed files with 9 additions and 9 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue