Message ID | 172912045609.2583984.9245803618825626168.stgit@frogsfrogsfrogs (mailing list archive) |
---|---|
State | Deferred, archived |
Headers | show |
Series | [1/2] common/xfs: _notrun tests that fail due to block size < sector size | expand |
On Wed, Oct 16, 2024 at 04:15:16PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@kernel.org> > > It makes no sense to fail a test that failed to format a filesystem with > a block size smaller than the sector size since the test preconditions > are not valid. Looks good: Reviewed-by: Christoph Hellwig <hch@lst.de>
On Wed, Oct 16, 2024 at 04:15:16PM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@kernel.org> > > It makes no sense to fail a test that failed to format a filesystem with > a block size smaller than the sector size since the test preconditions > are not valid. > > Signed-off-by: Darrick J. Wong <djwong@kernel.org> > --- Makes sense to me, Reviewed-by: Zorro Lang <zlang@redhat.com> > common/xfs | 5 +++++ > 1 file changed, 5 insertions(+) > > > diff --git a/common/xfs b/common/xfs > index 62e3100ee117a7..53d55f9907fbb0 100644 > --- a/common/xfs > +++ b/common/xfs > @@ -172,6 +172,11 @@ _try_scratch_mkfs_xfs() > mkfs_status=$? > fi > > + if [ $mkfs_status -ne 0 ] && grep -q '^block size [0-9]* cannot be smaller than sector size' "$tmp.mkfserr"; then > + errormsg="$(grep '^block size [0-9]* cannot be smaller than sector size' "$tmp.mkfserr" | head -n 1)" > + _notrun "_scratch_mkfs_xfs: $errormsg" > + fi > + > # output mkfs stdout and stderr > cat $tmp.mkfsstd > cat $tmp.mkfserr >&2 >
diff --git a/common/xfs b/common/xfs index 62e3100ee117a7..53d55f9907fbb0 100644 --- a/common/xfs +++ b/common/xfs @@ -172,6 +172,11 @@ _try_scratch_mkfs_xfs() mkfs_status=$? fi + if [ $mkfs_status -ne 0 ] && grep -q '^block size [0-9]* cannot be smaller than sector size' "$tmp.mkfserr"; then + errormsg="$(grep '^block size [0-9]* cannot be smaller than sector size' "$tmp.mkfserr" | head -n 1)" + _notrun "_scratch_mkfs_xfs: $errormsg" + fi + # output mkfs stdout and stderr cat $tmp.mkfsstd cat $tmp.mkfserr >&2