Gerhard Sittig [Thu, 11 Jan 2018 06:05:34 +0000 (07:05 +0100)]
counter: use HD44780 dump to check counter's reset_edge option
Resetting counters depending on the LCD controller's R/S signal yields
numbers that correspond to byte sequences that either "control" hardware
(register access) or carry "data" (display text).
Provide a test case for the rising edge of RESET. Existing cases already
covered the falling edge of RESET which is the default.
Gerhard Sittig [Wed, 27 Dec 2017 16:50:14 +0000 (17:50 +0100)]
parallel: adjust hex number format of expected PD output
The parallel decoder got adjusted to emit annotations for "items" and
"words" in a unified format (consistent width, leading zeroes). Adjust
the test expectation to match the PD implementation.
Gerhard Sittig [Fri, 22 Dec 2017 18:00:43 +0000 (19:00 +0100)]
usb_power_delivery: fixup order of combined annotation text fragments
The USB power delivery decoder got adjusted to construct complex
annotations that consisted of several text fragments in a reproducible
order. Adjust the test expectation to match the PD implementation.
Gerhard Sittig [Sun, 18 Jun 2017 20:52:08 +0000 (22:52 +0200)]
onewire_network: Adjust test expectation for sample number fix in the PD
The start sample number of onewire network decoder annotations got fixed
in the decoder implementation (used to start one bit late). Catch up in
the test expectation.
Gerhard Sittig [Sun, 18 Jun 2017 20:15:29 +0000 (22:15 +0200)]
pwm: Adjust binary output test for sample number fix in the PD
The previous implementation used the period counter instead of the
period's actual start and end sample number. The implementation got
fixed, catch up in the test expectation.
Gerhard Sittig [Tue, 6 Jun 2017 21:09:44 +0000 (23:09 +0200)]
spi: Missing samplerate spec is not fatal
Remove the "exception_samplerate" test for the SPI decoder. Lack of a
samplerate specification only breaks the emission of the throughput
annotations, but still allows decoding the clocked signal.
Uwe Hermann [Mon, 5 Jun 2017 22:09:45 +0000 (00:09 +0200)]
Add support for initial pin settings.
Adapt all tests that require it to use the old behaviour of assuming an
initial pin value of 0 (or whatever was previously hardcoded in the PD).
for now (this will likely see some changes later).
Gerhard Sittig [Sun, 26 Feb 2017 16:37:22 +0000 (17:37 +0100)]
runtc: unbreak the protocol decoder output match logic (type vs instance)
Recent libsigrokdecode adjustment changed decoder output. The ID of a
protocol decoder instance need no longer match the decoder type's name
even for simple setups.
Lookup the selected decoder's instance ID during construction of the
decoder stack. Such that the selected decoder's data can get identified
in the output of the stack which is received by runtc(1).
Note that this implementation passes the decoder type's name to the
runtc(1) output file, so that it keeps matching the expected .output
files when pdtest(1) compares those two streams. This approach avoids
the necessity to adjust test.conf or .output files. It will no longer
be appropriate when more complex test configurations shall be supported
which involve multiple instances of the same decoder type or multiple
stacks of decoders.
Gerhard Sittig [Sun, 26 Feb 2017 18:12:05 +0000 (19:12 +0100)]
runtc: fixup coding style (conditionals, braces)
When a conditional has one complex branch (multiple instructions), both
branches are supposed to have braces around them. Instead of putting
extra braces around single instructions, eliminate the "else" branch
since the "if" branch already ends in break or return respectively.
Gerhard Sittig [Sun, 26 Feb 2017 17:15:23 +0000 (18:15 +0100)]
runtc: minor nits in usage(), add missing options
Adjust the screen layout of usage() output: Align parameters to options
in identical ways, to separate them from descriptions for options which
don't take parameters. Add previously not listed options.
Gerhard Sittig [Wed, 25 Jan 2017 20:05:03 +0000 (21:05 +0100)]
runtc, pdtest: Fixup minor style nits
Address several minor style nits: Remove trailing empty lines in source
files. Declare 'static' auto variables before non-static variables.
Re-use the result of a division instead of running the calculation again.
Gerhard Sittig [Wed, 25 Jan 2017 20:09:20 +0000 (21:09 +0100)]
pdtest: Make exit code communicate the termination cause not counts
On one hand the exit(3) API might limit the range of values that can get
communicated to callers (a single byte is used in some implementations).
On the other hand wait(2) might interpret specific meaning into some of
the returned values (abnormal cause of termination, like unhandled
signals). So the use of error counts as exit codes for processes can be
severely constrained. For specific non-zero values of error counts, an
exit code of zero might be seen at the caller's side (modulo calculation
or truncation).
Don't pass error or difference counts to exit(3). Instead communicate
the kind of termination (error or difference or success) in exit codes
which reliably can get evaluated by callers.
Gerhard Sittig [Wed, 25 Jan 2017 19:57:39 +0000 (20:57 +0100)]
pdtest: Exit non-zero for errors as well as PD output differences
Make the pdtest(1) executable return a non-zero exit code for errors
during test execution (as before) as well as for differences in the
decoder output (that's the change). Return either the number of errors
seen, or the number of tests which saw different output. Only return
zero in the absence of errors and differences.