Debian Codegraph @

testsuite/lib/gen_load.exp

raw
1 # genload is used by stress test
2 proc gen_load {} {
3 # if 'genload' from the ltp exists, use it to create a real load
4 catch {exec which genload 2>/dev/null} genload
5 if {![file executable $genload]} {
6 set genload {/usr/local/ltp/testcases/bin/genload}
7 }
8 if [file executable $genload] {
9 exec $genload -c 10 -i 10 -m 10 -t 10
10 # ^^^^^ run for 10 seconds
11 # ^^^^^ 10 procs spinning on malloc
12 # ^^^^^ 10 procs spinning on sync
13 # ^^^^^ 10 procs spinning on sqrt
14 } else {
15 # sleep for a bit
16 wait_n_secs 10
17 }
18 return 0
19 }