diff options
| author | Simon Glass <[email protected]> | 2024-09-01 16:26:31 -0600 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2024-09-18 13:01:00 -0600 |
| commit | 705cc13ce7a81111b93a11cfff1763e11586f33e (patch) | |
| tree | 430483fd64799855ec61e0de10a0828ea9f7ec27 /test/cmd | |
| parent | 7086a894f091cb8ed03b519ed64c6117a704fe90 (diff) | |
test: mbr: Unmap the buffers after use
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...")
Diffstat (limited to 'test/cmd')
| -rw-r--r-- | test/cmd/mbr.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/cmd/mbr.c b/test/cmd/mbr.c index c38199740a3..e750875ea43 100644 --- a/test/cmd/mbr.c +++ b/test/cmd/mbr.c @@ -456,6 +456,9 @@ static int mbr_test_run(struct unit_test_state *uts) "5P EBR+0x%04X: expected %#02X, actual: %#02X\n", ebr_cmp_start + i, ebr_parts_ref_p5[i], rbuf[ebr_cmp_start + i]); } + unmap_sysmem(mbr_wbuf); + unmap_sysmem(ebr_wbuf); + unmap_sysmem(rbuf); return 0; } |
