On 2023-07-24 08:29:26, Christoph Hellwig wrote: > Test the removal of the underlying device when the file system still > has dirty data. > > snip > > +rm -rf $SCSI_DEBUG_MNT > +mkdir $SCSI_DEBUG_MNT > +run_check _mount $SCSI_DEBUG_DEV $SCSI_DEBUG_MNT > + > +# create a test file > +$XFS_IO_PROG -f -c "pwrite 0 1M" $SCSI_DEBUG_MNT/testfile >>$seqres.full > + > +# open a file descriptor for reading the file > +exec 3< $SCSI_DEBUG_MNT/testfile > + > +# delete the scsi debug device while it still has dirty data > +echo 1 > /sys/block/$(_short_dev $SCSI_DEBUG_DEV)/device/delete > + > +# try to read from the file, which should give us -EIO > +cat <&3 > /dev/null hmm, maybe I missing something but won't cat always return -EIO here? I suppose the test will also pass without the behaviour you introduced. -- - Andrey