Skip to content

Commit

Permalink
ffspart: Add toc test
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
shenki authored and stewartsmith committed Nov 29, 2018
1 parent e1a8469 commit 35e735a
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions external/ffspart/test/files/17-toc.in
Original file line number Diff line number Diff line change
@@ -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
Binary file added external/ffspart/test/files/17-toc.out
Binary file not shown.
15 changes: 15 additions & 0 deletions external/ffspart/test/tests/17-toc
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 35e735a

Please sign in to comment.