common/encrypt: Create an encrypted equivalent of _scratch_mkfs_sized
authorAri Sundholm <ari@tuxera.com>
Thu, 21 Dec 2017 22:10:05 +0000 (00:10 +0200)
committerEryu Guan <eguan@redhat.com>
Sun, 31 Dec 2017 12:49:36 +0000 (20:49 +0800)
commit79a3bb053fecd883f38dacb44ddca9a3125dfd9d
tree1cf61b0aaae07eeb501d9a13f1034d675b850f15
parent5525ac5228098683cf9639de2f2cff029eb0db5e
common/encrypt: Create an encrypted equivalent of _scratch_mkfs_sized

Test case generic/399 hardcodes "-O encrypt" in MKFS_OPTIONS when
calling _scratch_mkfs_sized, which only works with the mkfs of
certain filesystems. Create a new helper,
_scratch_mkfs_sized_encrypted, for handling the differences between
the mkfs tools of different filesystems. It also allows those
filesystems whose mkfs doesn't accept "-O encrypt" to skip the test
gracefully until proper support is added for them in the helper.

ubifs is not supported in the new helper despite supporting
encryption, as _scratch_mkfs_sized has no ubifs support and adding
that should be done in a separate patch.

Signed-off-by: Ari Sundholm <ari@tuxera.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/encrypt
tests/generic/399