Compressed File System Tests
----------------------------
-Tested cramfs.
+Tested cramfs and squashfs.
The cramfs configuration by default, uses tmpfs as the leftmost branch,
because this is a common user configuration scenario.
# cramfs is special: only thek rightmost filesystem uses it but the cramfs
# will be generated *inside* run-tests, because this is a read-only file
# system and each test has a different configuration.
- cramfs )
+ cramfs | squashfs )
SPECIAL_FS=${MYFS}
FS0=tmpfs
FS1=ext2
# cramfs is special: only thek rightmost filesystem uses it but the cramfs
# will be generated *inside* run-tests, because this is a read-only file
# system and each test has a different configuration.
- cramfs )
+ cramfs | squashfs )
SPECIAL_FS=${MYFS}
FS0=tmpfs
FS1=ext2
# show internal state in yellow
echo -e -n "\033[1;33m${fs}@/n/lower/b$i\033[m "
test -n "$OUTPUT_COLOR" && echo -e -n "\033[${OUTPUT_COLOR}m"
- tmpimg=/tmp/$fs.img.$i
- runcmd mkfs -t $fs /n/lower/b$i $tmpimg
+ tmpimg=/tmp/fs.img.$i
+ case $fs in
+ cramfs )
+ runcmd mkfs -t $fs /n/lower/b$i $tmpimg
+ ;;
+ squashfs )
+ runcmd mksquashfs /n/lower/b$i $tmpimg -noappend > /dev/null 2>&1
+ ;;
+ esac
runcmd mount -t $fs -o loop $tmpimg /n/lower/b$i
CRAMFS_BRANCHES="$CRAMFS_BRANCHES $i"
;;
function uncramit {
for i in $CRAMFS_BRANCHES ; do
runcmd umount /n/lower/b$i
+ rm -f /tmp/fs.img.$i
done
}
# cramfs is special: only thek rightmost filesystem uses it but the cramfs
# will be generated *inside* run-tests, because this is a read-only file
# system and each test has a different configuration.
- cramfs )
+ cramfs | squashfs )
SPECIAL_FS=${MYFS}
FS0=tmpfs
FS1=ext2