| Age | Commit message (Collapse) | Author |
|
This file is empty now. Remove it and its uses.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the new suite-runner to run these tests instead.
Signed-off-by: Simon Glass <[email protected]>
|
|
Most test suites have a _test suffix. This is not necessary as there is
also a ut_ prefix.
Drop the suffix so that (with future work) the suite name can be used as
the linker-list name.
Remove the suffix from the pytest regex as well, moving it to the top of
the file, as it is a constant.
Signed-off-by: Simon Glass <[email protected]>
|
|
For printing size_t we must use %zd and not %ld to avoid
a -Wformat error on 32-bit systems.
Signed-off-by: Heinrich Schuchardt <[email protected]>
|
|
We want to completely initialize the mbr and embr buffers. This requires
passing the buffer size and not the size of a pointer to the buffer.
Addresses-Coverity-ID: 510454 Wrong sizeof argument
Signed-off-by: Heinrich Schuchardt <[email protected]>
|
|
The test currently runs twice as it is declared twice. Unwind this.
Signed-off-by: Simon Glass <[email protected]>
|
|
The normal approach with sandbox is to use a fixed memory address in the
RAM, to avoid needing to create a map for transient local variables.
Update this test to use this approach.
Signed-off-by: Simon Glass <[email protected]>
|
|
It isn't that important to factor out constants in tests, but in this
case we have 0x200 and 512 used. The commands don't use the constant
as they use a block count ('1'). It doesn't create more code to use a
constant, so create one.
Signed-off-by: Simon Glass <[email protected]>
|
|
This tests maps some local variables into sandbox's address space. Make
sure to unmap them afterwards.
Note that the normal approach with sandbox is to use a fixed memory
address in the RAM, to avoid needing to create a map for transient local
variables.
Signed-off-by: Simon Glass <[email protected]>
Fixes: 04291ee0aba ("cmd: mbr: Allow 4 MBR partitions without need...")
|
|
U-Boot commands typically don't need 0x to specify hex, since they use
hex by default. Adding 0x in this test is confusing since it suggests
that it is necessary. Drop it from the file.
Also use the %#x construct to get the 0x when needed.
Signed-off-by: Simon Glass <[email protected]>
|
|
Switch to lower-case hex which is more commonly used in U-Boot.
Signed-off-by: Simon Glass <[email protected]>
|
|
Use the ut_assert_console_end() function provided, rather than doing it
separately.
Signed-off-by: Simon Glass <[email protected]>
|
|
It is seldom necessary to call this function. Drop its use in the
command tests.
Add a few extra checks to the wget test so that resetting is not
needed.
Signed-off-by: Simon Glass <[email protected]>
|
|
The _REC suffix doesn't add much. Really what we want to know is whether
the test uses the console, so rename this flag.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Mattijs Korpershoek <[email protected]>
|
|
Most tests don't have this. It helps to keep the test declaration
clearly associated with the function it relates to, rather than the next
one in the file. Remove the extra blank line and mention this in the
docs.
Signed-off-by: Simon Glass <[email protected]>
|
|
The UT_TESTF_ macros read as 'unit test test flags' which is not right.
Rename to UTF ('unit test flags').
This has the benefit of being shorter, which helps keep UNIT_TEST()
declarations on a single line.
Give the enum a name and reference it from the UNIT_TEST() macros while
we are here.
Signed-off-by: Simon Glass <[email protected]>
|
|
This patch fixes Smatch static checker warning:
test/cmd/mbr.c:243 mbr_test_run()
warn: sizeof(NUMBER)?
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Alexander Gendin <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
|
|
Fix an issue reported by Coverity scan, and fix code indentation.
Addresses-Coverity-ID: 467404 ("Control flow issues (DEADCODE)")
Signed-off-by: Alexander Gendin <[email protected]>
|
|
Current code allows up to 3 MBR partitions without extended one.
If more than 3 partitions are required, then extended partition(s)
must be used.
This commit allows up to 4 primary MBR partitions without the
need for extended partition.
Add mbr test unit. In order to run the test manually, mmc6.img file
of size 12 MiB or greater is required in the same directory as u-boot.
Test also runs automatically via ./test/py/test.py tool.
Running mbr test is only supported in sandbox mode.
Signed-off-by: Alex Gendin <[email protected]>
[ And due to some further changes for testing ]
Signed-off-by: Simon Glass <[email protected]>
|