summaryrefslogtreecommitdiffstats
path: root/external
diff options
context:
space:
mode:
authorJoel Stanley <joel@jms.id.au>2018-11-29 10:31:53 +1030
committerStewart Smith <stewart@linux.ibm.com>2018-11-28 20:17:26 -0600
commit35e735ae24ebb3c49b96b4824c0ff9a46301e9b7 (patch)
treee917da6b3197b5fe287b5cdc3944d236180f53aa /external
parente1a8469a208c7f8357aa7ca8454ab691b62bf60b (diff)
downloadblackbird-skiboot-35e735ae24ebb3c49b96b4824c0ff9a46301e9b7.tar.gz
blackbird-skiboot-35e735ae24ebb3c49b96b4824c0ff9a46301e9b7.zip
ffspart: Add toc test
This test specifies a toc in the configuration file. There are no tests or documentation for the toc syntax, so this exists to describe how specify a toc. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'external')
-rw-r--r--external/ffspart/test/files/17-toc.in5
-rw-r--r--external/ffspart/test/files/17-toc.outbin0 -> 2560 bytes
-rw-r--r--external/ffspart/test/tests/17-toc15
3 files changed, 20 insertions, 0 deletions
diff --git a/external/ffspart/test/files/17-toc.in b/external/ffspart/test/files/17-toc.in
new file mode 100644
index 00000000..6020e0fe
--- /dev/null
+++ b/external/ffspart/test/files/17-toc.in
@@ -0,0 +1,5 @@
+@0,0x0,
+ONE,0x00400,0x00000100,EL,,/dev/zero
+TWO,0x00500,0x00000100,EF,,/dev/zero
+THREE,0x600,0x00000100,EF,,/dev/zero
+FOUR,0x0700,0x00000100,EF,,/dev/zero
diff --git a/external/ffspart/test/files/17-toc.out b/external/ffspart/test/files/17-toc.out
new file mode 100644
index 00000000..e00fa5c0
--- /dev/null
+++ b/external/ffspart/test/files/17-toc.out
Binary files differ
diff --git a/external/ffspart/test/tests/17-toc b/external/ffspart/test/tests/17-toc
new file mode 100644
index 00000000..e7783394
--- /dev/null
+++ b/external/ffspart/test/tests/17-toc
@@ -0,0 +1,15 @@
+#! /bin/sh
+
+touch $DATA_DIR/$CUR_TEST.gen
+
+run_binary "./ffspart" "-s 0x100 -c 10 -i $DATA_DIR/$CUR_TEST.in -p $DATA_DIR/$CUR_TEST.gen"
+if [ "$?" -ne 0 ] ; then
+ fail_test
+fi
+
+if ! cmp -n $((0x100)) $DATA_DIR/$CUR_TEST.out $DATA_DIR/$CUR_TEST.gen ; then
+ echo "Output differs"
+ fail_test
+fi
+
+pass_test
OpenPOWER on IntegriCloud