[Skiboot] [PATCH 1/2] ffspart: Add toc test

Joel Stanley joel at jms.id.au
Thu Nov 29 11:01:53 AEDT 2018


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 at jms.id.au>
---
 external/ffspart/test/files/17-toc.in  |   5 +++++
 external/ffspart/test/files/17-toc.out | Bin 0 -> 2560 bytes
 external/ffspart/test/tests/17-toc     |  15 +++++++++++++++
 3 files changed, 20 insertions(+)
 create mode 100644 external/ffspart/test/files/17-toc.in
 create mode 100644 external/ffspart/test/files/17-toc.out
 create mode 100644 external/ffspart/test/tests/17-toc

diff --git a/external/ffspart/test/files/17-toc.in b/external/ffspart/test/files/17-toc.in
new file mode 100644
index 000000000000..6020e0fe2905
--- /dev/null
+++ b/external/ffspart/test/files/17-toc.in
@@ -0,0 +1,5 @@
+ at 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 0000000000000000000000000000000000000000..e00fa5c0ed65090888945e913e264ae73c7d64cc
GIT binary patch
literal 2560
zcmWG=3<_ajU|<AdW*}|=Vpa&3feXk+0RfJ|HwzMrN>BtL9OnN(0A#|<0n#Ajs0;e%
z^>zFExuP4&0u*3`+Rp at HLli(M6x9u2526T>z%kfp{WB!oA6*A9yx{hOJdM|W1_5;K
z#Pe70F#H+f5#)*%0&Gb3gTn%1B6j~%V*k74Iy>C_Lxa#<%#LI~I4o#o|IP*4>p}56
X3PwX<Gz3ONU^E0qLtr!nC<_4q|HpMy

literal 0
HcmV?d00001

diff --git a/external/ffspart/test/tests/17-toc b/external/ffspart/test/tests/17-toc
new file mode 100644
index 000000000000..e7783394be33
--- /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
-- 
2.19.1



More information about the Skiboot mailing list