blob: 88b163ce305d995edf384f7ca0f68376543cac6a [file] [log] [blame]
AKASHI Takahiro615af9a2018-09-11 15:59:19 +09001# SPDX-License-Identifier: GPL-2.0+
2# Copyright (c) 2018, Linaro Limited
3# Author: Takahiro Akashi <takahiro.akashi@linaro.org>
4#
5# U-Boot File System:Basic Test
6
7"""
8This test verifies basic read/write operation on file system.
9"""
10
11import pytest
12import re
13from fstest_defs import *
Jean-Jacques Hiblotd2fd35c2019-02-13 12:15:23 +010014from fstest_helpers import assert_fs_integrity
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090015
16@pytest.mark.boardspec('sandbox')
Simon Glass3fcb8282018-11-18 08:14:29 -070017@pytest.mark.slow
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090018class TestFsBasic(object):
Simon Glassddba5202025-02-09 09:07:14 -070019 def test_fs1(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090020 """
21 Test Case 1 - ls command, listing a root directory and invalid directory
22 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010023 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -070024 with ubman.log.section('Test Case 1a - ls'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090025 # Test Case 1 - ls
Simon Glassddba5202025-02-09 09:07:14 -070026 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090027 'host bind 0 %s' % fs_img,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010028 '%sls host 0:0' % fs_cmd_prefix])
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090029 assert(re.search('2621440000 *%s' % BIG_FILE, ''.join(output)))
30 assert(re.search('1048576 *%s' % SMALL_FILE, ''.join(output)))
31
Simon Glassddba5202025-02-09 09:07:14 -070032 with ubman.log.section('Test Case 1b - ls (invalid dir)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090033 # In addition, test with a nonexistent directory to see if we crash.
Simon Glassddba5202025-02-09 09:07:14 -070034 output = ubman.run_command(
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010035 '%sls host 0:0 invalid_d' % fs_cmd_prefix)
Heinrich Schuchardt19c781d2024-10-26 08:40:48 +020036 assert('' == output)
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090037
Marek Vasut4d6baea2025-04-13 10:55:03 +020038 with ubman.log.section('Test Case 1c - test -e'):
39 # Test Case 1 - test -e
40 output = ubman.run_command_list([
41 'host bind 0 %s' % fs_img,
42 'test -e host 0:0 1MB.file && echo PASS'])
43 assert('PASS' in ''.join(output))
44
45 with ubman.log.section('Test Case 1d - test -e (invalid file)'):
46 # In addition, test with a nonexistent file to see if we crash.
47 output = ubman.run_command(
48 'test -e host 0:0 2MB.file || echo PASS')
49 assert('PASS' in ''.join(output))
50
Simon Glassddba5202025-02-09 09:07:14 -070051 def test_fs2(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090052 """
53 Test Case 2 - size command for a small file
54 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010055 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -070056 with ubman.log.section('Test Case 2a - size (small)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090057 # 1MB is 0x0010 0000
58 # Test Case 2a - size of small file
Simon Glassddba5202025-02-09 09:07:14 -070059 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090060 'host bind 0 %s' % fs_img,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010061 '%ssize host 0:0 /%s' % (fs_cmd_prefix, SMALL_FILE),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090062 'printenv filesize',
63 'setenv filesize'])
64 assert('filesize=100000' in ''.join(output))
65
Simon Glassddba5202025-02-09 09:07:14 -070066 with ubman.log.section('Test Case 2b - size (/../<file>)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090067 # Test Case 2b - size of small file via a path using '..'
Simon Glassddba5202025-02-09 09:07:14 -070068 output = ubman.run_command_list([
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010069 '%ssize host 0:0 /SUBDIR/../%s' % (fs_cmd_prefix, SMALL_FILE),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090070 'printenv filesize',
71 'setenv filesize'])
72 assert('filesize=100000' in ''.join(output))
73
Simon Glassddba5202025-02-09 09:07:14 -070074 def test_fs3(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090075 """
76 Test Case 3 - size command for a large file
77 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010078 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -070079 with ubman.log.section('Test Case 3 - size (large)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090080 # 2.5GB (1024*1024*2500) is 0x9C40 0000
81 # Test Case 3 - size of big file
Simon Glassddba5202025-02-09 09:07:14 -070082 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090083 'host bind 0 %s' % fs_img,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010084 '%ssize host 0:0 /%s' % (fs_cmd_prefix, BIG_FILE),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090085 'printenv filesize',
86 'setenv filesize'])
87 assert('filesize=9c400000' in ''.join(output))
88
Simon Glassddba5202025-02-09 09:07:14 -070089 def test_fs4(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090090 """
91 Test Case 4 - load a small file, 1MB
92 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010093 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -070094 with ubman.log.section('Test Case 4 - load (small)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090095 # Test Case 4a - Read full 1MB of small file
Simon Glassddba5202025-02-09 09:07:14 -070096 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090097 'host bind 0 %s' % fs_img,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +010098 '%sload host 0:0 %x /%s' % (fs_cmd_prefix, ADDR, SMALL_FILE),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +090099 'printenv filesize'])
100 assert('filesize=100000' in ''.join(output))
101
102 # Test Case 4b - Read full 1MB of small file
Simon Glassddba5202025-02-09 09:07:14 -0700103 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900104 'md5sum %x $filesize' % ADDR,
105 'setenv filesize'])
106 assert(md5val[0] in ''.join(output))
107
Simon Glassddba5202025-02-09 09:07:14 -0700108 def test_fs5(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900109 """
110 Test Case 5 - load, reading first 1MB of 3GB file
111 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100112 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700113 with ubman.log.section('Test Case 5 - load (first 1MB)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900114 # Test Case 5a - First 1MB of big file
Simon Glassddba5202025-02-09 09:07:14 -0700115 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900116 'host bind 0 %s' % fs_img,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100117 '%sload host 0:0 %x /%s %x 0x0' % (fs_cmd_prefix, ADDR, BIG_FILE, LENGTH),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900118 'printenv filesize'])
119 assert('filesize=100000' in ''.join(output))
120
121 # Test Case 5b - First 1MB of big file
Simon Glassddba5202025-02-09 09:07:14 -0700122 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900123 'md5sum %x $filesize' % ADDR,
124 'setenv filesize'])
125 assert(md5val[1] in ''.join(output))
126
Simon Glassddba5202025-02-09 09:07:14 -0700127 def test_fs6(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900128 """
129 Test Case 6 - load, reading last 1MB of 3GB file
130 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100131 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700132 with ubman.log.section('Test Case 6 - load (last 1MB)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900133 # fails for ext as no offset support
134 # Test Case 6a - Last 1MB of big file
Simon Glassddba5202025-02-09 09:07:14 -0700135 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900136 'host bind 0 %s' % fs_img,
137 '%sload host 0:0 %x /%s %x 0x9c300000'
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100138 % (fs_cmd_prefix, ADDR, BIG_FILE, LENGTH),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900139 'printenv filesize'])
140 assert('filesize=100000' in ''.join(output))
141
142 # Test Case 6b - Last 1MB of big file
Simon Glassddba5202025-02-09 09:07:14 -0700143 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900144 'md5sum %x $filesize' % ADDR,
145 'setenv filesize'])
146 assert(md5val[2] in ''.join(output))
147
Simon Glassddba5202025-02-09 09:07:14 -0700148 def test_fs7(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900149 """
150 Test Case 7 - load, 1MB from the last 1MB in 2GB
151 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100152 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700153 with ubman.log.section('Test Case 7 - load (last 1MB in 2GB)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900154 # fails for ext as no offset support
155 # Test Case 7a - One from the last 1MB chunk of 2GB
Simon Glassddba5202025-02-09 09:07:14 -0700156 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900157 'host bind 0 %s' % fs_img,
158 '%sload host 0:0 %x /%s %x 0x7ff00000'
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100159 % (fs_cmd_prefix, ADDR, BIG_FILE, LENGTH),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900160 'printenv filesize'])
161 assert('filesize=100000' in ''.join(output))
162
163 # Test Case 7b - One from the last 1MB chunk of 2GB
Simon Glassddba5202025-02-09 09:07:14 -0700164 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900165 'md5sum %x $filesize' % ADDR,
166 'setenv filesize'])
167 assert(md5val[3] in ''.join(output))
168
Simon Glassddba5202025-02-09 09:07:14 -0700169 def test_fs8(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900170 """
171 Test Case 8 - load, reading first 1MB in 2GB
172 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100173 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700174 with ubman.log.section('Test Case 8 - load (first 1MB in 2GB)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900175 # fails for ext as no offset support
176 # Test Case 8a - One from the start 1MB chunk from 2GB
Simon Glassddba5202025-02-09 09:07:14 -0700177 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900178 'host bind 0 %s' % fs_img,
179 '%sload host 0:0 %x /%s %x 0x80000000'
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100180 % (fs_cmd_prefix, ADDR, BIG_FILE, LENGTH),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900181 'printenv filesize'])
182 assert('filesize=100000' in ''.join(output))
183
184 # Test Case 8b - One from the start 1MB chunk from 2GB
Simon Glassddba5202025-02-09 09:07:14 -0700185 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900186 'md5sum %x $filesize' % ADDR,
187 'setenv filesize'])
188 assert(md5val[4] in ''.join(output))
189
Simon Glassddba5202025-02-09 09:07:14 -0700190 def test_fs9(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900191 """
192 Test Case 9 - load, 1MB crossing 2GB boundary
193 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100194 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700195 with ubman.log.section('Test Case 9 - load (crossing 2GB boundary)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900196 # fails for ext as no offset support
197 # Test Case 9a - One 1MB chunk crossing the 2GB boundary
Simon Glassddba5202025-02-09 09:07:14 -0700198 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900199 'host bind 0 %s' % fs_img,
200 '%sload host 0:0 %x /%s %x 0x7ff80000'
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100201 % (fs_cmd_prefix, ADDR, BIG_FILE, LENGTH),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900202 'printenv filesize'])
203 assert('filesize=100000' in ''.join(output))
204
205 # Test Case 9b - One 1MB chunk crossing the 2GB boundary
Simon Glassddba5202025-02-09 09:07:14 -0700206 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900207 'md5sum %x $filesize' % ADDR,
208 'setenv filesize'])
209 assert(md5val[5] in ''.join(output))
210
Simon Glassddba5202025-02-09 09:07:14 -0700211 def test_fs10(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900212 """
213 Test Case 10 - load, reading beyond file end'):
214 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100215 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700216 with ubman.log.section('Test Case 10 - load (beyond file end)'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900217 # Generic failure case
218 # Test Case 10 - 2MB chunk from the last 1MB of big file
Simon Glassddba5202025-02-09 09:07:14 -0700219 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900220 'host bind 0 %s' % fs_img,
221 '%sload host 0:0 %x /%s 0x00200000 0x9c300000'
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100222 % (fs_cmd_prefix, ADDR, BIG_FILE),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900223 'printenv filesize',
224 'md5sum %x $filesize' % ADDR,
225 'setenv filesize'])
226 assert('filesize=100000' in ''.join(output))
227
Simon Glassddba5202025-02-09 09:07:14 -0700228 def test_fs11(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900229 """
230 Test Case 11 - write'
231 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100232 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700233 with ubman.log.section('Test Case 11 - write'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900234 # Read 1MB from small file
235 # Write it back to test the writes
236 # Test Case 11a - Check that the write succeeded
Simon Glassddba5202025-02-09 09:07:14 -0700237 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900238 'host bind 0 %s' % fs_img,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100239 '%sload host 0:0 %x /%s' % (fs_cmd_prefix, ADDR, SMALL_FILE),
240 '%s%s host 0:0 %x /%s.w $filesize'
241 % (fs_cmd_prefix, fs_cmd_write, ADDR, SMALL_FILE)])
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900242 assert('1048576 bytes written' in ''.join(output))
243
244 # Test Case 11b - Check md5 of written to is same
245 # as the one read from
Simon Glassddba5202025-02-09 09:07:14 -0700246 output = ubman.run_command_list([
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100247 '%sload host 0:0 %x /%s.w' % (fs_cmd_prefix, ADDR, SMALL_FILE),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900248 'md5sum %x $filesize' % ADDR,
249 'setenv filesize'])
250 assert(md5val[0] in ''.join(output))
Jean-Jacques Hiblotd2fd35c2019-02-13 12:15:23 +0100251 assert_fs_integrity(fs_type, fs_img)
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900252
Simon Glassddba5202025-02-09 09:07:14 -0700253 def test_fs12(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900254 """
255 Test Case 12 - write to "." directory
256 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100257 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700258 with ubman.log.section('Test Case 12 - write (".")'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900259 # Next test case checks writing a file whose dirent
260 # is the first in the block, which is always true for "."
261 # The write should fail, but the lookup should work
262 # Test Case 12 - Check directory traversal
Simon Glassddba5202025-02-09 09:07:14 -0700263 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900264 'host bind 0 %s' % fs_img,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100265 '%s%s host 0:0 %x /. 0x10'
266 % (fs_cmd_prefix, fs_cmd_write, ADDR)])
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900267 assert('Unable to write' in ''.join(output))
Jean-Jacques Hiblotd2fd35c2019-02-13 12:15:23 +0100268 assert_fs_integrity(fs_type, fs_img)
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900269
Simon Glassddba5202025-02-09 09:07:14 -0700270 def test_fs13(self, ubman, fs_obj_basic):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900271 """
272 Test Case 13 - write to a file with "/./<filename>"
273 """
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100274 fs_type,fs_cmd_prefix,fs_cmd_write,fs_img,md5val = fs_obj_basic
Simon Glassddba5202025-02-09 09:07:14 -0700275 with ubman.log.section('Test Case 13 - write ("./<file>")'):
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900276 # Read 1MB from small file
277 # Write it via "same directory", i.e. "." dirent
278 # Test Case 13a - Check directory traversal
Simon Glassddba5202025-02-09 09:07:14 -0700279 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900280 'host bind 0 %s' % fs_img,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100281 '%sload host 0:0 %x /%s' % (fs_cmd_prefix, ADDR, SMALL_FILE),
282 '%s%s host 0:0 %x /./%s2 $filesize'
283 % (fs_cmd_prefix, fs_cmd_write, ADDR, SMALL_FILE)])
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900284 assert('1048576 bytes written' in ''.join(output))
285
286 # Test Case 13b - Check md5 of written to is same
287 # as the one read from
Simon Glassddba5202025-02-09 09:07:14 -0700288 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900289 'mw.b %x 00 100' % ADDR,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100290 '%sload host 0:0 %x /./%s2' % (fs_cmd_prefix, ADDR, SMALL_FILE),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900291 'md5sum %x $filesize' % ADDR,
292 'setenv filesize'])
293 assert(md5val[0] in ''.join(output))
294
295 # Test Case 13c - Check md5 of written to is same
296 # as the one read from
Simon Glassddba5202025-02-09 09:07:14 -0700297 output = ubman.run_command_list([
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900298 'mw.b %x 00 100' % ADDR,
Marek Vasut8d3fb2b2025-03-17 04:12:42 +0100299 '%sload host 0:0 %x /%s2' % (fs_cmd_prefix, ADDR, SMALL_FILE),
AKASHI Takahiro615af9a2018-09-11 15:59:19 +0900300 'md5sum %x $filesize' % ADDR,
301 'setenv filesize'])
302 assert(md5val[0] in ''.join(output))
Jean-Jacques Hiblotd2fd35c2019-02-13 12:15:23 +0100303 assert_fs_integrity(fs_type, fs_img)