[LTP] [PATCH v3 15/16] fs/fs_fill: Add a test to fill a FS in a few threads

Cyril Hrubis chrubis@suse.cz
Thu Nov 9 11:50:53 CET 2017


Hi!
> > The correct fix is to use open() instead of SAFE_OPEN() in the
> > tst_fill_fs() and just return from the function when we get ENOSPC. I
> > can fix that, or you can send the patch. Either way thanks for pointing
> > out the mistake.
> 
> The broken are not only in tst_fills_fs() function but also come from
> SAFE_MKDIR(w->dir, 0700),

Ok, we have to create the directories in the testrun() function before
we attempt to run the threads, that should fix this particular problem.

> SAFE_OPENDIR(w->dir) and SAFE_UNLINK(file).

The opendir() should not fail with ENOSPC since that only reads the
directory content.

And the unlink() should not fail with ENOSPC as well. Since unlink()
actually deletes a file, if that breaks because filesystem is full
you lost since you cannot free any space by removing files...

So fixing the tst_fill_fs() and doing the mkdir() before we start these
threads should IMHO fix the test.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list