Commit Graph

997 Commits

Author SHA1 Message Date
Daniel Wagner 7f92bfefa2 signaltest: Rename command line option --output to --json
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.

Thus let's make the command line option more specific and
rename it to --json.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-21 17:51:00 -04:00
Daniel Wagner 918172805a cyclicdeadline: Rename command line option --output to --json
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.

Thus let's make the command line option more specific and
rename it to --json.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-21 17:49:21 -04:00
Daniel Wagner bcb728ffd0 rt-migrate-test: Rename command line option --output to --json
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.

Thus let's make the command line option more specific and
rename it to --json.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-21 17:47:11 -04:00
Daniel Wagner 6638c4ce0f ptsematest: Rename command line option --output to --json
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.

Thus let's make the command line option more specific and
rename it to --json.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-21 17:45:14 -04:00
Daniel Wagner 15ba3045c4 pmqtest: Rename command line option --output to --json
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.

Thus let's make the command line option more specific and
rename it to --json.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
2021-05-21 17:41:07 -04:00
Daniel Wagner 868aceaf09 pi_stress: Rename command line option --output to --json
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.

Thus let's make the command line option more specific and
rename it to --json.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-21 17:38:36 -04:00
Daniel Wagner b63a591cbd oslat: Rename command line option --output to --json
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.

Thus let's make the command line option more specific and
rename it to --json.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-21 17:34:46 -04:00
Daniel Wagner 523f2cf71a cyclictest: Rename command line option --output to --json
The initial idea was to have several different output format
supported but it turns out everyone is happy with JSON, so
there is no need to add another format.

Thus let's make the command line option more specific and
rename it to --json.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-21 17:31:41 -04:00
Daniel Wagner 0d5692235b cyclicdeadline: Fix JSON output format
Add missing comma after the max entry.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-21 17:28:00 -04:00
Daniel Wagner c9051a36d9 ssdd: Add JSON output feature
Write the test results as JSON output to a file. This allows to
simplifies any parsing later on.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner a82c7e81b4 ssdd: Add quiet command line option
The quiet option is useful for automated test setups where
only the final result of the run is interesting.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner d7734bcae0 pi_stress: Add JSON output feature
Write the test results as JSON output to a file. This allows to
simplifies any parsing later on.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 77ae713003 pi_stress: Prepare command line parser for long options only
Introduce option value enums in order to be able to parse long options
only.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 9f90248b2d rt-util: Add return_code to common section of JSON output
Many rt-tests return an error code if the test fails. Let's add
this information to the common section.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 5f0864dda9 svsematest: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 69519203e6 sigwaittest: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 5d15b2e607 signaltest: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 5694e46b75 cyclicdeadline: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 4b7248df5c rt-migrate-test: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner ce0892a908 ptesematest: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 1f59a08599 pmqtest: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 78fd3bc873 oslat: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 426c94e536 cyclictest: Record start of test execution
Use rt_test_start() to record a timestamp when the test starts.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 19ae9c38b3 rt-util: Introduce rt_test_start()
For the JSON output records a timestamp when the test ended.
Let's introduce a new API to record a timestamp when the test
starts. We could put this into rt_init() but in this case we
would meassure also the time test needs to setup or warm up.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner a0dba1fe07 rt-util: Remove superfluous arguments from rt_write_json
We copy the command line via the rt_init() API and don't need
the argc, argv arguments for rt_write_json. Remove them.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 4b953580db svematest: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner a3a0a2e94f sigwaittest: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 38c7f1f36f signaltest: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner f80f2be8f5 cyclicdeadline: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 99654cb223 rt-migrate-test: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 516d926451 ptsematest: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner c88f922353 pmqtest: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 94bf9fc04d oslat: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 5e313b6c76 cyclictest: Initialize rt-util
Allow rt-util make a copy of the command line.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner a9fc7fac63 rt-util: Add rt_init function
rt_init() should be called as first in the test program.
The main job for this function is to copy the command line
before getopt() runs. By default, getopt_long() permutes
the contents of argv as it scans, so that eventually all the
nonoptions are at the end. This is confusing in the JSON
output, thus copy the command line before we call getopt_long().

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 3afeb71c96 signaltest: Add missing --output usage info
signaltest: Add missing --output usage info
Note: the code to process this was already in place, only the usage
info was missing.

Signed-off-by: Daniel Wagner <dwagner@suse.de>

Added missing commit description
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 9fc0d01904 cyclicdeadline: Remove unused include header
The header was introduced by 68621f3c33 ("cyclicdeadline: Add JSON
output feature")for PRIu64 format specifier. As PRIu64 was removed in
commit 51255cc14051 ("cyclicdeadline.c: Fix printf format specifier")
remove the include header again.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 3e72bd2732 cyclictest: Remove unused include header
The header was introduced by 24aaf9619b ("cyclictest: Add JSON
output feature") for PRIu64 format specifier. As PRIu64 was removed in
commit f6881fc42b ("cyclictest: Fix printf format specifier") remove
the include header again.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-05-07 12:24:45 -04:00
Daniel Wagner 95066b1a1a cyclicdeadline.c: Fix printf format specifier
The fields are not uint64 just longs, update the printf format
specifiers.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Also Reported-by: Signed-off-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-03-03 18:22:55 -05:00
Daniel Wagner f6881fc42b cyclictest: Fix printf format specifier
The fields are not uint64 just longs, update the printf format
specifiers.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Also Reported-by: Christian Eggers <ceggers@arri.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-03-03 18:22:38 -05:00
John Kacur 05a1170b8e rt-tests: cyclicdeadline.c: Remove dead code
In cyclicdeadline there is some unreachable code that was there from the
beginning. By inspection it looks like this change was the original
intention.

Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-25 20:22:45 -05:00
John Kacur e62593cd40 rt-tests: remove rt_numa_bitmask_count in rt_numa.h
Remove rt_numa_bitmask_count as it is unused.
The code uses numa_bitmask_weight() from numa instead

Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-24 11:20:21 -05:00
John Kacur 3aec580e90 rt-tests: Don't assume numa is available at runtime
- Rework numa_initialize a bit to return the status of numa
- Don't fail if numa is not available after the call to numa_initialize

Signed-off-by: John Kacur <jkacur@redhat.com>

arm32 seems to work fine.

Tested-by: Kurt Kanzenbach <kurt@linutronix.de> # arm32
2021-02-24 11:19:33 -05:00
John Kacur 6b9ac75508 Revert "signaltest: Always use libnuma"
This reverts commit 3079f1b10d.

libnuma is a build-time requirement but not a runtime requirement

Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-19 13:32:42 -05:00
John Kacur c30fa9fad6 Revert "cyclictest: Always use libnuma"
This reverts commit 512d2b7456.

libnuma is a buildtime requirement but not a runtime environment

Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-19 13:32:14 -05:00
John Kacur bdb8350f1b Revert "cyclictest: Use affinity_mask for steering thread placement"
This reverts commit 8305e65092.

Reverting to put back the code that allows us to run on machines
without libnuma.

However, there were some ideas in this patch that were not directly
related to that and could be revisited.

Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-19 13:30:45 -05:00
Peter Xu 29884cff63 oslat: Fix --cpu-list won't allow to schedule on all possible cores
parse_cpumask() is too strict for oslat, in that use_current_cpuset() will
filter out all the cores that are not allowed for current process to run.  This
seems to be unnecessary at least for oslat.  For example, the bash process that
runs the oslat program may have a sched affinity of 0-2, however it's still
legal to have it start a oslat thread running on the cores outside 0-2 as long
as the follow up sched_setaffinity() will succeed.

numa_parse_cpustring_all() suites exactly for this case, which should already
have considered sysconf(_SC_NPROCESSORS_ONLN) limit.  Use that instead.

Since at it, also remove initialization of cpu_set variable otherwise it's
leaked in previous parse_cpumask too: numa_parse_cpustring_all() will return a
newly allocated buffer already.  Quotting from manual:

    numa_parse_nodestring() parses a character string list of nodes into a bit
    mask.  The bit mask is allocated by numa_allocate_nodemask().

    numa_parse_nodestring_all() is similar to numa_parse_nodestring, but can
    parse all possible nodes, not only current nodeset.

Cc: John Kacur <jkacur@redhat.com>
Cc: Daniel Wagner <dwagner@suse.de>
Cc: Clark Williams <williams@redhat.com>
Reported-by: Pradipta Kumar Sahoo <psahoo@redhat.com>
Reported-by: Mike Stowell <mstowell@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-19 11:53:34 -05:00
Daniel Wagner 80299f19cb sigwaittest: Add JSON output feature
Write the test results as JSON output to a file. This allows to
simplifies any parsing later on.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-19 11:00:56 -05:00
Daniel Wagner bdb20cdaa8 signaltest: Add JSON output feature
Write the test results as JSON output to a file. This allows to
simplifies any parsing later on.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-19 10:59:52 -05:00
Daniel Wagner 7593a72e01 oslat: Add quiet command line option
The quiet option is useful for automated test setups where
only the final result of the run is interesting.

Furthermore, this makes oslat accept rt-tests standard options.

Signed-off-by: Daniel Wagner <dwagner@suse.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
2021-02-16 22:31:12 -05:00