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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- 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
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>
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>
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>
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>
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>
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>
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>
- Added a space after a common parse_options
Signed-off-by: John Kacur <jkacur@redhat.com>
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>
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>
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>
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>