sigrok-test.git
2 years agoparallel: use HD44780 dump to test parallel's word demux feature
Gerhard Sittig [Sat, 6 Jan 2018 09:54:22 +0000 (10:54 +0100)]
parallel: use HD44780 dump to test parallel's word demux feature

2 years agoAdd some counter test-cases.
Uwe Hermann [Wed, 3 Jan 2018 16:30:36 +0000 (17:30 +0100)]
Add some counter test-cases.

2 years agoparallel: adjust hex number format of expected PD output
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.

2 years agousb_power_delivery: fixup order of combined annotation text fragments
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.

2 years agoAdd some graycode test-cases.
Uwe Hermann [Sat, 9 Dec 2017 16:17:29 +0000 (17:17 +0100)]
Add some graycode test-cases.

2 years agomaple_bus: Add a simple test-case.
Marcus Comstedt [Mon, 20 Nov 2017 19:56:10 +0000 (20:56 +0100)]
maple_bus: Add a simple test-case.

2 years agoi2s: Update wav output (PD now emits 32bit samples).
Uwe Hermann [Sat, 11 Nov 2017 17:45:19 +0000 (18:45 +0100)]
i2s: Update wav output (PD now emits 32bit samples).

2 years agoAdjust ds2432 test cases to the rename to ds243x
Soeren Apel [Tue, 31 Oct 2017 20:40:25 +0000 (21:40 +0100)]
Adjust ds2432 test cases to the rename to ds243x

2 years agoAdd a DS2432 test-case.
Kevin Redon [Thu, 19 Oct 2017 07:00:53 +0000 (09:00 +0200)]
Add a DS2432 test-case.

This fixes (parts of) bug #1019.

2 years agousb_{signalling,packet,request}: Add another test-case.
Uwe Hermann [Tue, 25 Jul 2017 06:28:01 +0000 (08:28 +0200)]
usb_{signalling,packet,request}: Add another test-case.

3 years agocan: catch up with sample number changes after clock sync introduction
Gerhard Sittig [Sun, 2 Jul 2017 14:54:48 +0000 (16:54 +0200)]
can: catch up with sample number changes after clock sync introduction

The CAN decoder got adjusted to synchronize to the input stream's clock.
Catch up in the test expectation.

3 years agoonewire_network: Adjust test expectation for sample number fix in the PD
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.

3 years agopwm: Adjust binary output test for sample number fix in the PD
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.

3 years agodsi: Update due to recent minor PD changes.
Uwe Hermann [Fri, 16 Jun 2017 14:20:00 +0000 (16:20 +0200)]
dsi: Update due to recent minor PD changes.

3 years agopwm: Add a few more test-cases.
Uwe Hermann [Thu, 15 Jun 2017 19:26:43 +0000 (21:26 +0200)]
pwm: Add a few more test-cases.

3 years agospi: Missing samplerate spec is not fatal
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.

3 years agoBump requirements to libsigrok/libsigrokdecode 0.5.0.
Uwe Hermann [Tue, 6 Jun 2017 12:39:57 +0000 (14:39 +0200)]
Bump requirements to libsigrok/libsigrokdecode 0.5.0.

3 years agoRename eeprom93cxx to eeprom93xx.
Uwe Hermann [Tue, 6 Jun 2017 10:49:42 +0000 (12:49 +0200)]
Rename eeprom93cxx to eeprom93xx.

3 years agoAdd support for initial pin settings.
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).

3 years agoswd: Add missing channels.
Uwe Hermann [Mon, 5 Jun 2017 22:42:47 +0000 (00:42 +0200)]
swd: Add missing channels.

3 years agoFix issue in -s output.
Uwe Hermann [Mon, 5 Jun 2017 22:08:07 +0000 (00:08 +0200)]
Fix issue in -s output.

Option values are strings, not numbers.

This fixes:

$ ./decoder/pdtest -s jitter
Testcase: jitter/toim4243
  Protocol decoder: jitter
    Channel clk=3
    Channel sig=2
Error: %d format: a number is required, not str

3 years agods28ea00: Update due to decoder rename.
Uwe Hermann [Mon, 5 Jun 2017 15:04:06 +0000 (17:04 +0200)]
ds28ea00: Update due to decoder rename.

3 years agocan: Update test results wrt recent PD changes.
Uwe Hermann [Fri, 26 May 2017 13:57:49 +0000 (15:57 +0200)]
can: Update test results wrt recent PD changes.

3 years agocan: Update wrt new PD warnings.
Uwe Hermann [Thu, 25 May 2017 21:48:38 +0000 (23:48 +0200)]
can: Update wrt new PD warnings.

3 years agosdcard_sd: add CMD23 test
Wolfram Sang [Sun, 14 May 2017 09:30:15 +0000 (11:30 +0200)]
sdcard_sd: add CMD23 test

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
3 years agosdcard_sd: correct cmd numbers when prefixing responses
Wolfram Sang [Fri, 12 May 2017 11:58:29 +0000 (13:58 +0200)]
sdcard_sd: correct cmd numbers when prefixing responses

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
3 years agotiming: Update tests, add some more.
Uwe Hermann [Sat, 13 May 2017 14:12:06 +0000 (16:12 +0200)]
timing: Update tests, add some more.

3 years agotiming: add tests for noaverage/edge/delta modes
Karl Palsson [Tue, 11 Apr 2017 22:14:16 +0000 (22:14 +0000)]
timing: add tests for noaverage/edge/delta modes

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
3 years agoargs: make pdtest -l behave as advertised.
Karl Palsson [Tue, 11 Apr 2017 21:31:10 +0000 (21:31 +0000)]
args: make pdtest -l behave as advertised.

Help says -l should list tests. Make it do so.
You can still do "-l uart" to see only uart tests, but -l by itself now
does what you expect.

Signed-off-by: Karl Palsson <karlp@tweak.net.au>
3 years agopdtest: say that '-f' creates initial output for new tests
Wolfram Sang [Wed, 3 May 2017 19:16:11 +0000 (21:16 +0200)]
pdtest: say that '-f' creates initial output for new tests

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
3 years agoAdd an eeprom93cxx test-case.
Uwe Hermann [Wed, 3 May 2017 20:27:51 +0000 (22:27 +0200)]
Add an eeprom93cxx test-case.

3 years agoAdd a microwire test-case.
Uwe Hermann [Wed, 3 May 2017 20:09:17 +0000 (22:09 +0200)]
Add a microwire test-case.

3 years agosdcard_sd: Update to reflect recent PD changes.
Uwe Hermann [Tue, 2 May 2017 18:18:22 +0000 (20:18 +0200)]
sdcard_sd: Update to reflect recent PD changes.

3 years agoonewire_network: Add more test-cases.
Uwe Hermann [Thu, 6 Apr 2017 19:45:00 +0000 (21:45 +0200)]
onewire_network: Add more test-cases.

3 years agoonewire_link: Add more test-cases.
Uwe Hermann [Thu, 6 Apr 2017 19:44:40 +0000 (21:44 +0200)]
onewire_link: Add more test-cases.

3 years agoAdjust tests for the new onewire_link decoder
King Kévin [Sun, 26 Mar 2017 17:17:40 +0000 (19:17 +0200)]
Adjust tests for the new onewire_link decoder

Time slots and reset pulse/presence detect end timestamps were off by 1 us.

Additional warnings have been added for glitches.

Incomplete starting patterns are ignored.

3 years agoAdd a Sensirion SHT3x test-case.
Uwe Hermann [Tue, 28 Mar 2017 21:55:22 +0000 (23:55 +0200)]
Add a Sensirion SHT3x test-case.

3 years agoAdd a Sensirion SHT2x test-case.
Uwe Hermann [Tue, 28 Mar 2017 21:47:58 +0000 (23:47 +0200)]
Add a Sensirion SHT2x test-case.

3 years agoeeprom24xx: Add Xicor X24C02 test-case.
Uwe Hermann [Tue, 28 Mar 2017 19:25:04 +0000 (21:25 +0200)]
eeprom24xx: Add Xicor X24C02 test-case.

3 years agoAdd a DALI test-case.
Uwe Hermann [Tue, 14 Mar 2017 22:48:07 +0000 (23:48 +0100)]
Add a DALI test-case.

3 years agoAdd a DSI test-case.
Uwe Hermann [Tue, 14 Mar 2017 22:47:57 +0000 (23:47 +0100)]
Add a DSI test-case.

3 years agoconfigure summary: Show linker flags.
Uwe Hermann [Sun, 5 Mar 2017 16:13:38 +0000 (17:13 +0100)]
configure summary: Show linker flags.

3 years agoruntc: unbreak the protocol decoder output match logic (type vs instance)
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.

3 years agoruntc: fixup coding style (conditionals, braces)
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.

3 years agoruntc: minor nits in main()
Gerhard Sittig [Sun, 26 Feb 2017 17:19:23 +0000 (18:19 +0100)]
runtc: minor nits in main()

Pass NULL instead of 0 where a pointer is expected. Fixup whitespace.

3 years agoruntc: minor nits in usage(), add missing options
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.

3 years agoiec: Add a simple test-case.
Uwe Hermann [Sat, 25 Feb 2017 15:10:49 +0000 (16:10 +0100)]
iec: Add a simple test-case.

3 years agoUse PD ID (not PD instance ID) for now.
Uwe Hermann [Mon, 20 Feb 2017 16:14:05 +0000 (17:14 +0100)]
Use PD ID (not PD instance ID) for now.

This is related to the libsigrokdecode change regarding bug #868.

3 years agoadf435x: Add an initial test-case.
Uwe Hermann [Tue, 14 Feb 2017 21:49:37 +0000 (22:49 +0100)]
adf435x: Add an initial test-case.

3 years agoarm_tpiu: Fix confusing file and test-case naming.
Uwe Hermann [Thu, 2 Feb 2017 23:45:21 +0000 (00:45 +0100)]
arm_tpiu: Fix confusing file and test-case naming.

3 years agoruntc, pdtest: Fixup minor style nits
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.

3 years agopdtest: Make exit code communicate the termination cause not counts
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.

3 years agopdtest: Exit non-zero for errors as well as PD output differences
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.

3 years agolicense: remove FSF postal address from boiler plate license text
Gerhard Sittig [Thu, 20 Oct 2016 07:40:53 +0000 (09:40 +0200)]
license: remove FSF postal address from boiler plate license text

Remove the FSF postal address as it might change (it did in the past).
Reference the gnu.org website instead which is more stable.

3 years agoavr-pdi: Add initial AVR PDI test case
Gerhard Sittig [Mon, 26 Dec 2016 17:39:33 +0000 (18:39 +0100)]
avr-pdi: Add initial AVR PDI test case

3 years agospiflash: Update due to recent PD changes.
Uwe Hermann [Mon, 7 Nov 2016 00:56:09 +0000 (01:56 +0100)]
spiflash: Update due to recent PD changes.

3 years agospiflash: Enforce chip selection for all test-cases.
Uwe Hermann [Sun, 6 Nov 2016 14:54:44 +0000 (15:54 +0100)]
spiflash: Enforce chip selection for all test-cases.

3 years agops2: Add an initial PS/2 keyboard test-case.
Uwe Hermann [Fri, 4 Nov 2016 21:41:03 +0000 (22:41 +0100)]
ps2: Add an initial PS/2 keyboard test-case.

3 years agopdtest: Minor help text improvements.
Uwe Hermann [Tue, 1 Nov 2016 23:11:41 +0000 (00:11 +0100)]
pdtest: Minor help text improvements.

3 years agospi: Add some test-cases for wordsize != 8.
Uwe Hermann [Sun, 23 Oct 2016 19:25:48 +0000 (21:25 +0200)]
spi: Add some test-cases for wordsize != 8.

3 years agouart: Update test-cases for recent UART PD changes.
Uwe Hermann [Sun, 23 Oct 2016 17:32:03 +0000 (19:32 +0200)]
uart: Update test-cases for recent UART PD changes.

3 years agouart: Make rxtx_overlapped test-case use format=hex.
Uwe Hermann [Sun, 23 Oct 2016 17:31:33 +0000 (19:31 +0200)]
uart: Make rxtx_overlapped test-case use format=hex.

3 years agouart: Explicitly select a format option for the tests.
Uwe Hermann [Sun, 23 Oct 2016 17:30:51 +0000 (19:30 +0200)]
uart: Explicitly select a format option for the tests.

3 years agouart: Add test-cases for 5n1, 6n1, 7n1, 8n1, 9n1.
Uwe Hermann [Wed, 19 Oct 2016 17:34:23 +0000 (19:34 +0200)]
uart: Add test-cases for 5n1, 6n1, 7n1, 8n1, 9n1.

3 years agoAdd a test-case for the GPIB decoder.
Uwe Hermann [Wed, 12 Oct 2016 01:14:30 +0000 (03:14 +0200)]
Add a test-case for the GPIB decoder.

3 years agomidi: Add 3 new test-cases, update existing ones.
Chris [Mon, 12 Sep 2016 01:12:40 +0000 (18:12 -0700)]
midi: Add 3 new test-cases, update existing ones.

3 years agomidi: chromatic_notes in list.py was off by 1 octave
Chris [Mon, 5 Sep 2016 19:39:58 +0000 (12:39 -0700)]
midi: chromatic_notes in list.py was off by 1 octave

(ex: note 60 is middle C which is C4, not C3)

3 years agouart: Add a test-case for overlapping RX/TX bytes.
Uwe Hermann [Sat, 24 Sep 2016 10:21:16 +0000 (12:21 +0200)]
uart: Add a test-case for overlapping RX/TX bytes.

3 years agomidi: Update each annotation with multiple strings.
Chris [Sat, 27 Aug 2016 04:37:13 +0000 (21:37 -0700)]
midi: Update each annotation with multiple strings.

(ranging from long, medium, and short lengths)

3 years agoAdd a lot more MIDI test-cases.
Chris Dreher [Fri, 19 Aug 2016 17:26:02 +0000 (10:26 -0700)]
Add a lot more MIDI test-cases.

Code coverage increased to 98%, only 5 lines missed. 4 are from
handle_channel_msg_generic().

3 years agoAdd some SSI32 tests.
Uwe Hermann [Sun, 21 Aug 2016 22:07:42 +0000 (00:07 +0200)]
Add some SSI32 tests.

3 years agoREADME: Add missing autogen.sh call.
Chris Dreher [Sun, 21 Aug 2016 15:36:55 +0000 (17:36 +0200)]
README: Add missing autogen.sh call.

3 years agoAdd Python 3.5 support.
Chris Dreher [Sun, 21 Aug 2016 15:36:47 +0000 (17:36 +0200)]
Add Python 3.5 support.

3 years agoAdd a few DMX512 test-cases.
Uwe Hermann [Wed, 6 Jul 2016 17:16:39 +0000 (19:16 +0200)]
Add a few DMX512 test-cases.

4 years agotiming: Update to latest PD changes.
Uwe Hermann [Tue, 28 Jun 2016 20:20:31 +0000 (22:20 +0200)]
timing: Update to latest PD changes.

4 years agospiflash: Add a few more test-cases for dual I/O reads.
Uwe Hermann [Sun, 26 Jun 2016 12:39:25 +0000 (14:39 +0200)]
spiflash: Add a few more test-cases for dual I/O reads.

4 years agospiflash: Add a few more test-cases.
Uwe Hermann [Wed, 22 Jun 2016 17:55:19 +0000 (19:55 +0200)]
spiflash: Add a few more test-cases.

4 years agoAdd a few em4305 test-cases.
Uwe Hermann [Wed, 18 May 2016 16:20:45 +0000 (18:20 +0200)]
Add a few em4305 test-cases.

4 years agousb_request: Update PCAP files due to recent changes.
Uwe Hermann [Wed, 11 May 2016 18:24:19 +0000 (20:24 +0200)]
usb_request: Update PCAP files due to recent changes.

See bug #664 for details.

4 years agoAdd wiegand 36bit test
Sean Burford [Tue, 10 May 2016 08:30:08 +0000 (18:30 +1000)]
Add wiegand 36bit test

4 years agomdio: Add two more test-cases.
Uwe Hermann [Wed, 4 May 2016 01:51:06 +0000 (03:51 +0200)]
mdio: Add two more test-cases.

4 years agomdio: Update output files for new MDIO decoder output.
Uwe Hermann [Wed, 4 May 2016 01:50:10 +0000 (03:50 +0200)]
mdio: Update output files for new MDIO decoder output.

4 years agoAdd an AUD test-case.
Uwe Hermann [Sun, 20 Mar 2016 19:10:18 +0000 (20:10 +0100)]
Add an AUD test-case.

4 years agorgb_led_ws281x: Add a few test-cases.
Uwe Hermann [Fri, 4 Mar 2016 01:51:29 +0000 (02:51 +0100)]
rgb_led_ws281x: Add a few test-cases.

4 years agoAdd a few t55xx test cases.
Uwe Hermann [Mon, 29 Feb 2016 01:25:06 +0000 (02:25 +0100)]
Add a few t55xx test cases.

4 years agoAdd OUTPUT_PYTHON test-cases for all PDs.
Uwe Hermann [Fri, 25 Dec 2015 16:23:36 +0000 (17:23 +0100)]
Add OUTPUT_PYTHON test-cases for all PDs.

4 years agouart: Add more UART test-cases.
Uwe Hermann [Fri, 25 Dec 2015 15:53:37 +0000 (16:53 +0100)]
uart: Add more UART test-cases.

4 years agousb_power_delivery: Add SamplerateError check.
Uwe Hermann [Fri, 25 Dec 2015 15:50:59 +0000 (16:50 +0100)]
usb_power_delivery: Add SamplerateError check.

4 years agoAdd OUTPUT_BINARY test-cases for all PDs.
Uwe Hermann [Thu, 24 Dec 2015 01:27:46 +0000 (02:27 +0100)]
Add OUTPUT_BINARY test-cases for all PDs.

4 years agoparallel: Update input file location.
Uwe Hermann [Mon, 21 Dec 2015 14:36:05 +0000 (15:36 +0100)]
parallel: Update input file location.

4 years agoAdd a few em4100 test cases.
Uwe Hermann [Fri, 18 Dec 2015 17:26:05 +0000 (18:26 +0100)]
Add a few em4100 test cases.

4 years agousb*: Add a lot more test-cases.
Uwe Hermann [Fri, 4 Dec 2015 21:39:08 +0000 (22:39 +0100)]
usb*: Add a lot more test-cases.

4 years agousb*: Update tests due to recent PD changes.
Uwe Hermann [Fri, 4 Dec 2015 20:42:40 +0000 (21:42 +0100)]
usb*: Update tests due to recent PD changes.

4 years agousb_power_delivery: Add USB PD decoder tests
Vincent Palatin [Thu, 12 Nov 2015 02:04:07 +0000 (18:04 -0800)]
usb_power_delivery: Add USB PD decoder tests

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
4 years agoTests for max7219 PD
Paul "LeoNerd" Evans [Wed, 4 Nov 2015 16:22:58 +0000 (16:22 +0000)]
Tests for max7219 PD

4 years agouart: Update test-cases to recent frame error changes.
Uwe Hermann [Fri, 23 Oct 2015 17:22:59 +0000 (19:22 +0200)]
uart: Update test-cases to recent frame error changes.

4 years agoqi: Add an additional test-case.
Uwe Hermann [Fri, 16 Oct 2015 17:26:06 +0000 (19:26 +0200)]
qi: Add an additional test-case.

4 years agoi2c: Add an additional test-case.
Uwe Hermann [Fri, 16 Oct 2015 17:21:41 +0000 (19:21 +0200)]
i2c: Add an additional test-case.

4 years agoUse g_strerror() in favor of strerror().
Uwe Hermann [Fri, 16 Oct 2015 17:20:54 +0000 (19:20 +0200)]
Use g_strerror() in favor of strerror().

4 years agousb_{signalling,packet}: Update test-cases to recent changes.
Uwe Hermann [Tue, 6 Oct 2015 07:05:22 +0000 (09:05 +0200)]
usb_{signalling,packet}: Update test-cases to recent changes.