summaryrefslogtreecommitdiffstats
path: root/external/ffspart/test/tests/16-create-blank
diff options
context:
space:
mode:
authorSamuel Mendoza-Jonas <sam@mendozajonas.com>2018-05-29 14:25:18 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-06-01 02:07:26 -0500
commit5cc781de88032d7e4c5e36399098d54e3cefd126 (patch)
tree4457dbc115756389b30d30afd5dde4a233625d51 /external/ffspart/test/tests/16-create-blank
parent22320e119800dc743ff7ab07a4d9f6e8c0845692 (diff)
downloadtalos-skiboot-5cc781de88032d7e4c5e36399098d54e3cefd126.tar.gz
talos-skiboot-5cc781de88032d7e4c5e36399098d54e3cefd126.zip
ffspart: Don't require user to create blank partitions manually
Add '--allow-empty' which allows the filename for a given partition to be blank. If set ffspart will set that part of the PNOR file 'blank' and set ECC bits if required. Without this option behaviour is unchanged and ffspart will return an error if it can not find the partition file. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'external/ffspart/test/tests/16-create-blank')
-rw-r--r--external/ffspart/test/tests/16-create-blank15
1 files changed, 15 insertions, 0 deletions
diff --git a/external/ffspart/test/tests/16-create-blank b/external/ffspart/test/tests/16-create-blank
new file mode 100644
index 00000000..02640e4e
--- /dev/null
+++ b/external/ffspart/test/tests/16-create-blank
@@ -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 --allow_empty"
+if [ "$?" -ne 0 ] ; then
+ fail_test
+fi
+
+if ! cmp $DATA_DIR/$CUR_TEST.out $DATA_DIR/$CUR_TEST.gen ; then
+ echo "Output differs"
+ fail_test
+fi
+
+pass_test
OpenPOWER on IntegriCloud