Re: [PATCH] selftests/mm: skip khugepaged file tests if mkfs.xfs is unavailable
From: Jaeyeon Lee
Date: Sat Sep 12 2026 - 09:39:46 EST
On Sat, Sep 12, 2026 at 2:06 AM Zi Yan <ziy@xxxxxxxxxx> wrote:
> This might be more robust, since it can detect mkfs.xfs and mount failures.
>
> if grep xfs /proc/filesystems &>/dev/null; then
> XFS_IMG=$(mktemp /tmp/xfs_img_XXXXXX)
> XFS_DIR=$(mktemp -d /tmp/xfs_dir_XXXXXX)
> truncate -s 314572800 ${XFS_IMG}
> if mkfs.xfs -q ${XFS_IMG} && mount -t xfs -o loop ${XFS_IMG} ${XFS_DIR}; then
> SPLIT_HUGE_PAGE_TEST_XFS_PATH=${XFS_DIR}
> MOUNTED_XFS=1
> else
> rmdir ${XFS_DIR}
> rm -f ${XFS_IMG}
> fi
> fi
I'll send v2 with this, adding a Suggested-by: tag and fixing the
Assisted-by: tag format.
Thanks for the review.
Best regards,
Jaeyeon Lee