Ok, I pushed a patch that lets USB test pass on all my boxes. I'd appreciate if someone could test this (run "make check") on a box with a USB scanner plugged in. All my scanners are network scanners so I can't test that case.
Chris On Sun, Aug 25, 2013 at 12:58 PM, m. allan noah <kitno455 at gmail.com> wrote: > Your suggested changes sound fine to me. > > allan > > On Sun, Aug 25, 2013 at 1:09 PM, Chris Bagwell <chris at cnpbagwell.com> > wrote: > > Hi all, > > > > This is probably directly more towards St?phane based on recent USB work > but > > of interest to all. > > > > The sanie_usb_test.c test is failing on one of my Linux boxes in the > > test_open_all() test... I'd like to get some input on best way to fix > this > > failure or if we should fix it at all. > > > > The reason it is failing for me is because this box has a USB wifi module > > that has a report with Vendor Specific Class/Subclass/Protocol and so > sane > > adds it to the list as possible scanner. The open itself fails when ran > by > > normal user because its accessable only by root (EACCES). The open fails > > when ran as root because its already opened by networking stuff (EBUSY). > > > > Because these two cases are kinda soft failures, I was thinking about > > changing the test to simply skip over these opens instead of failing the > > whole test case. What do you think about this change? > > > > If you agree with that change, the second issue I'll have is that > > sanei_usb_open() seems to treat EPERM as permission denied > > (SANE_STATUS_ACCESS_DENIED) but not EACCES. Do you see any issues with > me > > changing it so both EPERM and EACCES map to SANE_STATUS_ACCESS_DENIED? > > > > If I don't make that change then the EACCES error code is mapped to > generic > > SANE_STATUS_INVAL and I can't tell difference between real failures and > > permission failures. > > > > Chris > > > > -- > > sane-devel mailing list: sane-devel at lists.alioth.debian.org > > http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/sane-devel > > Unsubscribe: Send mail with subject "unsubscribe your_password" > > to sane-devel-request at lists.alioth.debian.org > > > > -- > "The truth is an offense, but not a sin" > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.alioth.debian.org/pipermail/sane-devel/attachments/20130826/5e9333ff/attachment.html>