aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2013-11-06 19:30:09 -0500
committerDan Williams <dan.j.williams@intel.com>2013-11-14 14:04:40 -0500
commit2d88ce76eb98c4ac4411dcb299cf61ca8999d2b9 (patch)
tree2422e0f7dcb01fdc596c8806174c69508aad2540 /Documentation
parent86727443a04fdb25397041188efd2527f2b7237b (diff)
dmatest: add a 'wait' parameter
Allows for scripting test runs by module load / unload. Prevent module load from returning until 'iterations' (finite) tests have completed, or cause reads of the 'wait' parameter in sysfs to pause until the tests are done. Also killed the local waitqueue since we can just let the thread exit naturally as long as we hold a reference. Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/dmatest.txt27
1 files changed, 17 insertions, 10 deletions
diff --git a/Documentation/dmatest.txt b/Documentation/dmatest.txt
index 0beb4b68d81f..dd77a81bdb80 100644
--- a/Documentation/dmatest.txt
+++ b/Documentation/dmatest.txt
@@ -39,17 +39,24 @@ stops.
39 39
40Note that running a new test will not stop any in progress test. 40Note that running a new test will not stop any in progress test.
41 41
42The following command should return actual state of the test. 42The following command returns the state of the test.
43 % cat /sys/kernel/debug/dmatest/run 43 % cat /sys/module/dmatest/parameters/run
44 44
45To wait for test done the user may perform a busy loop that checks the state. 45To wait for test completion userpace can poll 'run' until it is false, or use
46the wait parameter. Specifying 'wait=1' when loading the module causes module
47initialization to pause until a test run has completed, while reading
48/sys/module/dmatest/parameters/wait waits for any running test to complete
49before returning. For example, the following scripts wait for 42 tests
50to complete before exiting. Note that if 'iterations' is set to 'infinite' then
51waiting is disabled.
46 52
47 % while [ $(cat /sys/module/dmatest/parameters/run) = "Y" ] 53Example:
48 > do 54 % modprobe dmatest run=1 iterations=42 wait=1
49 > echo -n "." 55 % modprobe -r dmatest
50 > sleep 1 56...or:
51 > done 57 % modprobe dmatest run=1 iterations=42
52 > echo 58 % cat /sys/module/dmatest/parameters/wait
59 % modprobe -r dmatest
53 60
54 Part 3 - When built-in in the kernel... 61 Part 3 - When built-in in the kernel...
55 62
@@ -79,7 +86,7 @@ number of tests executed, number that failed, and a result code.
79 86
80Example: 87Example:
81 % dmesg | tail -n 1 88 % dmesg | tail -n 1
82 dmatest: dma3chan0-copy0: summary 400000 tests, 0 failures iops: 61524 KB/s 246098 (0) 89 dmatest: dma0chan0-copy0: summary 1 test, 0 failures 1000 iops 100000 KB/s (0)
83 90
84The details of a data miscompare error are also emitted, but do not follow the 91The details of a data miscompare error are also emitted, but do not follow the
85above format. 92above format.