Re: [PATCH 3/3] USB: usbtest : Add tests to ensure HCDs can accept byte aligned buffers.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Oct 2, 2010 at 5:35 AM, David Brownell <david-b@xxxxxxxxxxx> wrote:

> In terms of test design, it's best not to overload
> stuff.
>
I agree.

Another disadvantage of adding parameters, in
addition to the version skew problem for the parameter
structure I already pointed out is that the tests
become less discoverable. It's fairly easy to
see that usbtest has N tests and think to run them
all but its much less obvious to try all the options.

> That said, including alignment tests in some of the
> current code might be OK ...
> though it'd be more
> clear just to have separate (and properly commented)
> tests focussed on just this "is the controller driver
> being stupid/incorrect) issue.
>
That's what this patch currently does (seperate tests).
Or are you just suggesting improving the comments?
(I've already dropped the comments about usbnet
you objected to in V1). If you like I could add a
block comment before the new tests such as:

"Some host controller hardware has alignment
restrictions for DMA, however HCDs must
ensure that these restrictions are hidden
from usbcore such that byte aligned transfer
buffers are supported.
The tests below ensure this requirement
is met."


> An advantage of merging an alignment test with some
> of the others would be that existing test scripts
> might not need modification to pick up that extra
> test/code coverage ...
>
Yes that is true.
However there are some disadvantages of merging with
the existing tests:

* Less focussed.
* Less scriptable (would need to examine kernel log to
see why test failed - alignment issue or other failure)
* The merged tests would become slower (*3 for bulk)

Maybe the "test.sh" script should be in the tools/usb
too (renamed to hcd-test.sh) and updated to use the
new tests?

Martin
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux