diff options
author | Andrew Jeffery <andrew@aj.id.au> | 2018-02-26 10:02:39 +1030 |
---|---|---|
committer | Andrew Jeffery <andrew@aj.id.au> | 2018-03-24 13:59:32 +1030 |
commit | 50ab1de18f52d6b7d5f8b6c5ab79e495d5637f25 (patch) | |
tree | df56199fba9d2ee9064f83b840b5eec02905e428 /test/vpnor/toc_no_end.cpp | |
parent | 437c80f3e156c8f2f8c661944b719d59ad13169f (diff) | |
download | phosphor-mboxd-50ab1de18f52d6b7d5f8b6c5ab79e495d5637f25.tar.gz phosphor-mboxd-50ab1de18f52d6b7d5f8b6c5ab79e495d5637f25.zip |
test: vpnor: Add toc_no_end
Change-Id: I0122a2239df3ec7c83e2bf778d4d8df5a348d495
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'test/vpnor/toc_no_end.cpp')
-rw-r--r-- | test/vpnor/toc_no_end.cpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/vpnor/toc_no_end.cpp b/test/vpnor/toc_no_end.cpp new file mode 100644 index 0000000..0d90b91 --- /dev/null +++ b/test/vpnor/toc_no_end.cpp @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright (C) 2018 IBM Corp. + +#include "config.h" +#include <assert.h> + +#include "pnor_partition_table.hpp" + +static constexpr auto BLOCK_SIZE = 4 * 1024; + +int main() +{ + namespace vpnor = openpower::virtual_pnor; + + struct pnor_partition part; + std::string line; + + line = "partition01=FOO,00001000,,80,ECC,PRESERVED"; + try + { + openpower::virtual_pnor::parseTocLine(line, BLOCK_SIZE, part); + } + catch (vpnor::MalformedTocEntry& e) + { + return 0; + } + + assert(false); +} |