[U-Boot] [U-Boot, 1/1] fs: fat: validate sector and cluster size

Heinrich Schuchardt xypron.glpk at gmx.de
Tue Nov 20 20:29:34 UTC 2018


On 11/20/18 3:56 PM, Tom Rini wrote:
> On Wed, Oct 31, 2018 at 09:46:36PM +0100, Heinrich Schuchardt wrote:
> 
>> In the rest of the FAT driver we want to be able to rely on the fact that
>> the cluster size is a power of two. So let's check that both the sector
>> size and the number of sectors per cluster are valid.
>>
>> Signed-off-by: Heinrich Schuchardt <xypron.glpk at gmx.de>
> 
> This breaks a number of tests under test/py/tests/test_fs/test_basic.py
> as seen under 'make tests'.
> 

Hello Tom,

I am not able to reproduce your observation based on commit
d73d81fd85e4a030ade42c4b2d13466d45090aa3 (master HEAD). See test output
below.

Regards

Heinrich

user at work:~/workspace/u-boot-build/denx$ git checkout master
Switched to branch 'master'
Your branch is behind 'origin/master' by 207 commits, and can be
fast-forwarded.
  (use "git pull" to update your local branch)
user at LT02:~/workspace/u-boot-build/denx$ git rebase
First, rewinding head to replay your work on top of it...
Fast-forwarded master to refs/remotes/origin/master.
user at work:~/workspace/u-boot-build/denx$ git branch -D build
Deleted branch build (was 08a1a289970).
user at work:~/workspace/u-boot-build/denx$ git checkout -b build
Switched to a new branch 'build'
user at work:~/workspace/u-boot-build/denx$ git am ../patch/*-fat-*
Applying: fs: fat: validate sector and cluster size
user at work:~/workspace/u-boot-build/denx$ make tests
./test/run
sandbox: +make O=/home/user/workspace/u-boot-build/denx/build-sandbox -s
sandbox_defconfig
+make O=/home/user/workspace/u-boot-build/denx/build-sandbox -s -j8
===========================================================================
test session starts
============================================================================
platform linux2 -- Python 2.7.15+, pytest-3.6.4, py-1.7.0, pluggy-0.8.0
rootdir: /home/user/workspace/u-boot-build/denx/test/py, inifile: pytest.ini
collected 440 items



test/py/tests/test_000_version.py .

                     [  0%]
test/py/tests/test_avb.py ss..s

                     [  0%]
test/py/tests/test_bind.py ..

                     [  0%]
test/py/tests/test_dfu.py s

                     [  0%]
test/py/tests/test_efi_loader.py .sssss

                     [  0%]
test/py/tests/test_efi_selftest.py sssss

                     [  0%]
test/py/tests/test_env.py ............

                     [  0%]
test/py/tests/test_fit.py .

                     [  0%]
test/py/tests/test_fpga.py sssssssssssssssssssssssssss

                     [  0%]
test/py/tests/test_gpt.py sssssss

                     [  0%]
test/py/tests/test_help.py .

                     [  0%]
test/py/tests/test_hush_if_test.py
.......................................................
                                                          [  0%]
test/py/tests/test_log.py ..

                     [  0%]
test/py/tests/test_md.py ..

                     [  0%]
test/py/tests/test_mmc_rd.py s

                     [  0%]
test/py/tests/test_net.py .sssss

                     [  0%]
test/py/tests/test_ofplatdata.py s

                     [  0%]
test/py/tests/test_pinmux.py .......

                     [  0%]
test/py/tests/test_sandbox_exit.py ..

                     [  0%]
test/py/tests/test_sf.py ssss

                     [  0%]
test/py/tests/test_shell_basics.py ....

                     [  0%]
test/py/tests/test_sleep.py .

                     [  0%]
test/py/tests/test_tpm2.py ...........

                     [  0%]
test/py/tests/test_ums.py s

                     [  0%]
test/py/tests/test_unknown_cmd.py .

                     [  0%]
test/py/tests/test_ut.py
..............................................................................................................................................................................................
[  0%]
test/py/tests/test_vboot.py .

                     [  0%]
test/py/tests/test_fs/test_basic.py
sssssssssssssssssssssssssssssssssssssss
                                                         [  0%]
test/py/tests/test_fs/test_ext.py ssssssssssssssssss

                     [  0%]
test/py/tests/test_fs/test_mkdir.py ssssssssssss

                     [  0%]
test/py/tests/test_fs/test_unlink.py ssssssssssssss

================================================================= 297
passed, 143 skipped in 37.78 seconds
=================================================================
sandbox_spl: +make
O=/home/user/workspace/u-boot-build/denx/build-sandbox_spl -s
sandbox_spl_defconfig
+make O=/home/user/workspace/u-boot-build/denx/build-sandbox_spl -s -j8
===========================================================================
test session starts
============================================================================
platform linux2 -- Python 2.7.15+, pytest-3.6.4, py-1.7.0, pluggy-0.8.0
rootdir: /home/user/workspace/u-boot-build/denx/test/py, inifile: pytest.ini
collected 434 items / 433 deselected



test/py/tests/test_ofplatdata.py .

================================================================= 1
passed, 433 deselected in 0.24 seconds
=================================================================
sandbox_flattree: +make
O=/home/user/workspace/u-boot-build/denx/build-sandbox_flattree -s
sandbox_flattree_defconfig
+make O=/home/user/workspace/u-boot-build/denx/build-sandbox_flattree -s -j8
===========================================================================
test session starts
============================================================================
platform linux2 -- Python 2.7.15+, pytest-3.6.4, py-1.7.0, pluggy-0.8.0
rootdir: /home/user/workspace/u-boot-build/denx/test/py, inifile: pytest.ini
collected 435 items / 250 deselected



test/py/tests/test_ut.py
.........................................................................................................................................................................................

================================================================ 185
passed, 250 deselected in 4.28 seconds
================================================================
binman: <unittest.result.TestResult run=139 errors=0 failures=0>
patman: <unittest.result.TestResult run=12 errors=0 failures=0>
buildman: <unittest.result.TestResult run=35 errors=0 failures=0>
fdt: <unittest.result.TestResult run=34 errors=0 failures=0>
dtoc: <unittest.result.TestResult run=22 errors=0 failures=0>
binman code coverage: <unittest.result.TestResult run=139 errors=0
failures=0>
100%
dtoc code coverage: <unittest.result.TestResult run=22 errors=0 failures=0>
100%
fdt code coverage: <unittest.result.TestResult run=34 errors=0 failures=0>
100%
Tests passed!
user at work:~/workspace/u-boot-build/denx$



More information about the U-Boot mailing list