[LTP] [PATCH v1] msync04: Check disk content if dirty bit check failed

Wei Gao wegao@suse.com
Wed May 29 08:03:52 CEST 2024


On Tue, May 28, 2024 at 02:39:45PM +0200, Petr Vorel wrote:
> > Hi Petr!
> 
> > Overall this looks correct. But what this test really does is that it
> > verifies msync(2) is clearing dirty page bits. That is not very useful
> > verification from userspace point of view (as IMO it leans too much on
> > internal kernel implementation details). msync(2) is really a data
> > integrity operation so ideally its tests would verify data integrity
> > guarantees are met after a power failure - that is what userspace is
> > interested in. But probably these test are more within the realm of fstests
> > (where we do similar tests) as LTP lacks necessary infrastructure to do
> > this low-level filesystem manipulation so I guess what you have is fine.
> 
> Thanks for having a deeper look and explanation! I guess we take it and we can
> think how hard would be to implement the hard way (abort fs), as Cyril wanted we
> do it.  Or we at least add direct IO. (update that in the ticket:
> https://github.com/linux-test-project/ltp/issues/1157).
> And sure, if anybody adds msync() support to fstests, that would be the best.
> 
> But for now I merged it with your RBT (I'm sorry if I was too inventive to add
> it) to get some improvement (hope that without direct IO we did not actually
> turned it into false negative).
> 
> @Wei: feel free to further improve it.
Thanks Petr and Jan's feedback, i will continue do improve on this case such as
add direct IO firstly.

> 
> Kind regards,
> Petr
> 
> > 								Honza


More information about the ltp mailing list