aboutsummaryrefslogtreecommitdiffstats
path: root/roms/skiboot/external/pflash/test/tests/06-miscprint
diff options
context:
space:
mode:
Diffstat (limited to 'roms/skiboot/external/pflash/test/tests/06-miscprint')
-rw-r--r--roms/skiboot/external/pflash/test/tests/06-miscprint46
1 files changed, 46 insertions, 0 deletions
diff --git a/roms/skiboot/external/pflash/test/tests/06-miscprint b/roms/skiboot/external/pflash/test/tests/06-miscprint
new file mode 100644
index 000000000..bee84afc5
--- /dev/null
+++ b/roms/skiboot/external/pflash/test/tests/06-miscprint
@@ -0,0 +1,46 @@
+#! /bin/sh
+# SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
+
+touch "$DATA_DIR/$CUR_TEST.pnor"
+
+# Don't record the output of ffspart
+../ffspart/ffspart -s 0x1000 -c 10 -i "$DATA_DIR/$CUR_TEST.ffs" \
+ -p "$DATA_DIR/$CUR_TEST.pnor" 2>&1 >/dev/null
+if [ "$?" -ne 0 ] ; then
+ fail_test
+fi
+
+run_binary "./pflash" "--detail=1 -F $DATA_DIR/$CUR_TEST.pnor"
+if [ "$?" -ne 0 ] ; then
+ fail_test;
+fi
+run_binary "./pflash" "--detail=2 -F $DATA_DIR/$CUR_TEST.pnor"
+if [ "$?" -ne 0 ] ; then
+ fail_test;
+fi
+run_binary "./pflash" "--detail=3 -F $DATA_DIR/$CUR_TEST.pnor"
+if [ "$?" -ne 0 ] ; then
+ fail_test;
+fi
+run_binary "./pflash" "--detail=4 -F $DATA_DIR/$CUR_TEST.pnor"
+if [ "$?" -ne 0 ] ; then
+ fail_test;
+fi
+run_binary "./pflash" "--detail=5 -F $DATA_DIR/$CUR_TEST.pnor"
+if [ "$?" -ne 0 ] ; then
+ fail_test;
+fi
+run_binary "./pflash" "--detail=6 -F $DATA_DIR/$CUR_TEST.pnor"
+if [ "$?" -ne 0 ] ; then
+ fail_test;
+fi
+
+# The test infrastructure will clean up but lets no chew unnecessarily
+# though disk space
+rm "$DATA_DIR/$CUR_TEST.pnor"
+
+strip_version_from_result "pflash"
+
+diff_with_result
+
+pass_test