Commit graph

18 commits

Author SHA1 Message Date
Ian Abbott
67a364cf93 comedi_test: attempt to change read and write subdevice during test
When testing streaming input (or streaming output) command functionality
for a subdevice, attempt to make it the current 'read' (or 'write')
subdevice by calling the new 'comedi_set_read_subdevice()' (or
'comedi_set_write_subdevice()') function.

That is currently only supported by the Linux "in-tree" version of
Comedi, since kernel version 3.19.  If the attempt fails, and the
subdevice is not the current 'read' (or 'write') subdevice, the test
will report "not applicable" as before.
2016-05-13 11:48:31 +01:00
Ian Abbott
9683559f51 comedi_test: fix test_cmd_write_fast_1chan() for big buffer
If the comedi data buffer is larger than the total size of the data
being written to the buffer in first test_cmd_write_fast_1chan(), the
first loop iterates endlessly writing 0 bytes to the buffer.  Break out
of the first loop once the required amount of data has been written.
2014-04-10 20:19:43 +01:00
Frank Mori Hess
b3873b7c79 Replaced a perror with comedi_perror 2008-03-28 15:55:03 +00:00
Ian Abbott
0145624108 Don't use SDF_WRITEABLE flag to check if read (or write) command is
applicable.  Instead, check that the specified subdevice matches the
read (or write) subdevice.
2008-01-28 16:10:11 +00:00
Frank Mori Hess
c1082cee65 Fixed comedi_get_cmd_generic_timed() by adding a chanlist_len
parameter.  Old version is still available in library, thanks to the
magic of the version_script.
2007-08-02 19:46:44 +00:00
Frank Mori Hess
933be9aae4 use SDF_RUNNING flag to test for completion of ao command 2005-03-16 19:05:34 +00:00
Frank Mori Hess
8fdb92784a patch from Ian Abbott <abbotti@mev.co.uk>:
I was running "comedi_test -v" on my new analog output driver and
noticed that it was getting stuck in a loop during the
"cmd_write_fast_1_chan" test.

It turned out that the test had written more data to the buffer than was
required to complete the acquisition (it was using cmd->stop_src =
TRIG_COUNT) and then got stuck in a loop waiting for the buffer to empty.

The attached patch stops the test_cmd_write_fast_1chan function writing
more data than is required to complete the acquisition.
2005-02-27 22:45:14 +00:00
Frank Mori Hess
2afaa069bd insert usleep() in loop 2004-07-25 00:39:39 +00:00
Frank Mori Hess
c673de7c79 fix internal trigger when testing write command, and fix test when
write command uses stop_src==TRIG_NONE instead of TRIG_COUNT
2004-07-24 16:09:01 +00:00
David Schleef
847fb8c86c Fix for cases where the command doesn't allow source choices 2002-11-22 07:15:09 +00:00
David Schleef
b7d115eafa added output command test 2002-03-18 21:48:14 +00:00
David Schleef
52b66f2c89 Disabled streaming output on many of the command tests 2002-02-06 22:08:50 +00:00
David Schleef
b1aea5d077 Changed prototype of comedi_get_cmd_generic_timed 2001-07-15 22:47:14 +00:00
David Schleef
59568d2029 Moved chatter behind if(verbose) 2001-07-09 02:41:18 +00:00
David Schleef
e93771f219 Added realtime command line option. Fixed tests to use realtime
flag.  Added internal trigger test.
2001-06-12 10:41:09 +00:00
David Schleef
698938d995 additional tests, fixes, move some functions to ../lib 2001-05-28 02:39:00 +00:00
David Schleef
981a9e2c22 testing additions 2000-11-30 22:57:04 +00:00
David Schleef
5199a302ae added command test 2000-10-13 09:22:05 +00:00