helpers: add file creation with pattern

Signed-off-by: Jens Axboe <[email protected]>
diff --git a/test/helpers.c b/test/helpers.c
index 975e7cb..491822e 100644
--- a/test/helpers.c
+++ b/test/helpers.c
@@ -49,14 +49,14 @@
 /*
  * Helper for creating file and write @size byte buf with 0xaa value in the file.
  */
-void t_create_file(const char *file, size_t size)
+static void __t_create_file(const char *file, size_t size, char pattern)
 {
 	ssize_t ret;
 	char *buf;
 	int fd; 
 
 	buf = t_malloc(size);
-	memset(buf, 0xaa, size);
+	memset(buf, pattern, size);
 
 	fd = open(file, O_WRONLY | O_CREAT, 0644);
 	assert(fd >= 0);
@@ -68,6 +68,16 @@
 	assert(ret == size);
 }
 
+void t_create_file(const char *file, size_t size)
+{
+	__t_create_file(file, size, 0xaa);
+}
+
+void t_create_file_pattern(const char *file, size_t size, char pattern)
+{
+	__t_create_file(file, size, pattern);
+}
+
 /*
  * Helper for creating @buf_num number of iovec
  * with @buf_size bytes buffer of each iovec.