Add test_suite_entropy
diff --git a/tests/.gitignore b/tests/.gitignore
index a83ad32..6590f0f 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -3,3 +3,4 @@
 data_files/mpi_write
 data_files/hmac_drbg_seed
 data_files/ctr_drbg_seed
+data_files/entropy_seed
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index bc40eb1..44904fa 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -61,6 +61,7 @@
 add_test_suite(ecp)
 add_test_suite(ecdh)
 add_test_suite(ecdsa)
+add_test_suite(entropy)
 add_test_suite(error)
 add_test_suite(gcm gcm.aes128_en)
 add_test_suite(gcm gcm.aes192_en)
diff --git a/tests/Makefile b/tests/Makefile
index dd9f205..c37b790 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -46,7 +46,7 @@
 		test_suite_des			test_suite_dhm			\
 		test_suite_ecdh			test_suite_ecdsa		\
 		test_suite_ecp									\
-		test_suite_error								\
+		test_suite_error		test_suite_entropy		\
 		test_suite_gcm.aes128_de						\
 		test_suite_gcm.aes192_de						\
 		test_suite_gcm.aes256_de						\
@@ -272,6 +272,10 @@
 	echo   "  CC    	$@.c"
 	$(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@
 
+test_suite_entropy: test_suite_entropy.c $(DEP)
+	echo   "  CC    	$@.c"
+	$(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@
+
 test_suite_error: test_suite_error.c $(DEP)
 	echo   "  CC    	$@.c"
 	$(CC) $(CFLAGS) $(OFLAGS) $@.c	$(LDFLAGS) -o $@
diff --git a/tests/suites/test_suite_entropy.data b/tests/suites/test_suite_entropy.data
new file mode 100644
index 0000000..5a43ffd
--- /dev/null
+++ b/tests/suites/test_suite_entropy.data
@@ -0,0 +1,8 @@
+Entropy write/update seed file
+entropy_seed_file:"data_files/entropy_seed":0
+
+Entropy write/update seed file
+entropy_seed_file:"no_such_dir/file":POLARSSL_ERR_ENTROPY_FILE_IO_ERROR
+
+Entropy self test
+entropy_selftest:
diff --git a/tests/suites/test_suite_entropy.function b/tests/suites/test_suite_entropy.function
new file mode 100644
index 0000000..31286ba
--- /dev/null
+++ b/tests/suites/test_suite_entropy.function
@@ -0,0 +1,29 @@
+/* BEGIN_HEADER */
+#include <polarssl/entropy.h>
+/* END_HEADER */
+
+/* BEGIN_DEPENDENCIES
+ * depends_on:POLARSSL_ENTROPY_C
+ * END_DEPENDENCIES
+ */
+
+/* BEGIN_CASE depends_on:POLARSSL_FS_IO */
+void entropy_seed_file( char *path, int ret )
+{
+    entropy_context ctx;
+
+    entropy_init( &ctx );
+
+    TEST_ASSERT( entropy_write_seed_file( &ctx, path ) == ret );
+    TEST_ASSERT( entropy_update_seed_file( &ctx, path ) == ret );
+
+    entropy_free( &ctx );
+}
+/* END_CASE */
+
+/* BEGIN_CASE depends_on:POLARSSL_SELF_TEST */
+void entropy_selftest( )
+{
+    TEST_ASSERT( entropy_self_test( 0 ) == 0 );
+}
+/* END_CASE */