upl: Add basic tests

Add some unit tests to check that we can write a UPL handoff and read it
back.

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/upl.h b/include/upl.h
index df644c4..2ec5ef1 100644
--- a/include/upl.h
+++ b/include/upl.h
@@ -309,6 +309,15 @@
  * Return: 0 on success, -ve on error
  */
 int upl_read_handoff(struct upl *upl, oftree tree);
+
+/**
+ * upl_get_test_data() - Fill a UPL with some test data
+ *
+ * @uts: Test state (can be uninited)
+ * @upl: Returns test data
+ * Return: 0 on success, 1 on error
+ */
+int upl_get_test_data(struct unit_test_state *uts, struct upl *upl);
 #endif /* USE_HOSTCC */
 
 #if CONFIG_IS_ENABLED(UPL) && defined(CONFIG_SPL_BUILD)