History log of /external/ltp/include/tst_device.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d32c741e0b093614d337a3e28687863495f5b9d5 31-Aug-2017 Cyril Hrubis <chrubis@suse.cz> lib/tst_mkfs: Clear first 512k of the device

If we cal tst_mkfs() from a test more than once we end up with the very
same bug we already fixed by clearing the device in
tst_acquire_device(), i.e. some mkfs programs will not format it when
there is a valid FS signature there. But we have to clear the device for
the shell tests as well.

So this commit adds tst_clear_device() function that is both called from
the tst_mkfs() and from the shell tst_device helper to clear up the
first 512k of the device.

Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/include/tst_device.h
bbdb9f78378c7e038f463efa39d2470e1c51ad54 16-Mar-2016 Cyril Hrubis <chrubis@suse.cz> lib: Add new test library API

The main features are:

o The cleanup callback is not passed directly to various library functions but
is set once globally in the structure that describes a test

- this makes the test API easier to use

- also fixes a few common mistakes such as passing cleanup callback
to functions executed from a cleanup

o Most of the boilerplate code is moved to library

- no more copying standard looping code around :)

o Various resources are initialized and freed automatically when requested

- this means much less race conditions and ordering problems in cleanups

o The result reporting functions now use shared memory to propagate
test results from child processes

- writing tests in child processes is now easier than ever

+ The test-writing-guidelines.txt were updated

Many thanks to Jan who reviewed numerous respins of this patches and
provided valuable suggestions and also to Alexey who pointed out some
stupid mistakes of mine.

Reviewed-by: Jan Stancek <jstancek@redhat.com>
Signed-off-by: Cyril Hrubis <chrubis@suse.cz>
/external/ltp/include/tst_device.h