From 6a98e18394fa529c281a28175494423fec920ffb Mon Sep 17 00:00:00 2001 From: Ratan Gupta Date: Tue, 6 Jun 2017 15:04:23 +0530 Subject: Read the partition file from the vpnor. This fix reads the file from the partition, Memory map to it and then copy the asked memory area to the reserved memory area. Change-Id: I4b2987e628bc4820edfeb1b0a81e5d1cbb8e7cf1 Signed-off-by: Ratan Gupta --- test/create_read_window_vpnor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/create_read_window_vpnor.cpp b/test/create_read_window_vpnor.cpp index 8121498..d9bcccc 100644 --- a/test/create_read_window_vpnor.cpp +++ b/test/create_read_window_vpnor.cpp @@ -13,7 +13,7 @@ extern "C" { #include #include -constexpr auto line = "partition01=HBB,00000000,00000400,ECC,PRESERVED"; +constexpr auto line = "partition01=HBB,00000000,0001000,ECC,PRESERVED"; constexpr auto partition = "HBB"; char tmplt[] = "/tmp/create_read_test.XXXXXX"; uint8_t data[8] = { 0xaa, 0x55, 0xaa, 0x66, 0x77, 0x88, 0x99, 0xab }; @@ -86,6 +86,10 @@ int main() rc = memcmp(ctx->mem, data, 6); assert(rc == 0); + //TODO: Add few more test cases for read from multiple partitions(PRSV/RW) + // Read beyond the partition file size. + // openbmc/openbmc#1868 + fs::remove_all(fs::path{tmpdir}); return rc; } -- cgit v1.2.1