]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
populate: require e2image before populating
authorDarrick J. Wong <djwong@kernel.org>
Wed, 12 Oct 2022 01:45:44 +0000 (18:45 -0700)
committerZorro Lang <zlang@kernel.org>
Sat, 15 Oct 2022 05:04:33 +0000 (13:04 +0800)
Use $E2IMAGE_PROG, not e2image, and check that it exists before
proceeding.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/populate

index 09b86af254d079ad29d18e9a8614990e637427d3..5a7476fe2853ca5df6901b6284e3b5e08018bfbc 100644 (file)
@@ -18,6 +18,7 @@ _require_populate_commands() {
                ;;
        ext*)
                _require_command "$DUMPE2FS_PROG" "dumpe2fs"
+               _require_command "$E2IMAGE_PROG" "e2image"
                ;;
        esac
 }
@@ -874,7 +875,7 @@ _scratch_populate_restore_cached() {
                return $res
                ;;
        "ext2"|"ext3"|"ext4")
-               e2image -r "${metadump}" "${SCRATCH_DEV}"
+               $E2IMAGE_PROG -r "${metadump}" "${SCRATCH_DEV}"
                ret=$?
                test $ret -ne 0 && return $ret