summaryrefslogtreecommitdiffstats
path: root/test/vpnor/toc_no_name.cpp
diff options
context:
space:
mode:
authorAndrew Jeffery <andrew@aj.id.au>2018-02-26 09:57:17 +1030
committerAndrew Jeffery <andrew@aj.id.au>2018-03-24 13:59:32 +1030
commitb02ef4340b59ba0ddcfd1d258a328feb1888c64a (patch)
treee9602f80c6be9a8dfed764e970fce229dc2154c0 /test/vpnor/toc_no_name.cpp
parent8de4c13628e992ef3210820ffb69daafaf762a6b (diff)
downloadphosphor-mboxd-b02ef4340b59ba0ddcfd1d258a328feb1888c64a.tar.gz
phosphor-mboxd-b02ef4340b59ba0ddcfd1d258a328feb1888c64a.zip
test: vpnor: Add toc_no_name
Change-Id: I30325d8dbee300fc93911a7e9e2650fc592a7055 Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Diffstat (limited to 'test/vpnor/toc_no_name.cpp')
-rw-r--r--test/vpnor/toc_no_name.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/vpnor/toc_no_name.cpp b/test/vpnor/toc_no_name.cpp
new file mode 100644
index 0000000..06dea8c
--- /dev/null
+++ b/test/vpnor/toc_no_name.cpp
@@ -0,0 +1,28 @@
+// 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;
+
+ const std::string line = "partition01=,00000000,00000400,80,ECC,PRESERVED";
+ struct pnor_partition part;
+
+ try
+ {
+ vpnor::parseTocLine(line, BLOCK_SIZE, part);
+ }
+ catch (vpnor::MalformedTocEntry& e)
+ {
+ return 0;
+ }
+
+ assert(false);
+}
OpenPOWER on IntegriCloud