[U-Boot] [PATCH 11/17] fs: add mkdir interface
Simon Glass
sjg at chromium.org
Wed Jul 25 02:45:34 UTC 2018
Hi,
On 23 July 2018 at 19:45, AKASHI Takahiro <takahiro.akashi at linaro.org> wrote:
> On Mon, Jul 23, 2018 at 07:56:58PM -0400, Tom Rini wrote:
>> On Mon, Jul 23, 2018 at 05:48:13PM -0600, Simon Glass wrote:
>> > Hi,
>> >
>> > On 20 July 2018 at 11:35, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>> > > On 07/20/2018 04:57 AM, AKASHI Takahiro wrote:
>> > >> "mkdir" interface is added to file operations.
>> > >> This is a preparatory change as mkdir support for FAT file system
>> > >> will be added in next patch.
>> > >>
>> > >> Signed-off-by: AKASHI Takahiro <takahiro.akashi at linaro.org>
>> > >> ---
>> > >> fs/fs.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
>> > >> include/fs.h | 10 ++++++++++
>> > >> 2 files changed, 55 insertions(+)
>> > >>
>> >
>> > We need to get a proper fs test in place before we add any more stuff.
>>
>> Agreed that we need more tests as part of this series.
>
> Is this a new standard rule for new features?
> Just kidding, but testing was definitely one of my concerns partly
> because fs-test.sh is anyhow in an old fashion and partly because
> I can't find any criteria for test coverage:
> - white-box test or black-box test
> - coverage for corner (or edge) cases
> - some sort of stress test, etc.
>
>> > Does someone waent to try converting fs-test.sh to pytest in test/py/tests ?
>>
>> I thought there was at least a first pass at that?
>
> Well, I don't see any file system related scripts under test/py/tests.
>
> Please advise me.
It should be possible to translate it from shell to Python without too
much trouble if you able able to give it a crack. See for example:
8729d58259 test: Convert the vboot test to test/py
Re testing in general, my view is:
- Unit tests / smaller tests are better than large ones
- We don't need stress tests for functionality (e.g. the current FS
test uses filesystems that are quite large, and I think they could
just be very very small and still get good test coverage and run
faster)
- Corner cases are an important part of tests (and easy to test with unit tests)
- Use the pytest framework
One day we'll enable code coverage for U-Boot sandbox and get a feel
for the missing test coverage.
Regards,
Simon
More information about the U-Boot
mailing list