All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carl Karsten <carl@personnelware.com>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: video4linux-list@redhat.com
Subject: Re: v4l2 api compliance test
Date: Sun, 02 Nov 2008 18:32:10 -0600	[thread overview]
Message-ID: <490E468A.6090200@personnelware.com> (raw)
In-Reply-To: <20080304113834.0140884d@gaivota>

Mauro Carvalho Chehab wrote:
> On Sat, 01 Mar 2008 01:45:24 -0600
> Carl Karsten <carl@personnelware.com> wrote:
> 
>> Here is what I found from the various apps int he test dir:
>>
>> driver-test doesn't do much.  I am hoping to replace it.
> 
> The idea of this is to check if a driver is compliant with V4L2 specs.
> For example, several webcam drivers returns wrong buffer sizes to userspace.
> This testing program should do some basic configuration of the board and start
> capture, warning about non-compliance.
> 
> This program already warns about some issues, but I didn't have time to finish
> it.
> 
> Ideally, it should implement all ioctls from the API, and test the possible 
> different configuration, helping to stress a driver.
> 
> Some options may be added to it, to select a fast test or a more detailed and
> longer one.
> 
>> ioctl-test looks pretty good for what it is, but could use a little work on 
>> making the results easier to understand.
> 
> This is my first trial on writing a testing code. It just dumbly runs the V4L
> ioctls. Since it doesn't do anything coherent, this may produce weird results
> on real drivers. The debug printk's at the driver may help to see if everything
> is ok.
> 
>> In documenting the tests, something just caused my test box to go to sleep.
>> [ 2067.460263] vivi/0: [d6cb2180/4] timeout
>> [ 2067.460267] vivi/0: [d6cb2480/5] timeout
>> [ 2215.838800] vivi: open called (minor=0)
>> [ 2388.964289] vivi: open called (minor=0)
>> [ 2477.927340] eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
>> [ 2480.753620] Syncing filesystems ... done.
>> [ 2480.753887] PM: Preparing system for mem sleep
>> [ 2480.754414] Freezing user space processes ... (elapsed 0.03 seconds) done.
>> [ 2480.792622] Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
>> [ 2480.792745] PM: Entering mem sleep
>> [ 2480.792750] Suspending console(s)
>>
>> That was freaky.  Hopefully I'll figure out how that happened and report it.
> 
> This is really weird. vivi doesn't implement any suspend code.
>> v4l-info
>> ...
>>          fmt.pix.colorspace      : unknown
>>
>> Which may explain why ./pixfmt-test doesn't find any supported formats.
> 
> v4l-info uses the old V4L1 API (and V4L2). Maybe, some format were not correctly
> translated by v4l1-compat.
>> ./vbi-test
>> V4L2 call: ret=-1: sampling_rate=0, samples_per_line=0, sample_format=0, 
>> offset=0, start=0/0, count=0/0
>> good?
> 
> vivi doesn't implement vbi. Returning an error seems OK.
> 
>> lib$ vim v4l2_driver.c
>> This seems to have 1/2 the code I need.  a main with some command line parameter 
>> support, spin though the cap.capabilities, make sure the ones that are supported 
>>   don't error, and maybe make sure the ones that aren't do.
>>
>> So, before I go any further,  comments?
> 
> Please, feel free to improve the tools. Unfortunately, nobody yet had time to
> dedicate on improving the testing tools.

These 2 issues are thwarting my efforts to write my tester:

1. memory leak:
valgrind ./capture --userp -d /dev/video1
==17153== malloc/free: in use at exit: 2,457,632 bytes in 5 blocks.

2. capabilities mismatch:
./capture --userp -d /dev/video1
VIDIOC_QBUF error 22, Invalid argument

details: http://linuxtv.org/v4lwiki/index.php/Test_Suite#Bugs_in_Examples

Carl K

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

  reply	other threads:[~2008-11-03  0:32 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-01  7:45 v4l2 api compliance test Carl Karsten
2008-03-04 14:38 ` Mauro Carvalho Chehab
2008-11-03  0:32   ` Carl Karsten [this message]
2008-11-03  1:20     ` Andy Walls
2008-11-03  3:23       ` Carl Karsten
2008-11-04  1:34         ` Andy Walls
2008-11-05  1:15           ` Carl Karsten
2008-11-07 20:56             ` Mauro Carvalho Chehab
2008-11-05  6:46           ` Carl Karsten
2008-11-05 12:17             ` Andy Walls
2008-11-07  5:43             ` Carl Karsten

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=490E468A.6090200@personnelware.com \
    --to=carl@personnelware.com \
    --cc=mchehab@infradead.org \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.