[PATCH] erofs-utils: tests: fix compression algorithms check

Hongzhen Luo hongzhen at linux.alibaba.com
Thu Oct 10 22:49:57 AEDT 2024


On 2024/10/10 17:51, Hongzhen Luo wrote:
> When checking with _require_erofs_compression(), the error "xxx is
> not a block device" occurs. This patch adds "-o loop" to address this
> issue.
>
> Fixes: ace04f5bbc5c ("erofs-utils: tests: add compression algorithms
> check for tests")
>
> Signed-off-by: Hongzhen Luo <hongzhen at linux.alibaba.com>
> ---
>   tests/common/rc | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/common/rc b/tests/common/rc
> index b739089..4fb4674 100644
> --- a/tests/common/rc
> +++ b/tests/common/rc
> @@ -157,7 +157,7 @@ _require_erofs_compression()
>   	truncate -s 1m $random_dir/test/file > /dev/null 2>&1
>   
>   	eval "$MKFS_EROFS_PROG $opt $random_dir/tmp.erofs $random_dir/test" >> /dev/null 2>&1
> -	_try_mount $random_dir/tmp.erofs $random_dir/mnt || \
> +	_try_mount -o loop $random_dir/tmp.erofs $random_dir/mnt || \
>   		_notrun "fail to mount filesystem in _require_erofs_compression"
>   	_do_unmount $random_dir/mnt
>   

It appears that this fix is not universal (at least for erofsfuse), so 
please disregard this patch.

===

Thansks,

Hongzhen Luo




More information about the Linux-erofs mailing list