binman: Tweak implementation of fmap

Use an interator in two of the fmap tests so it is easier to add new
items. Also check the name first since that is the first indication
that something is wrong. Use a variable for the expected size of the
fmap to avoid repeating the code.

BUG=b:184146709
TEST=binman test

Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I4d3d1192aa2e4792aa83bedb929c27046536fb87
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/u-boot/+/2803413
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
1 file changed