Commit graph

18 commits

Author SHA1 Message Date
Ian Abbott
23e8eb609e comedi_test: Remove unnecessary assignment of 'go' when checking data
The 'go' variable is only used by the 'while' loop that reads the data.
We don't need to set it in the 'for' loop that checks the data
afterwards.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-06-27 13:08:08 +01:00
Ian Abbott
261d3e1029 comedi_test: Fix buffer overrun in test_mmap()
If the command does not stop immediately after the last sample, there
can be more data to read than we have room for.  Make sure the 'while'
loop 'read()' does not overrun the end of the malloc'ed 'buf'.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
2011-06-27 13:03:03 +01:00
Frank Mori Hess
242aa6405f Fixed another problem with mmap test on subdevice using lsampl_t. 2008-01-28 20:35:14 +00:00
Frank Mori Hess
115b6a66c1 Fixed bug in mmap test when run on subdevice with SDF_LSAMPL. 2008-01-28 20:27:19 +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
e66997b981 fix test_segfault() so it works with 2.6 kernel signal handling behaviour 2004-07-24 15:47:30 +00:00
David Schleef
087e6042d4 fix mmap testing 2002-11-22 06:48:39 +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
7973a0f2ad Change prototype of comedi_get_cmd_generic_timed 2001-07-15 22:39:54 +00:00
David Schleef
59568d2029 Moved chatter behind if(verbose) 2001-07-09 02:41:18 +00:00
David Schleef
a4fb3b20d9 Changed from siginfo handler to simple signal handler 2001-06-27 22:18:16 +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
926cac4baf added test to make sure area is unmapped 2001-03-02 06:52:06 +00:00
David Schleef
8265dded62 added segfault testing 2001-01-23 18:21:47 +00:00
David Schleef
7cde371fd4 mmap demo and testing 2000-11-25 04:19:59 +00:00