fix filesystem test

This commit is contained in:
Tobias Powalowski 2024-07-11 20:20:05 +02:00
parent 15f46f74f8
commit 212b62d08a

View file

@ -90,20 +90,22 @@ for i in $(pacman -Ql $(pacman -Q | sd ' .*' '') | rg -o '/usr/share/licenses/.*
[[ -e "${i}" ]] || echo "${i}" | rg -v '/xz/' >>license-error.txt [[ -e "${i}" ]] || echo "${i}" | rg -v '/xz/' >>license-error.txt
done done
_result license-error.txt _result license-error.txt
_run_test "filesystems..." _run_test "filesystems"
for i in bcachefs btrfs ext4 swap vfat xfs; do for i in bcachefs btrfs ext4 swap vfat xfs; do
dd if=/dev/zero of=/test.img bs=1M count=1000 &>"${_NO_LOG}" dd if=/dev/zero of=/test.img bs=1M count=1000 &>"${_NO_LOG}"
sync
if [[ "${i}" == "swap" ]]; then if [[ "${i}" == "swap" ]]; then
mkswap /test.img &>"${_NO_LOG}" || echo "Creation error: ${i}" >> filesystems-error.log mkswap /test.img &>"${_NO_LOG}" || echo "Creation error: ${i}" >> filesystems-error.log
sync
else else
mkfs.${i} /test.img &>"${_NO_LOG}" || echo "Creation error: ${i}" >> filesystems-error.log mkfs.${i} /test.img &>"${_NO_LOG}" || echo "Creation error: ${i}" >> filesystems-error.log
sleep 1 sync
mount -o loop /test.img /mnt || echo "Mount error: ${i}" >> filesystems-error.log mount -o loop /test.img /mnt &>"${_NO_LOG}" || echo "Mount error: ${i}" >> filesystems-error.log
umount /mnt umount /mnt
fi fi
done done
_result filesytems-error.log _result filesytems-error.log
_run_test "Wi-Fi iwctl..." _run_test "Wi-Fi iwctl"
archboot-hwsim.sh test &>"${_NO_LOG}" archboot-hwsim.sh test &>"${_NO_LOG}"
iwctl station wlan1 scan iwctl station wlan1 scan
sleep 5 sleep 5