]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commit
generic/108: fix test hand upon failure to create LV
authorOjaswin Mujoo <ojaswin@linux.ibm.com>
Wed, 7 Jan 2026 10:37:44 +0000 (16:07 +0530)
committerZorro Lang <zlang@kernel.org>
Sun, 18 Jan 2026 17:23:25 +0000 (01:23 +0800)
commita4dbdc5486b43294f73c44f62cc355cc3ed2458e
tree259ff78385dcd70af4e9f9c8ad911f3b1d63baac
parente0ded76267f99ecfeb3e27696489df98d75d7209
generic/108: fix test hand upon failure to create LV

In case the lvcreate operation fails, we don't catch the error and
proceed as usual. The test then tries to wait for the LV to come up
but it never does, causing a hang.

To fix this:
1. Add a check to ensure SCSI_DEBUG dev is of required size
2. Additionally, fail if there are errors while creating the LV.

Context for completeness:

This was noticed when we accidentally used CONFIG_SCSI_DEBUG=y instead
of =m, causing it to create an 8MB SCSI debug device. This led to the
lvcreate operation to fail with:

  Insufficient suitable allocatable extents for logical volume lv_108: 68 more required

However the test never caught this resulting in a hang.

Signed-off-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
Reported-by: Disha Goel <disgoel@linux.ibm.com>
Tested-by: Disha Goel <disgoel@linux.ibm.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Zorro Lang <zlang@redhat.com>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/generic/108