ipmi: promote min length check to earlier

Most of the commands (if not all) require some minimum length for the
request.  Therefore, to save on duplicating the request minimum length
check in every command, it's now checked ahead of calling into the
command handler.

Change-Id: I3710a6bf39a631b06547327b90610a38cb674d23
Signed-off-by: Patrick Venture <venture@google.com>
diff --git a/test/Makefile.am b/test/Makefile.am
index d9fd289..9df14db 100644
--- a/test/Makefile.am
+++ b/test/Makefile.am
@@ -11,7 +11,8 @@
 # Run all 'check' test programs
 check_PROGRAMS = \
 	ipmi_starttransfer_unittest \
-	ipmi_flashdata_unittest
+	ipmi_flashdata_unittest \
+	ipmi_validate_unittest
 
 TESTS = $(check_PROGRAMS)
 
@@ -20,3 +21,6 @@
 
 ipmi_flashdata_unittest_SOURCES = ipmi_flashdata_unittest.cpp
 ipmi_flashdata_unittest_LDADD = $(top_builddir)/ipmi.o
+
+ipmi_validate_unittest_SOURCES = ipmi_validate_unittest.cpp
+ipmi_validate_unittest_LDADD = $(top_builddir)/ipmi.o