Skip to content

Instantly share code, notes, and snippets.

@trini
Created April 10, 2019 02:24
Show Gist options
  • Save trini/b68799ed9880a31a3289e9bea033831d to your computer and use it in GitHub Desktop.
Save trini/b68799ed9880a31a3289e9bea033831d to your computer and use it in GitHub Desktop.
U-Boot v2019.04 test.py on sandbox + fsck of filesystem images
test/py/tests/test_fs/test_basic.py ............F..........FFFsssssssssssss
test/py/tests/test_fs/test_ext.py .........FFFFFFFFF
test/py/tests/test_fs/test_mkdir.py .....FFFFFFF
test/py/tests/test_fs/test_unlink.py FFFFFFFFFFFFFF
========================================== FAILURES ===========================================
________________________________ TestFsBasic.test_fs13[fat16] _________________________________
self = <test_basic.TestFsBasic object at 0x7f8b5c251f90>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_basic = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat16.img', ['c87fa3f5ae9c21fe037ddd99f1f9b6...e1e7417d', '18783ca29c4fe52e7bf37d9b05879a37', 'f77f97bd643646c85818d98abe902f8e', 'b925f0739b54efdee900fd8713ecd021']]
 def test_fs13(self, u_boot_console, fs_obj_basic):
 """
 Test Case 13 - write to a file with "/./<filename>"
 """
 fs_type,fs_img,md5val = fs_obj_basic
 with u_boot_console.log.section('Test Case 13 - write ("./<file>")'):
 # Read 1MB from small file
 # Write it via "same directory", i.e. "." dirent
 # Test Case 13a - Check directory traversal
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, SMALL_FILE),
 '%swrite host 0:0 %x /./%s2 $filesize'
 % (fs_type, ADDR, SMALL_FILE)])
 assert('1048576 bytes written' in ''.join(output))
 
 # Test Case 13b - Check md5 of written to is same
 # as the one read from
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x /./%s2' % (fs_type, ADDR, SMALL_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[0] in ''.join(output))
 
 # Test Case 13c - Check md5 of written to is same
 # as the one read from
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x /%s2' % (fs_type, ADDR, SMALL_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[0] in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_basic.py:292:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat16.img
=> => fatload host 0:0 1000008 /1MB.file
1048576 bytes read in 6 ms (166.7 MiB/s)
=> => fatwrite host 0:0 1000008 /./1MB.file2 $filesize
1048576 bytes written
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 /./1MB.file2
1048576 bytes read in 5 ms (200 MiB/s)
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01100007 ==> c87fa3f5ae9c21fe037ddd99f1f9b6fc
=> => setenv filesize
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 /1MB.file2
1048576 bytes read in 5 ms (200 MiB/s)
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01100007 ==> c87fa3f5ae9c21fe037ddd99f1f9b6fc
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
/1MB.file.w
Duplicate directory entry.
First Size 1048576 bytes, date 19:00:00 Dec 30 1979
Second Size 1048576 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.000
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat16.img: 5 files, 40049/49146 clusters
________________________________ TestFsBasic.test_fs11[fat32] _________________________________
self = <test_basic.TestFsBasic object at 0x7f8b5c259fd0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_basic = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img', ['fbc0a67ce6639a48152f08bec12ad9...76a3f602', '4d5974214fdc263d07f1185b6a25e98d', '9514940d6dcb18faf2fa5fa5b8b9a3dc', 'e35a0d9377d4ef8adeff2222dc3ba5e0']]
 def test_fs11(self, u_boot_console, fs_obj_basic):
 """
 Test Case 11 - write'
 """
 fs_type,fs_img,md5val = fs_obj_basic
 with u_boot_console.log.section('Test Case 11 - write'):
 # Read 1MB from small file
 # Write it back to test the writes
 # Test Case 11a - Check that the write succeeded
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, SMALL_FILE),
 '%swrite host 0:0 %x /%s.w $filesize'
 % (fs_type, ADDR, SMALL_FILE)])
 assert('1048576 bytes written' in ''.join(output))
 
 # Test Case 11b - Check md5 of written to is same
 # as the one read from
 output = u_boot_console.run_command_list([
 '%sload host 0:0 %x /%s.w' % (fs_type, ADDR, SMALL_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[0] in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_basic.py:241:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img
=> => fatload host 0:0 1000008 /1MB.file
1048576 bytes read in 5 ms (200 MiB/s)
=> => fatwrite host 0:0 1000008 /1MB.file.w $filesize
1048576 bytes written
=> => fatload host 0:0 1000008 /1MB.file.w
1048576 bytes read in 5 ms (200 MiB/s)
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01100007 ==> fbc0a67ce6639a48152f08bec12ad921
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (144636 vs. really 144380)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img: 4 files, 640514/784894 clusters
________________________________ TestFsBasic.test_fs12[fat32] _________________________________
self = <test_basic.TestFsBasic object at 0x7f8b5c265210>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_basic = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img', ['fbc0a67ce6639a48152f08bec12ad9...76a3f602', '4d5974214fdc263d07f1185b6a25e98d', '9514940d6dcb18faf2fa5fa5b8b9a3dc', 'e35a0d9377d4ef8adeff2222dc3ba5e0']]
 def test_fs12(self, u_boot_console, fs_obj_basic):
 """
 Test Case 12 - write to "." directory
 """
 fs_type,fs_img,md5val = fs_obj_basic
 with u_boot_console.log.section('Test Case 12 - write (".")'):
 # Next test case checks writing a file whose dirent
 # is the first in the block, which is always true for "."
 # The write should fail, but the lookup should work
 # Test Case 12 - Check directory traversal
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%swrite host 0:0 %x /. 0x10' % (fs_type, ADDR)])
 assert('Unable to write' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_basic.py:257:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img
=> => fatwrite host 0:0 1000008 /. 0x10
** Unable to write "/." from host 0:0 **
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (144636 vs. really 144380)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img: 4 files, 640514/784894 clusters
________________________________ TestFsBasic.test_fs13[fat32] _________________________________
self = <test_basic.TestFsBasic object at 0x7f8b5c2594d0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_basic = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img', ['fbc0a67ce6639a48152f08bec12ad9...76a3f602', '4d5974214fdc263d07f1185b6a25e98d', '9514940d6dcb18faf2fa5fa5b8b9a3dc', 'e35a0d9377d4ef8adeff2222dc3ba5e0']]
 def test_fs13(self, u_boot_console, fs_obj_basic):
 """
 Test Case 13 - write to a file with "/./<filename>"
 """
 fs_type,fs_img,md5val = fs_obj_basic
 with u_boot_console.log.section('Test Case 13 - write ("./<file>")'):
 # Read 1MB from small file
 # Write it via "same directory", i.e. "." dirent
 # Test Case 13a - Check directory traversal
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, SMALL_FILE),
 '%swrite host 0:0 %x /./%s2 $filesize'
 % (fs_type, ADDR, SMALL_FILE)])
 assert('1048576 bytes written' in ''.join(output))
 
 # Test Case 13b - Check md5 of written to is same
 # as the one read from
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x /./%s2' % (fs_type, ADDR, SMALL_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[0] in ''.join(output))
 
 # Test Case 13c - Check md5 of written to is same
 # as the one read from
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x /%s2' % (fs_type, ADDR, SMALL_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[0] in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_basic.py:292:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img
=> => fatload host 0:0 1000008 /1MB.file
1048576 bytes read in 6 ms (166.7 MiB/s)
=> => fatwrite host 0:0 1000008 /./1MB.file2 $filesize
1048576 bytes written
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 /./1MB.file2
1048576 bytes read in 4 ms (250 MiB/s)
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01100007 ==> fbc0a67ce6639a48152f08bec12ad921
=> => setenv filesize
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 /1MB.file2
1048576 bytes read in 5 ms (200 MiB/s)
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01100007 ==> fbc0a67ce6639a48152f08bec12ad921
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
/1MB.file.w
Duplicate directory entry.
First Size 1048576 bytes, date 19:00:00 Dec 30 1979
Second Size 1048576 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.000
Free cluster summary wrong (144636 vs. really 144124)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/3GB.fat32.img: 5 files, 640770/784894 clusters
________________________________ TestFsExt.test_fs_ext1[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5c1d9e10>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext1(self, u_boot_console, fs_obj_ext):
 """
 Test Case 1 - write a file with absolute path
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 1 - write with abs path'):
 # Test Case 1a - Check if command successfully returned
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x /dir1/%s.w1 $filesize'
 % (fs_type, ADDR, MIN_FILE)])
 assert('20480 bytes written' in ''.join(output))
 
 # Test Case 1b - Check md5 of file content
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x /dir1/%s.w1' % (fs_type, ADDR, MIN_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[0] in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:40:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
mkfs.fat 3.0.28 (2015-05-16)
------------------------------------ Captured stderr setup ------------------------------------
umount: /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/mnt: not mounted
128+0 records in
128+0 records out
134217728 bytes (134 MB, 128 MiB) copied, 0.116002 s, 1.2 GB/s
20+0 records in
20+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.00149438 s, 13.7 MB/s
20+0 records in
20+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.000182687 s, 112 MB/s
20+0 records in
20+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.000330872 s, 61.9 MB/s
20+0 records in
20+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.000179034 s, 114 MB/s
5+0 records in
5+0 records out
5120 bytes (5.1 kB, 5.0 KiB) copied, 0.000112651 s, 45.5 MB/s
20+0 records in
20+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.000176783 s, 116 MB/s
20+0 records in
20+0 records out
20480 bytes (20 kB, 20 KiB) copied, 0.00018274 s, 112 MB/s
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 0 ms
=> => fatwrite host 0:0 1000008 /dir1/testfile.w1 $filesize
20480 bytes written
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 /dir1/testfile.w1
20480 bytes read in 0 ms
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01005007 ==> 07d4f974f41a9fa7558b0ea9fc264a03
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257996)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 3 files, 82/258078 clusters
________________________________ TestFsExt.test_fs_ext2[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5c0ae710>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext2(self, u_boot_console, fs_obj_ext):
 """
 Test Case 2 - write to a file with relative path
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 2 - write with rel path'):
 # Test Case 2a - Check if command successfully returned
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x dir1/%s.w2 $filesize'
 % (fs_type, ADDR, MIN_FILE)])
 assert('20480 bytes written' in ''.join(output))
 
 # Test Case 2b - Check md5 of file content
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x dir1/%s.w2' % (fs_type, ADDR, MIN_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[0] in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:63:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 0 ms
=> => fatwrite host 0:0 1000008 dir1/testfile.w2 $filesize
20480 bytes written
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 dir1/testfile.w2
20480 bytes read in 0 ms
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01005007 ==> 07d4f974f41a9fa7558b0ea9fc264a03
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257956)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 4 files, 122/258078 clusters
________________________________ TestFsExt.test_fs_ext3[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5c0e4290>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext3(self, u_boot_console, fs_obj_ext):
 """
 Test Case 3 - write to a file with invalid path
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 3 - write with invalid path'):
 # Test Case 3 - Check if command expectedly failed
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x /dir1/none/%s.w3 $filesize'
 % (fs_type, ADDR, MIN_FILE)])
 assert('Unable to write "/dir1/none/' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:78:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 1 ms (19.5 MiB/s)
=> => fatwrite host 0:0 1000008 /dir1/none/testfile.w3 $filesize
/dir1/none: doesn't exist (-2)
** Unable to write "/dir1/none/testfile.w3" from host 0:0 **
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257956)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 4 files, 122/258078 clusters
________________________________ TestFsExt.test_fs_ext4[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5c0415d0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext4(self, u_boot_console, fs_obj_ext):
 """
 Test Case 4 - write at non-zero offset, enlarging file size
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 4 - write at non-zero offset, enlarging file size'):
 # Test Case 4a - Check if command successfully returned
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x /dir1/%s.w4 $filesize'
 % (fs_type, ADDR, MIN_FILE)])
 output = u_boot_console.run_command(
 '%swrite host 0:0 %x /dir1/%s.w4 $filesize 0x1400'
 % (fs_type, ADDR, MIN_FILE))
 assert('20480 bytes written' in output)
 
 # Test Case 4b - Check size of written file
 output = u_boot_console.run_command_list([
 '%ssize host 0:0 /dir1/%s.w4' % (fs_type, MIN_FILE),
 'printenv filesize',
 'setenv filesize'])
 assert('filesize=6400' in ''.join(output))
 
 # Test Case 4c - Check md5 of file content
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x /dir1/%s.w4' % (fs_type, ADDR, MIN_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[1] in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:111:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 0 ms
=> => fatwrite host 0:0 1000008 /dir1/testfile.w4 $filesize
20480 bytes written
=> => fatwrite host 0:0 1000008 /dir1/testfile.w4 $filesize 0x1400
20480 bytes written
=> => fatsize host 0:0 /dir1/testfile.w4
=> => printenv filesize
filesize=6400
=> => setenv filesize
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 /dir1/testfile.w4
25600 bytes read in 0 ms
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01006407 ==> 05ca21a110d29e93f418f81bc13eb038
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257906)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 5 files, 172/258078 clusters
________________________________ TestFsExt.test_fs_ext5[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5cf6ee90>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext5(self, u_boot_console, fs_obj_ext):
 """
 Test Case 5 - write at non-zero offset, shrinking file size
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 5 - write at non-zero offset, shrinking file size'):
 # Test Case 5a - Check if command successfully returned
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x /dir1/%s.w5 $filesize'
 % (fs_type, ADDR, MIN_FILE)])
 output = u_boot_console.run_command(
 '%swrite host 0:0 %x /dir1/%s.w5 0x1400 0x1400'
 % (fs_type, ADDR, MIN_FILE))
 assert('5120 bytes written' in output)
 
 # Test Case 5b - Check size of written file
 output = u_boot_console.run_command_list([
 '%ssize host 0:0 /dir1/%s.w5' % (fs_type, MIN_FILE),
 'printenv filesize',
 'setenv filesize'])
 assert('filesize=2800' in ''.join(output))
 
 # Test Case 5c - Check md5 of file content
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x /dir1/%s.w5' % (fs_type, ADDR, MIN_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[2] in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:144:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 1 ms (19.5 MiB/s)
=> => fatwrite host 0:0 1000008 /dir1/testfile.w5 $filesize
20480 bytes written
=> => fatwrite host 0:0 1000008 /dir1/testfile.w5 0x1400 0x1400
5120 bytes written
=> => fatsize host 0:0 /dir1/testfile.w5
=> => printenv filesize
filesize=2800
=> => setenv filesize
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 /dir1/testfile.w5
10240 bytes read in 0 ms
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 01002807 ==> a1db9ce72acaa4a9b0c6b6c96606eb2f
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257886)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 6 files, 192/258078 clusters
________________________________ TestFsExt.test_fs_ext6[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5c265350>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext6(self, u_boot_console, fs_obj_ext):
 """
 Test Case 6 - write nothing at the start, truncating to zero
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 6 - write nothing at the start, truncating to zero'):
 # Test Case 6a - Check if command successfully returned
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x /dir1/%s.w6 $filesize'
 % (fs_type, ADDR, MIN_FILE)])
 output = u_boot_console.run_command(
 '%swrite host 0:0 %x /dir1/%s.w6 0 0'
 % (fs_type, ADDR, MIN_FILE))
 assert('0 bytes written' in output)
 
 # Test Case 6b - Check size of written file
 output = u_boot_console.run_command_list([
 '%ssize host 0:0 /dir1/%s.w6' % (fs_type, MIN_FILE),
 'printenv filesize',
 'setenv filesize'])
 assert('filesize=0' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:169:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 0 ms
=> => fatwrite host 0:0 1000008 /dir1/testfile.w6 $filesize
20480 bytes written
=> => fatwrite host 0:0 1000008 /dir1/testfile.w6 0 0
0 bytes written
=> => fatsize host 0:0 /dir1/testfile.w6
=> => printenv filesize
filesize=0
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257886)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 7 files, 192/258078 clusters
________________________________ TestFsExt.test_fs_ext7[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5cc26d50>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext7(self, u_boot_console, fs_obj_ext):
 """
 Test Case 7 - write at the end (append)
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 7 - write at the end (append)'):
 # Test Case 7a - Check if command successfully returned
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x /dir1/%s.w7 $filesize'
 % (fs_type, ADDR, MIN_FILE)])
 output = u_boot_console.run_command(
 '%swrite host 0:0 %x /dir1/%s.w7 $filesize $filesize'
 % (fs_type, ADDR, MIN_FILE))
 assert('20480 bytes written' in output)
 
 # Test Case 7b - Check size of written file
 output = u_boot_console.run_command_list([
 '%ssize host 0:0 /dir1/%s.w7' % (fs_type, MIN_FILE),
 'printenv filesize',
 'setenv filesize'])
 assert('filesize=a000' in ''.join(output))
 
 # Test Case 7c - Check md5 of file content
 output = u_boot_console.run_command_list([
 'mw.b %x 00 100' % ADDR,
 '%sload host 0:0 %x /dir1/%s.w7' % (fs_type, ADDR, MIN_FILE),
 'md5sum %x $filesize' % ADDR,
 'setenv filesize'])
 assert(md5val[3] in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:202:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 0 ms
=> => fatwrite host 0:0 1000008 /dir1/testfile.w7 $filesize
20480 bytes written
=> => fatwrite host 0:0 1000008 /dir1/testfile.w7 $filesize $filesize
20480 bytes written
=> => fatsize host 0:0 /dir1/testfile.w7
=> => printenv filesize
filesize=a000
=> => setenv filesize
=> => mw.b 1000008 00 100
=> => fatload host 0:0 1000008 /dir1/testfile.w7
40960 bytes read in 1 ms (39.1 MiB/s)
=> => md5sum 1000008 $filesize
md5 for 01000008 ... 0100a007 ==> 18d41384e12f36593e76e1de287c85b2
=> => setenv filesize
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257806)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 8 files, 272/258078 clusters
________________________________ TestFsExt.test_fs_ext8[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5c0e4690>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext8(self, u_boot_console, fs_obj_ext):
 """
 Test Case 8 - write at offset beyond the end of file
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 8 - write beyond the end'):
 # Test Case 8a - Check if command expectedly failed
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x /dir1/%s.w8 $filesize'
 % (fs_type, ADDR, MIN_FILE)])
 output = u_boot_console.run_command(
 '%swrite host 0:0 %x /dir1/%s.w8 0x1400 %x'
 % (fs_type, ADDR, MIN_FILE, 0x100000 + 0x1400))
 assert('Unable to write "/dir1' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:220:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 0 ms
=> => fatwrite host 0:0 1000008 /dir1/testfile.w8 $filesize
20480 bytes written
=> => fatwrite host 0:0 1000008 /dir1/testfile.w8 0x1400 101400
** Unable to write "/dir1/testfile.w8" from host 0:0 **
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257766)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 9 files, 312/258078 clusters
________________________________ TestFsExt.test_fs_ext9[fat32] ________________________________
self = <test_ext.TestFsExt object at 0x7f8b5c279190>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_ext = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img', ['07d4f974f41a9fa7558b0ea9fc264a03', '05ca21a110d29e93f418f81bc13eb038', 'a1db9ce72acaa4a9b0c6b6c96606eb2f', '18d41384e12f36593e76e1de287c85b2']]
 def test_fs_ext9(self, u_boot_console, fs_obj_ext):
 """
 Test Case 9 - write to a non-existing file at non-zero offset
 """
 fs_type,fs_img,md5val = fs_obj_ext
 with u_boot_console.log.section('Test Case 9 - write to non-existing file with non-zero offset'):
 # Test Case 9a - Check if command expectedly failed
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%sload host 0:0 %x /%s' % (fs_type, ADDR, MIN_FILE),
 '%swrite host 0:0 %x /dir1/%s.w9 0x1400 0x1400'
 % (fs_type, ADDR, MIN_FILE)])
 assert('Unable to write "/dir1' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_ext.py:235:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatload host 0:0 1000008 /testfile
20480 bytes read in 0 ms
=> => fatwrite host 0:0 1000008 /dir1/testfile.w9 0x1400 0x1400
** Unable to write "/dir1/testfile.w9" from host 0:0 **
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258036 vs. really 257765)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 9 files, 313/258078 clusters
________________________________ TestMkdir.test_mkdir6[fat16] _________________________________
self = <test_mkdir.TestMkdir object at 0x7f8b5c0e02d0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_mkdir = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img']
 def test_mkdir6(self, u_boot_console, fs_obj_mkdir):
 """
 'Test Case 6 - create as many directories as amount of directory
 entries goes beyond a cluster size)'
 """
 fs_type,fs_img = fs_obj_mkdir
 with u_boot_console.log.section('Test Case 6 - mkdir (create many)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%smkdir host 0:0 dir6' % fs_type,
 '%sls host 0:0 /' % fs_type])
 assert('dir6/' in ''.join(output))
 
 for i in range(0, 20):
 output = u_boot_console.run_command(
 '%smkdir host 0:0 dir6/0123456789abcdef%02x'
 % (fs_type, i))
 output = u_boot_console.run_command('%sls host 0:0 dir6' % fs_type)
 assert('0123456789abcdef00/' in output)
 assert('0123456789abcdef13/' in output)
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir6/0123456789abcdef13/.' % fs_type)
 assert('./' in output)
 assert('../' in output)
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir6/0123456789abcdef13/..' % fs_type)
 assert('0123456789abcdef00/' in output)
 assert('0123456789abcdef13/' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_mkdir.py:121:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img
=> => fatmkdir host 0:0 dir6
=> => fatls host 0:0 /
dir1/
dir6/
0 file(s), 2 dir(s)
=> => fatmkdir host 0:0 dir6/0123456789abcdef00
=> => fatmkdir host 0:0 dir6/0123456789abcdef01
=> => fatmkdir host 0:0 dir6/0123456789abcdef02
=> => fatmkdir host 0:0 dir6/0123456789abcdef03
=> => fatmkdir host 0:0 dir6/0123456789abcdef04
=> => fatmkdir host 0:0 dir6/0123456789abcdef05
=> => fatmkdir host 0:0 dir6/0123456789abcdef06
=> => fatmkdir host 0:0 dir6/0123456789abcdef07
=> => fatmkdir host 0:0 dir6/0123456789abcdef08
=> => fatmkdir host 0:0 dir6/0123456789abcdef09
=> => fatmkdir host 0:0 dir6/0123456789abcdef0a
=> => fatmkdir host 0:0 dir6/0123456789abcdef0b
=> => fatmkdir host 0:0 dir6/0123456789abcdef0c
=> => fatmkdir host 0:0 dir6/0123456789abcdef0d
=> => fatmkdir host 0:0 dir6/0123456789abcdef0e
=> => fatmkdir host 0:0 dir6/0123456789abcdef0f
=> => fatmkdir host 0:0 dir6/0123456789abcdef10
=> => fatmkdir host 0:0 dir6/0123456789abcdef11
=> => fatmkdir host 0:0 dir6/0123456789abcdef12
=> => fatmkdir host 0:0 dir6/0123456789abcdef13
=> => fatls host 0:0 dir6
./
../
0123456789abcdef00/
0123456789abcdef01/
0123456789abcdef02/
0123456789abcdef03/
0123456789abcdef04/
0123456789abcdef05/
0123456789abcdef06/
0123456789abcdef07/
0123456789abcdef08/
0123456789abcdef09/
0123456789abcdef0a/
0123456789abcdef0b/
0123456789abcdef0c/
0123456789abcdef0d/
0123456789abcdef0e/
0123456789abcdef0f/
0123456789abcdef10/
0123456789abcdef11/
0123456789abcdef12/
0123456789abcdef13/
0 file(s), 22 dir(s)
=> => fatls host 0:0 dir6/0123456789abcdef13/.
./
../
0 file(s), 2 dir(s)
=> => fatls host 0:0 dir6/0123456789abcdef13/..
./
../
0123456789abcdef00/
0123456789abcdef01/
0123456789abcdef02/
0123456789abcdef03/
0123456789abcdef04/
0123456789abcdef05/
0123456789abcdef06/
0123456789abcdef07/
0123456789abcdef08/
0123456789abcdef09/
0123456789abcdef0a/
0123456789abcdef0b/
0123456789abcdef0c/
0123456789abcdef0d/
0123456789abcdef0e/
0123456789abcdef0f/
0123456789abcdef10/
0123456789abcdef11/
0123456789abcdef12/
0123456789abcdef13/
0 file(s), 22 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.000
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.001
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.002
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.003
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.004
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.005
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.006
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.007
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.008
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.009
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.010
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.011
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.012
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.013
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.014
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.015
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.016
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.017
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.018
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img: 23 files, 23/65399 clusters
________________________________ TestMkdir.test_mkdir1[fat32] _________________________________
self = <test_mkdir.TestMkdir object at 0x7f8b5c0cb4d0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_mkdir = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_mkdir1(self, u_boot_console, fs_obj_mkdir):
 """
 Test Case 1 - create a directory under a root
 """
 fs_type,fs_img = fs_obj_mkdir
 with u_boot_console.log.section('Test Case 1 - mkdir'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%smkdir host 0:0 dir1' % fs_type,
 '%sls host 0:0 /' % fs_type])
 assert('dir1/' in ''.join(output))
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir1' % fs_type)
 assert('./' in output)
 assert('../' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_mkdir.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=> mkfs.fat 3.0.28 (2015-05-16)
------------------------------------ Captured stderr setup ------------------------------------
128+0 records in
128+0 records out
134217728 bytes (134 MB, 128 MiB) copied, 0.131985 s, 1.0 GB/s
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatmkdir host 0:0 dir1
=> => fatls host 0:0 /
dir1/
0 file(s), 1 dir(s)
=> => fatls host 0:0 dir1
./
../
0 file(s), 2 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258077 vs. really 258076)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 1 files, 2/258078 clusters
________________________________ TestMkdir.test_mkdir2[fat32] _________________________________
self = <test_mkdir.TestMkdir object at 0x7f8b5c279f10>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_mkdir = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_mkdir2(self, u_boot_console, fs_obj_mkdir):
 """
 Test Case 2 - create a directory under a sub-directory
 """
 fs_type,fs_img = fs_obj_mkdir
 with u_boot_console.log.section('Test Case 2 - mkdir (sub-sub directory)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%smkdir host 0:0 dir1/dir2' % fs_type,
 '%sls host 0:0 dir1' % fs_type])
 assert('dir2/' in ''.join(output))
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir1/dir2' % fs_type)
 assert('./' in output)
 assert('../' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_mkdir.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatmkdir host 0:0 dir1/dir2
=> => fatls host 0:0 dir1
./
../
dir2/
0 file(s), 3 dir(s)
=> => fatls host 0:0 dir1/dir2
./
../
0 file(s), 2 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258077 vs. really 258075)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 2 files, 3/258078 clusters
________________________________ TestMkdir.test_mkdir3[fat32] _________________________________
self = <test_mkdir.TestMkdir object at 0x7f8b5c0bd390>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_mkdir = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_mkdir3(self, u_boot_console, fs_obj_mkdir):
 """
 Test Case 3 - trying to create a directory with a non-existing
 path should fail
 """
 fs_type,fs_img = fs_obj_mkdir
 with u_boot_console.log.section('Test Case 3 - mkdir (non-existing path)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%smkdir host 0:0 none/dir3' % fs_type])
 assert('Unable to create a directory' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_mkdir.py:65:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatmkdir host 0:0 none/dir3
none: doesn't exist (-2)
** Unable to create a directory "none/dir3" **
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258077 vs. really 258075)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 2 files, 3/258078 clusters
________________________________ TestMkdir.test_mkdir4[fat32] _________________________________
self = <test_mkdir.TestMkdir object at 0x7f8b5c0e4990>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_mkdir = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_mkdir4(self, u_boot_console, fs_obj_mkdir):
 """
 Test Case 4 - trying to create "." should fail
 """
 fs_type,fs_img = fs_obj_mkdir
 with u_boot_console.log.section('Test Case 4 - mkdir (".")'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%smkdir host 0:0 .' % fs_type])
 assert('Unable to create a directory' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_mkdir.py:77:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatmkdir host 0:0 .
** Unable to create a directory "." **
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258077 vs. really 258075)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 2 files, 3/258078 clusters
________________________________ TestMkdir.test_mkdir5[fat32] _________________________________
self = <test_mkdir.TestMkdir object at 0x7f8b5c0cfc10>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_mkdir = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_mkdir5(self, u_boot_console, fs_obj_mkdir):
 """
 Test Case 5 - trying to create ".." should fail
 """
 fs_type,fs_img = fs_obj_mkdir
 with u_boot_console.log.section('Test Case 5 - mkdir ("..")'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%smkdir host 0:0 ..' % fs_type])
 assert('Unable to create a directory' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_mkdir.py:89:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatmkdir host 0:0 ..
** Unable to create a directory ".." **
=> fsck.fat 3.0.28 (2015-05-16)
Free cluster summary wrong (258077 vs. really 258075)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 2 files, 3/258078 clusters
________________________________ TestMkdir.test_mkdir6[fat32] _________________________________
self = <test_mkdir.TestMkdir object at 0x7f8b5c0d4550>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_mkdir = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_mkdir6(self, u_boot_console, fs_obj_mkdir):
 """
 'Test Case 6 - create as many directories as amount of directory
 entries goes beyond a cluster size)'
 """
 fs_type,fs_img = fs_obj_mkdir
 with u_boot_console.log.section('Test Case 6 - mkdir (create many)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%smkdir host 0:0 dir6' % fs_type,
 '%sls host 0:0 /' % fs_type])
 assert('dir6/' in ''.join(output))
 
 for i in range(0, 20):
 output = u_boot_console.run_command(
 '%smkdir host 0:0 dir6/0123456789abcdef%02x'
 % (fs_type, i))
 output = u_boot_console.run_command('%sls host 0:0 dir6' % fs_type)
 assert('0123456789abcdef00/' in output)
 assert('0123456789abcdef13/' in output)
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir6/0123456789abcdef13/.' % fs_type)
 assert('./' in output)
 assert('../' in output)
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir6/0123456789abcdef13/..' % fs_type)
 assert('0123456789abcdef00/' in output)
 assert('0123456789abcdef13/' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_mkdir.py:121:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatmkdir host 0:0 dir6
=> => fatls host 0:0 /
dir1/
dir6/
0 file(s), 2 dir(s)
=> => fatmkdir host 0:0 dir6/0123456789abcdef00
=> => fatmkdir host 0:0 dir6/0123456789abcdef01
=> => fatmkdir host 0:0 dir6/0123456789abcdef02
=> => fatmkdir host 0:0 dir6/0123456789abcdef03
=> => fatmkdir host 0:0 dir6/0123456789abcdef04
=> => fatmkdir host 0:0 dir6/0123456789abcdef05
=> => fatmkdir host 0:0 dir6/0123456789abcdef06
=> => fatmkdir host 0:0 dir6/0123456789abcdef07
=> => fatmkdir host 0:0 dir6/0123456789abcdef08
=> => fatmkdir host 0:0 dir6/0123456789abcdef09
=> => fatmkdir host 0:0 dir6/0123456789abcdef0a
=> => fatmkdir host 0:0 dir6/0123456789abcdef0b
=> => fatmkdir host 0:0 dir6/0123456789abcdef0c
=> => fatmkdir host 0:0 dir6/0123456789abcdef0d
=> => fatmkdir host 0:0 dir6/0123456789abcdef0e
=> => fatmkdir host 0:0 dir6/0123456789abcdef0f
=> => fatmkdir host 0:0 dir6/0123456789abcdef10
=> => fatmkdir host 0:0 dir6/0123456789abcdef11
=> => fatmkdir host 0:0 dir6/0123456789abcdef12
=> => fatmkdir host 0:0 dir6/0123456789abcdef13
=> => fatls host 0:0 dir6
./
../
0123456789abcdef00/
0123456789abcdef01/
0123456789abcdef02/
0123456789abcdef03/
0123456789abcdef04/
0123456789abcdef05/
0123456789abcdef06/
0123456789abcdef07/
0123456789abcdef08/
0123456789abcdef09/
0123456789abcdef0a/
0123456789abcdef0b/
0123456789abcdef0c/
0123456789abcdef0d/
0123456789abcdef0e/
0123456789abcdef0f/
0123456789abcdef10/
0123456789abcdef11/
0123456789abcdef12/
0123456789abcdef13/
0 file(s), 22 dir(s)
=> => fatls host 0:0 dir6/0123456789abcdef13/.
./
../
0 file(s), 2 dir(s)
=> => fatls host 0:0 dir6/0123456789abcdef13/..
./
../
0123456789abcdef00/
0123456789abcdef01/
0123456789abcdef02/
0123456789abcdef03/
0123456789abcdef04/
0123456789abcdef05/
0123456789abcdef06/
0123456789abcdef07/
0123456789abcdef08/
0123456789abcdef09/
0123456789abcdef0a/
0123456789abcdef0b/
0123456789abcdef0c/
0123456789abcdef0d/
0123456789abcdef0e/
0123456789abcdef0f/
0123456789abcdef10/
0123456789abcdef11/
0123456789abcdef12/
0123456789abcdef13/
0 file(s), 22 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.000
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.001
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.002
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.003
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.004
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.005
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.006
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.007
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.008
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.009
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.010
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.011
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.012
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.013
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.014
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.015
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.016
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.017
/dir6/0123456789abcdef00
Duplicate directory entry.
First Size 0 bytes, date 19:00:00 Dec 30 1979
Second Size 0 bytes, date 19:00:00 Dec 30 1979
Auto-renaming second.
Renamed to FSCK0000.018
Free cluster summary wrong (258077 vs. really 258051)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 23 files, 27/258078 clusters
_______________________________ TestUnlink.test_unlink1[fat16] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5cd20710>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img']
 def test_unlink1(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 1 - delete a file
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 1 - unlink (file)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir1/file1' % fs_type,
 '%sls host 0:0 dir1/file1' % fs_type])
 assert('' == ''.join(output))
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir1/' % fs_type)
 assert(not 'file1' in output)
 assert('file2' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=> mkfs.fat 3.0.28 (2015-05-16)
------------------------------------ Captured stderr setup ------------------------------------
128+0 records in
128+0 records out
134217728 bytes (134 MB, 128 MiB) copied, 0.111438 s, 1.2 GB/s
1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.000194138 s, 5.3 MB/s
1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.000190968 s, 5.4 MB/s
1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.000274909 s, 3.7 MB/s
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img
=> => fatrm host 0:0 dir1/file1
=> => fatls host 0:0 dir1/file1
=> => fatls host 0:0 dir1/
./
../
1024 file2
1 file(s), 2 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "file1"
Auto-deleting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img: 26 files, 26/65399 clusters
_______________________________ TestUnlink.test_unlink2[fat16] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c041110>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img']
 def test_unlink2(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 2 - delete many files
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 2 - unlink (many)'):
 output = u_boot_console.run_command('host bind 0 %s' % fs_img)
 
 for i in range(0, 20):
 output = u_boot_console.run_command_list([
 '%srm host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i),
 '%sls host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i)])
 assert('' == ''.join(output))
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir2' % fs_type)
 assert('0 file(s), 2 dir(s)' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:53:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img
=> => fatrm host 0:0 dir2/0123456789abcdef00
=> => fatls host 0:0 dir2/0123456789abcdef00
=> => fatrm host 0:0 dir2/0123456789abcdef01
=> => fatls host 0:0 dir2/0123456789abcdef01
=> => fatrm host 0:0 dir2/0123456789abcdef02
=> => fatls host 0:0 dir2/0123456789abcdef02
=> => fatrm host 0:0 dir2/0123456789abcdef03
=> => fatls host 0:0 dir2/0123456789abcdef03
=> => fatrm host 0:0 dir2/0123456789abcdef04
=> => fatls host 0:0 dir2/0123456789abcdef04
=> => fatrm host 0:0 dir2/0123456789abcdef05
=> => fatls host 0:0 dir2/0123456789abcdef05
=> => fatrm host 0:0 dir2/0123456789abcdef06
=> => fatls host 0:0 dir2/0123456789abcdef06
=> => fatrm host 0:0 dir2/0123456789abcdef07
=> => fatls host 0:0 dir2/0123456789abcdef07
=> => fatrm host 0:0 dir2/0123456789abcdef08
=> => fatls host 0:0 dir2/0123456789abcdef08
=> => fatrm host 0:0 dir2/0123456789abcdef09
=> => fatls host 0:0 dir2/0123456789abcdef09
=> => fatrm host 0:0 dir2/0123456789abcdef0a
=> => fatls host 0:0 dir2/0123456789abcdef0a
=> => fatrm host 0:0 dir2/0123456789abcdef0b
=> => fatls host 0:0 dir2/0123456789abcdef0b
=> => fatrm host 0:0 dir2/0123456789abcdef0c
=> => fatls host 0:0 dir2/0123456789abcdef0c
=> => fatrm host 0:0 dir2/0123456789abcdef0d
=> => fatls host 0:0 dir2/0123456789abcdef0d
=> => fatrm host 0:0 dir2/0123456789abcdef0e
=> => fatls host 0:0 dir2/0123456789abcdef0e
=> => fatrm host 0:0 dir2/0123456789abcdef0f
=> => fatls host 0:0 dir2/0123456789abcdef0f
=> => fatrm host 0:0 dir2/0123456789abcdef10
=> => fatls host 0:0 dir2/0123456789abcdef10
=> => fatrm host 0:0 dir2/0123456789abcdef11
=> => fatls host 0:0 dir2/0123456789abcdef11
=> => fatrm host 0:0 dir2/0123456789abcdef12
=> => fatls host 0:0 dir2/0123456789abcdef12
=> => fatrm host 0:0 dir2/0123456789abcdef13
=> => fatls host 0:0 dir2/0123456789abcdef13
=> => fatls host 0:0 dir2
./
../
0 file(s), 2 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img: 6 files, 6/65399 clusters
_______________________________ TestUnlink.test_unlink3[fat16] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c27da10>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img']
 def test_unlink3(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 3 - trying to delete a non-existing file should fail
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 3 - unlink (non-existing)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir1/nofile' % fs_type])
 assert('nofile: doesn\'t exist' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:65:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img
=> => fatrm host 0:0 dir1/nofile
nofile: doesn't exist
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img: 6 files, 6/65399 clusters
_______________________________ TestUnlink.test_unlink4[fat16] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5cc03ed0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img']
 def test_unlink4(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 4 - delete an empty directory
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 4 - unlink (directory)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir4' % fs_type])
 assert('' == ''.join(output))
 
 output = u_boot_console.run_command(
 '%sls host 0:0 /' % fs_type)
 assert(not 'dir4' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img
=> => fatrm host 0:0 dir4
=> => fatls host 0:0 /
dir1/
dir2/
dir5/
0 file(s), 3 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "dir4"
Auto-deleting.
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img: 5 files, 5/65399 clusters
_______________________________ TestUnlink.test_unlink5[fat16] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c0e4bd0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img']
 def test_unlink5(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 5 - trying to deleting a non-empty directory ".."
 should fail
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 5 - unlink ("non-empty directory")'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir5' % fs_type])
 assert('directory is not empty' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img
=> => fatrm host 0:0 dir5
Error: directory is not empty: 3
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "dir4"
Auto-deleting.
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img: 5 files, 5/65399 clusters
_______________________________ TestUnlink.test_unlink6[fat16] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c0cf4d0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img']
 def test_unlink6(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 6 - trying to deleting a "." should fail
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 6 - unlink (".")'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir5/.' % fs_type])
 assert('directory is not empty' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:106:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img
=> => fatrm host 0:0 dir5/.
Error: directory is not empty: 3
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "dir4"
Auto-deleting.
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img: 5 files, 5/65399 clusters
_______________________________ TestUnlink.test_unlink7[fat16] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c0ae990>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img']
 def test_unlink7(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 7 - trying to deleting a ".." should fail
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 7 - unlink ("..")'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir5/..' % fs_type])
 assert('directory is not empty' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img
=> => fatrm host 0:0 dir5/..
Error: directory is not empty: 3
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "dir4"
Auto-deleting.
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat16.img: 5 files, 5/65399 clusters
_______________________________ TestUnlink.test_unlink1[fat32] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c0d4250>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_unlink1(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 1 - delete a file
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 1 - unlink (file)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir1/file1' % fs_type,
 '%sls host 0:0 dir1/file1' % fs_type])
 assert('' == ''.join(output))
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir1/' % fs_type)
 assert(not 'file1' in output)
 assert('file2' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:34:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=> mkfs.fat 3.0.28 (2015-05-16)
------------------------------------ Captured stderr setup ------------------------------------
umount: /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/mnt: not mounted
128+0 records in
128+0 records out
134217728 bytes (134 MB, 128 MiB) copied, 0.104736 s, 1.3 GB/s
1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.000170326 s, 6.0 MB/s
1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.00016483 s, 6.2 MB/s
1+0 records in
1+0 records out
1024 bytes (1.0 kB, 1.0 KiB) copied, 0.000167825 s, 6.1 MB/s
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatrm host 0:0 dir1/file1
=> => fatls host 0:0 dir1/file1
=> => fatls host 0:0 dir1/
./
../
1024 file2
1 file(s), 2 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "file1"
Auto-deleting.
Free cluster summary wrong (258044 vs. really 258046)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 26 files, 32/258078 clusters
_______________________________ TestUnlink.test_unlink2[fat32] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c0d8610>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_unlink2(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 2 - delete many files
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 2 - unlink (many)'):
 output = u_boot_console.run_command('host bind 0 %s' % fs_img)
 
 for i in range(0, 20):
 output = u_boot_console.run_command_list([
 '%srm host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i),
 '%sls host 0:0 dir2/0123456789abcdef%02x' % (fs_type, i)])
 assert('' == ''.join(output))
 
 output = u_boot_console.run_command(
 '%sls host 0:0 dir2' % fs_type)
 assert('0 file(s), 2 dir(s)' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:53:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatrm host 0:0 dir2/0123456789abcdef00
=> => fatls host 0:0 dir2/0123456789abcdef00
=> => fatrm host 0:0 dir2/0123456789abcdef01
=> => fatls host 0:0 dir2/0123456789abcdef01
=> => fatrm host 0:0 dir2/0123456789abcdef02
=> => fatls host 0:0 dir2/0123456789abcdef02
=> => fatrm host 0:0 dir2/0123456789abcdef03
=> => fatls host 0:0 dir2/0123456789abcdef03
=> => fatrm host 0:0 dir2/0123456789abcdef04
=> => fatls host 0:0 dir2/0123456789abcdef04
=> => fatrm host 0:0 dir2/0123456789abcdef05
=> => fatls host 0:0 dir2/0123456789abcdef05
=> => fatrm host 0:0 dir2/0123456789abcdef06
=> => fatls host 0:0 dir2/0123456789abcdef06
=> => fatrm host 0:0 dir2/0123456789abcdef07
=> => fatls host 0:0 dir2/0123456789abcdef07
=> => fatrm host 0:0 dir2/0123456789abcdef08
=> => fatls host 0:0 dir2/0123456789abcdef08
=> => fatrm host 0:0 dir2/0123456789abcdef09
=> => fatls host 0:0 dir2/0123456789abcdef09
=> => fatrm host 0:0 dir2/0123456789abcdef0a
=> => fatls host 0:0 dir2/0123456789abcdef0a
=> => fatrm host 0:0 dir2/0123456789abcdef0b
=> => fatls host 0:0 dir2/0123456789abcdef0b
=> => fatrm host 0:0 dir2/0123456789abcdef0c
=> => fatls host 0:0 dir2/0123456789abcdef0c
=> => fatrm host 0:0 dir2/0123456789abcdef0d
=> => fatls host 0:0 dir2/0123456789abcdef0d
=> => fatrm host 0:0 dir2/0123456789abcdef0e
=> => fatls host 0:0 dir2/0123456789abcdef0e
=> => fatrm host 0:0 dir2/0123456789abcdef0f
=> => fatls host 0:0 dir2/0123456789abcdef0f
=> => fatrm host 0:0 dir2/0123456789abcdef10
=> => fatls host 0:0 dir2/0123456789abcdef10
=> => fatrm host 0:0 dir2/0123456789abcdef11
=> => fatls host 0:0 dir2/0123456789abcdef11
=> => fatrm host 0:0 dir2/0123456789abcdef12
=> => fatls host 0:0 dir2/0123456789abcdef12
=> => fatrm host 0:0 dir2/0123456789abcdef13
=> => fatls host 0:0 dir2/0123456789abcdef13
=> => fatls host 0:0 dir2
./
../
0 file(s), 2 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Free cluster summary wrong (258044 vs. really 258066)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 6 files, 12/258078 clusters
_______________________________ TestUnlink.test_unlink3[fat32] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c279650>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_unlink3(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 3 - trying to delete a non-existing file should fail
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 3 - unlink (non-existing)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir1/nofile' % fs_type])
 assert('nofile: doesn\'t exist' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:65:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatrm host 0:0 dir1/nofile
nofile: doesn't exist
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Free cluster summary wrong (258044 vs. really 258066)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 6 files, 12/258078 clusters
_______________________________ TestUnlink.test_unlink4[fat32] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c2e4490>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_unlink4(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 4 - delete an empty directory
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 4 - unlink (directory)'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir4' % fs_type])
 assert('' == ''.join(output))
 
 output = u_boot_console.run_command(
 '%sls host 0:0 /' % fs_type)
 assert(not 'dir4' in output)
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatrm host 0:0 dir4
=> => fatls host 0:0 /
dir1/
dir2/
dir5/
0 file(s), 3 dir(s)
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "dir4"
Auto-deleting.
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Free cluster summary wrong (258044 vs. really 258067)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 5 files, 11/258078 clusters
_______________________________ TestUnlink.test_unlink5[fat32] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c0e0650>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_unlink5(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 5 - trying to deleting a non-empty directory ".."
 should fail
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 5 - unlink ("non-empty directory")'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir5' % fs_type])
 assert('directory is not empty' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:94:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatrm host 0:0 dir5
Error: directory is not empty: 3
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "dir4"
Auto-deleting.
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Free cluster summary wrong (258044 vs. really 258067)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 5 files, 11/258078 clusters
_______________________________ TestUnlink.test_unlink6[fat32] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c0bd950>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_unlink6(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 6 - trying to deleting a "." should fail
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 6 - unlink (".")'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir5/.' % fs_type])
 assert('directory is not empty' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:106:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatrm host 0:0 dir5/.
Error: directory is not empty: 3
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "dir4"
Auto-deleting.
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Free cluster summary wrong (258044 vs. really 258067)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 5 files, 11/258078 clusters
_______________________________ TestUnlink.test_unlink7[fat32] ________________________________
self = <test_unlink.TestUnlink object at 0x7f8b5c0e42d0>
u_boot_console = <u_boot_console_sandbox.ConsoleSandbox object at 0x7f8b5d23bd90>
fs_obj_unlink = ['fat', '/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img']
 def test_unlink7(self, u_boot_console, fs_obj_unlink):
 """
 Test Case 7 - trying to deleting a ".." should fail
 """
 fs_type,fs_img = fs_obj_unlink
 with u_boot_console.log.section('Test Case 7 - unlink ("..")'):
 output = u_boot_console.run_command_list([
 'host bind 0 %s' % fs_img,
 '%srm host 0:0 dir5/..' % fs_type])
 assert('directory is not empty' in ''.join(output))
> assert_fs_integrity(fs_type, fs_img)
test/py/tests/test_fs/test_unlink.py:118:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/py/tests/test_fs/fstest_helpers.py:13: in assert_fs_integrity
 check_call('fsck.fat -n %s' % fs_img, shell=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
popenargs = ('fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img',)
kwargs = {'shell': True}, retcode = 1
cmd = 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img'
 def check_call(*popenargs, **kwargs):
 """Run command with arguments. Wait for command to complete. If
 the exit code was zero then return, otherwise raise
 CalledProcessError. The CalledProcessError object will have the
 return code in the returncode attribute.
 
 The arguments are the same as for the Popen constructor. Example:
 
 check_call(["ls", "-l"])
 """
 retcode = call(*popenargs, **kwargs)
 if retcode:
 cmd = kwargs.get("args")
 if cmd is None:
 cmd = popenargs[0]
> raise CalledProcessError(retcode, cmd)
E CalledProcessError: Command 'fsck.fat -n /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img' returned non-zero exit status 1
/usr/lib/python2.7/subprocess.py:541: CalledProcessError
------------------------------------ Captured stdout setup ------------------------------------
/u-boot
clear 0000000010001000 8000000
U-Boot 2019.04-00062-gd19825f5e689 (Apr 09 2019 - 15:43:40 -0400)
Model: sandbox
DRAM: 128 MiB
MMC: mmc2: 2 (SD), mmc1: 1 (SD), mmc0: 0 (SD)
In: serial
Out: vidconsole
Err: vidconsole
Model: sandbox
SCSI:
Net: eth0: eth@10002000, eth5: eth@10003000, eth3: sbe5, eth1: eth@10004000
Hit any key to stop autoboot: 2  0
=>
------------------------------------ Captured stdout call -------------------------------------
=> host bind 0 /home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img
=> => fatrm host 0:0 dir5/..
Error: directory is not empty: 3
=> fsck.fat 3.0.28 (2015-05-16)
Orphaned long file name part "dir4"
Auto-deleting.
Orphaned long file name part "file1"
Auto-deleting.
Orphaned long file name part "0123456789abcdef00"
Auto-deleting.
Orphaned long file name part "0123456789abcdef01"
Auto-deleting.
Orphaned long file name part "0123456789abcdef02"
Auto-deleting.
Orphaned long file name part "0123456789abcdef03"
Auto-deleting.
Orphaned long file name part "0123456789abcdef04"
Auto-deleting.
Orphaned long file name part "0123456789abcdef05"
Auto-deleting.
Orphaned long file name part "0123456789abcdef06"
Auto-deleting.
Orphaned long file name part "0123456789abcdef07"
Auto-deleting.
Orphaned long file name part "0123456789abcdef08"
Auto-deleting.
Orphaned long file name part "0123456789abcdef09"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0a"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0b"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0c"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0d"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0e"
Auto-deleting.
Orphaned long file name part "0123456789abcdef0f"
Auto-deleting.
Orphaned long file name part "0123456789abcdef10"
Auto-deleting.
Orphaned long file name part "0123456789abcdef11"
Auto-deleting.
Orphaned long file name part "0123456789abcdef12"
Auto-deleting.
Orphaned long file name part "0123456789abcdef13"
Auto-deleting.
Free cluster summary wrong (258044 vs. really 258067)
Auto-correcting.
Leaving filesystem unchanged.
/home/trini/work/u-boot/u-boot/build-sandbox/persistent-data/128MB.fat32.img: 5 files, 11/258078 clusters
===================== 34 failed, 388 passed, 67 skipped in 144.69 seconds =====================
sandbox_spl: +make O=/home/trini/work/u-boot/u-boot/build-sandbox_spl -s sandbox_spl_defconfig
+make O=/home/trini/work/u-boot/u-boot/build-sandbox_spl -s -j8
===================================== test session starts =====================================
platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /home/trini/work/u-boot/u-boot, inifile:

collecting 0 items
collecting 1 items
collecting 6 items
collecting 8 items
collecting 9 items
collecting 15 items
collecting 20 items
collecting 32 items
collecting 33 items
collecting 60 items
collecting 67 items
collecting 68 items
collecting 69 items
collecting 124 items
collecting 126 items
collecting 128 items
collecting 129 items
collecting 135 items
collecting 136 items
collecting 143 items
collecting 145 items
collecting 149 items
collecting 153 items
collecting 154 items
collecting 165 items
collecting 166 items
collecting 167 items
collecting 394 items
collecting 395 items
collecting 434 items
collecting 434 items
collecting 434 items
collecting 452 items
collecting 452 items
collecting 452 items
collecting 464 items
collecting 464 items
collecting 464 items
collecting 478 items
collecting 478 items
collecting 478 items
collected 478 items

test/py/tests/test_handoff.py s
test/py/tests/test_ofplatdata.py .
================= 476 tests deselected by '-ktest_ofplatdata or test_handoff' =================
===================== 1 passed, 1 skipped, 476 deselected in 0.97 seconds =====================
sandbox_flattree: +make O=/home/trini/work/u-boot/u-boot/build-sandbox_flattree -s sandbox_flattree_defconfig
+make O=/home/trini/work/u-boot/u-boot/build-sandbox_flattree -s -j8
===================================== test session starts =====================================
platform linux2 -- Python 2.7.12, pytest-2.8.7, py-1.4.31, pluggy-0.3.1
rootdir: /home/trini/work/u-boot/u-boot, inifile:

collecting 0 items
collecting 1 items
collecting 6 items
collecting 8 items
collecting 9 items
collecting 15 items
collecting 20 items
collecting 32 items
collecting 33 items
collecting 60 items
collecting 67 items
collecting 68 items
collecting 69 items
collecting 124 items
collecting 126 items
collecting 128 items
collecting 129 items
collecting 135 items
collecting 136 items
collecting 143 items
collecting 145 items
collecting 149 items
collecting 153 items
collecting 154 items
collecting 165 items
collecting 166 items
collecting 167 items
collecting 395 items
collecting 396 items
collecting 435 items
collecting 435 items
collecting 435 items
collecting 453 items
collecting 453 items
collecting 453 items
collecting 465 items
collecting 465 items
collecting 465 items
collecting 479 items
collecting 479 items
collecting 479 items
collected 479 items

test/py/tests/test_ut.py ....................................................................................................................................................................................................................................
============================= 251 tests deselected by '-ktest_ut' =============================
========================= 228 passed, 251 deselected in 5.52 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 FAILED
Makefile:1873: recipe for target 'tests' failed
make: *** [tests] Error 1
trini@bill-the-cat:~/work/u-boot/u-boot (baseline)$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment