[U-Boot] [PATCH v6 0/6] fs: fat/ext4/sandbox - Deal with files greater than 2GB
Suriyan Ramasami
suriyan.r at gmail.com
Tue Nov 4 16:06:12 CET 2014
Hello Simon,
On Mon, Nov 3, 2014 at 10:26 PM, Simon Glass <sjg at chromium.org> wrote:
> (trimming the CC list a bit)
>
> Hi Suriyan,
>
> On 3 November 2014 19:49, Suriyan Ramasami <suriyan.r at gmail.com> wrote:
>>
>> The commands fatls/ext4ls give negative values when dealing with files
>> greater than 2GB.
>> The commands fatsize/ext4size do not update the variable filesize for
>> these files.
>>
>> To deal with this, the fs functions have been modified to take an additional
>> parameter of type "* loff_t" which is then populated. The return value of the
>> fs functions are used only for error conditions.
>
> Thanks for the new series. Can you please post the expected output of
> this with all patches applied?
>
I have summarized the output in the top of the fs-test.sh file as well.
Here, I am posting the full output:
suriyan at suriyanT430:~/git/u-boot-main.fs$ ./test/fs/fs-test.sh
HOSTCC scripts/basic/fixdep
GEN /home/suriyan/git/u-boot-main.fs/sandbox/Makefile
HOSTCC scripts/kconfig/conf.o
SHIPPED scripts/kconfig/zconf.tab.c
SHIPPED scripts/kconfig/zconf.lex.c
SHIPPED scripts/kconfig/zconf.hash.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
Creating ext4 image if not already present.
Creating files in ext4 image if not already present.
[sudo] password for suriyan:
** Start sandbox/test/fs/fs-test.sb.ext4.out
pass - TC1: ls of 2.5GB.file
pass - TC1: ls of 1MB.file
FAIL - TC2: size of 1MB.file
FAIL - TC3: size of 2.5GB.file
pass - TC4: load of 1MB.file size
pass - TC4: load from 1MB.file
pass - TC5: load of 1st MB from 2.5GB.file size
pass - TC5: load of 1st MB from 2.5GB.file
pass - TC6: load of last MB from 2.5GB.file size
pass - TC6: load of last MB from 2.5GB.file
pass - TC7: load of last 1mb chunk of 2GB from 2.5GB.file size
pass - TC7: load of last 1mb chunk of 2GB from 2.5GB.file
pass - TC8: load 1st MB chunk after 2GB from 2.5GB.file size
pass - TC8: load 1st MB chunk after 2GB from 2.5GB.file
pass - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file size
pass - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file
pass - TC10: load 2MB from the last 1MB of 2.5GB.file - generic fail case
pass - TC11: 1MB write to - write succeeded
pass - TC11: 1MB write to - content verified
** End sandbox/test/fs/fs-test.sb.ext4.out
Summary: PASS: 17 FAIL: 2
--------------------------------------------
Creating files in ext4 image if not already present.
** Start sandbox/test/fs/fs-test.ext4.out
pass - TC1: ls of 2.5GB.file
pass - TC1: ls of 1MB.file
pass - TC2: size of 1MB.file
pass - TC3: size of 2.5GB.file
pass - TC4: load of 1MB.file size
pass - TC4: load from 1MB.file
pass - TC5: load of 1st MB from 2.5GB.file size
pass - TC5: load of 1st MB from 2.5GB.file
FAIL - TC6: load of last MB from 2.5GB.file size
FAIL - TC6: load of last MB from 2.5GB.file
FAIL - TC7: load of last 1mb chunk of 2GB from 2.5GB.file size
FAIL - TC7: load of last 1mb chunk of 2GB from 2.5GB.file
FAIL - TC8: load 1st MB chunk after 2GB from 2.5GB.file size
FAIL - TC8: load 1st MB chunk after 2GB from 2.5GB.file
FAIL - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file size
FAIL - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file
pass - TC10: load 2MB from the last 1MB of 2.5GB.file - generic fail case
pass - TC11: 1MB write to - write succeeded
pass - TC11: 1MB write to - content verified
** End sandbox/test/fs/fs-test.ext4.out
Summary: PASS: 11 FAIL: 8
--------------------------------------------
Creating files in ext4 image if not already present.
** Start sandbox/test/fs/fs-test.fs.ext4.out
pass - TC1: ls of 2.5GB.file
pass - TC1: ls of 1MB.file
pass - TC2: size of 1MB.file
pass - TC3: size of 2.5GB.file
pass - TC4: load of 1MB.file size
pass - TC4: load from 1MB.file
pass - TC5: load of 1st MB from 2.5GB.file size
pass - TC5: load of 1st MB from 2.5GB.file
FAIL - TC6: load of last MB from 2.5GB.file size
FAIL - TC6: load of last MB from 2.5GB.file
FAIL - TC7: load of last 1mb chunk of 2GB from 2.5GB.file size
FAIL - TC7: load of last 1mb chunk of 2GB from 2.5GB.file
FAIL - TC8: load 1st MB chunk after 2GB from 2.5GB.file size
FAIL - TC8: load 1st MB chunk after 2GB from 2.5GB.file
FAIL - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file size
FAIL - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file
pass - TC10: load 2MB from the last 1MB of 2.5GB.file - generic fail case
pass - TC11: 1MB write to - write succeeded
pass - TC11: 1MB write to - content verified
** End sandbox/test/fs/fs-test.fs.ext4.out
Summary: PASS: 11 FAIL: 8
--------------------------------------------
Creating fat image if not already present.
Creating files in fat image if not already present.
** Start sandbox/test/fs/fs-test.sb.fat.out
pass - TC1: ls of 2.5GB.file
pass - TC1: ls of 1MB.file
FAIL - TC2: size of 1MB.file
FAIL - TC3: size of 2.5GB.file
pass - TC4: load of 1MB.file size
pass - TC4: load from 1MB.file
pass - TC5: load of 1st MB from 2.5GB.file size
pass - TC5: load of 1st MB from 2.5GB.file
pass - TC6: load of last MB from 2.5GB.file size
pass - TC6: load of last MB from 2.5GB.file
pass - TC7: load of last 1mb chunk of 2GB from 2.5GB.file size
pass - TC7: load of last 1mb chunk of 2GB from 2.5GB.file
pass - TC8: load 1st MB chunk after 2GB from 2.5GB.file size
pass - TC8: load 1st MB chunk after 2GB from 2.5GB.file
pass - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file size
pass - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file
pass - TC10: load 2MB from the last 1MB of 2.5GB.file - generic fail case
pass - TC11: 1MB write to - write succeeded
pass - TC11: 1MB write to - content verified
** End sandbox/test/fs/fs-test.sb.fat.out
Summary: PASS: 17 FAIL: 2
--------------------------------------------
Creating files in fat image if not already present.
** Start sandbox/test/fs/fs-test.fat.out
pass - TC1: ls of 2.5GB.file
pass - TC1: ls of 1MB.file
pass - TC2: size of 1MB.file
pass - TC3: size of 2.5GB.file
pass - TC4: load of 1MB.file size
pass - TC4: load from 1MB.file
pass - TC5: load of 1st MB from 2.5GB.file size
pass - TC5: load of 1st MB from 2.5GB.file
pass - TC6: load of last MB from 2.5GB.file size
pass - TC6: load of last MB from 2.5GB.file
pass - TC7: load of last 1mb chunk of 2GB from 2.5GB.file size
pass - TC7: load of last 1mb chunk of 2GB from 2.5GB.file
pass - TC8: load 1st MB chunk after 2GB from 2.5GB.file size
pass - TC8: load 1st MB chunk after 2GB from 2.5GB.file
pass - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file size
pass - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file
pass - TC10: load 2MB from the last 1MB of 2.5GB.file - generic fail case
pass - TC11: 1MB write to - write succeeded
pass - TC11: 1MB write to - content verified
** End sandbox/test/fs/fs-test.fat.out
Summary: PASS: 19 FAIL: 0
--------------------------------------------
Creating files in fat image if not already present.
** Start sandbox/test/fs/fs-test.fs.fat.out
pass - TC1: ls of 2.5GB.file
pass - TC1: ls of 1MB.file
pass - TC2: size of 1MB.file
pass - TC3: size of 2.5GB.file
pass - TC4: load of 1MB.file size
pass - TC4: load from 1MB.file
pass - TC5: load of 1st MB from 2.5GB.file size
pass - TC5: load of 1st MB from 2.5GB.file
pass - TC6: load of last MB from 2.5GB.file size
pass - TC6: load of last MB from 2.5GB.file
pass - TC7: load of last 1mb chunk of 2GB from 2.5GB.file size
pass - TC7: load of last 1mb chunk of 2GB from 2.5GB.file
pass - TC8: load 1st MB chunk after 2GB from 2.5GB.file size
pass - TC8: load 1st MB chunk after 2GB from 2.5GB.file
pass - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file size
pass - TC9: load 1MB chunk crossing 2GB boundary from 2.5GB.file
pass - TC10: load 2MB from the last 1MB of 2.5GB.file - generic fail case
pass - TC11: 1MB write to - write succeeded
pass - TC11: 1MB write to - content verified
** End sandbox/test/fs/fs-test.fs.fat.out
Summary: PASS: 19 FAIL: 0
--------------------------------------------
Total Summary: TOTAL PASS: 94 TOTAL FAIL: 20
--------------------------------------------
FAILED
suriyan at suriyanT430:~/git/u-boot-main.fs$
Regards
- Suriyan
>>
>> Changes in v6:
>> * Update expected results in comments
>> * Simon comments -
>> * Remove README file and add it in start of script
>> * Drop blank lines in top of functions
>> * Put repeating constants in lower case variables
>> * Refer to U-Boot as U-Boot
>> * Move settings to top of file and code in functions or otherwise at bottom
>> * Create check_prereq function
>> * Use mkfs -t <type> -F <img> for ext4, but modify for fat
>> * Simon - Split this into a separate patch
>> * Simon - Split this into a separate patch
>> * Simon - Split this into a separate patch
>> * Simon - Split this into a separate patch
>> * Simon - Split this into a separate patch
>>
>> Changes in v5:
>> * Simon comments -
>> * Add README file to document how to run it
>> * Generate output in a sandbox environment
>> * Add one line comments on shell variables used
>> * Avoid camel case through out
>> * Path to UBOOT is variable at top
>> * Print PASSED or FAILED at end, and set return code, 0 if OK, 1 otherwise
>> * Simon - update fs.h with comments for fs_read/fs_write/fs_size
>>
>> Suriyan Ramasami (6):
>> sandbox: script for testing sandbox/ext4/fat/fs commands
>> fs: interface changes to accomodate files greater than 2GB
>> fat: interface changes to accomodate files greater than 2GB
>> ext4: interface changes to accomodate files greater than 2GB
>> sandbox: Use md5sum and fatwrite to enable testing of fs commands
>> sandbox: interface changes to accomodate files greater than 2GB
>>
>> arch/sandbox/cpu/os.c | 13 +-
>> arch/sandbox/cpu/state.c | 8 +-
>> common/board_f.c | 8 +-
>> common/cmd_ext4.c | 61 +----
>> common/cmd_fat.c | 9 +-
>> common/cmd_fs.c | 17 ++
>> common/cmd_md5sum.c | 12 +-
>> common/env_fat.c | 4 +-
>> fs/ext4/ext4_common.c | 24 +-
>> fs/ext4/ext4_common.h | 4 +-
>> fs/ext4/ext4_write.c | 32 +++
>> fs/ext4/ext4fs.c | 37 +--
>> fs/fat/fat.c | 122 +++++-----
>> fs/fat/fat_write.c | 61 ++---
>> fs/fat/file.c | 7 +-
>> fs/fs.c | 77 ++++---
>> fs/sandbox/sandboxfs.c | 73 ++++--
>> include/configs/sandbox.h | 2 +
>> include/ext4fs.h | 13 +-
>> include/fat.h | 19 +-
>> include/fs.h | 41 ++--
>> include/os.h | 5 +-
>> include/sandboxfs.h | 14 +-
>> test/fs/fs-test.sh | 562 ++++++++++++++++++++++++++++++++++++++++++++++
>> 24 files changed, 943 insertions(+), 282 deletions(-)
>> create mode 100755 test/fs/fs-test.sh
>>
>> --
>> 1.9.1
>>
>
> Regards,
> Simon
More information about the U-Boot
mailing list