7615a7f
diff --git a/cpio/test/test_extract_cpio_lzo.c b/cpio/test/test_extract_cpio_lzo.c
7615a7f
index f351ba7..99476af 100644
7615a7f
--- a/cpio/test/test_extract_cpio_lzo.c
7615a7f
+++ b/cpio/test/test_extract_cpio_lzo.c
7615a7f
@@ -27,7 +27,7 @@ __FBSDID("$FreeBSD$");
7615a7f
 
7615a7f
 DEFINE_TEST(test_extract_cpio_lzo)
7615a7f
 {
7615a7f
-	const char *reffile = "test_extract.cpio.lrz";
7615a7f
+	const char *reffile = "test_extract.cpio.lzo";
7615a7f
 	int f;
7615a7f
 
7615a7f
 	extract_reference_file(reffile);
7615a7f
diff --git a/libarchive/test/test_write_filter_lzop.c b/libarchive/test/test_write_filter_lzop.c
7615a7f
index 9e840bd..a32932c 100644
7615a7f
--- a/libarchive/test/test_write_filter_lzop.c
7615a7f
+++ b/libarchive/test/test_write_filter_lzop.c
7615a7f
@@ -39,7 +39,7 @@ DEFINE_TEST(test_write_filter_lzop)
7615a7f
 	size_t buffsize, datasize;
7615a7f
 	char path[16];
7615a7f
 	size_t used1, used2;
7615a7f
-	int i, r, use_prog = 0;
7615a7f
+	int i, r, use_prog = 0, filecount;
7615a7f
 
7615a7f
 	assert((a = archive_write_new()) != NULL);
7615a7f
 	r = archive_write_add_filter_lzop(a);
7615a7f
@@ -58,9 +58,10 @@ DEFINE_TEST(test_write_filter_lzop)
7615a7f
 
7615a7f
 	datasize = 10000;
7615a7f
 	assert(NULL != (data = (char *)calloc(1, datasize)));
7615a7f
+	filecount = 10;
7615a7f
 
7615a7f
 	/*
7615a7f
-	 * Write a 100 files and read them all back.
7615a7f
+	 * Write a filecount files and read them all back.
7615a7f
 	 */
7615a7f
 	assert((a = archive_write_new()) != NULL);
7615a7f
 	assertEqualIntA(a, ARCHIVE_OK, archive_write_set_format_ustar(a));
7615a7f
@@ -77,7 +78,7 @@ DEFINE_TEST(test_write_filter_lzop)
7615a7f
 	assert((ae = archive_entry_new()) != NULL);
7615a7f
 	archive_entry_set_filetype(ae, AE_IFREG);
7615a7f
 	archive_entry_set_size(ae, datasize);
7615a7f
-	for (i = 0; i < 100; i++) {
7615a7f
+	for (i = 0; i < filecount; i++) {
7615a7f
 		sprintf(path, "file%03d", i);
7615a7f
 		archive_entry_copy_pathname(ae, path);
7615a7f
 		assertEqualIntA(a, ARCHIVE_OK, archive_write_header(a, ae));
7615a7f
@@ -97,7 +98,7 @@ DEFINE_TEST(test_write_filter_lzop)
7615a7f
 	} else {
7615a7f
 		assertEqualIntA(a, ARCHIVE_OK,
7615a7f
 		    archive_read_open_memory(a, buff, used1));
7615a7f
-		for (i = 0; i < 100; i++) {
7615a7f
+		for (i = 0; i < filecount; i++) {
7615a7f
 			sprintf(path, "file%03d", i);
7615a7f
 			if (!assertEqualInt(ARCHIVE_OK,
7615a7f
 				archive_read_next_header(a, &ae)))
7615a7f
@@ -133,7 +134,7 @@ DEFINE_TEST(test_write_filter_lzop)
7615a7f
 	    archive_write_set_options(a, "lzop:compression-level=9"));
7615a7f
 	assertEqualIntA(a, ARCHIVE_OK,
7615a7f
 	    archive_write_open_memory(a, buff, buffsize, &used2));
7615a7f
-	for (i = 0; i < 100; i++) {
7615a7f
+	for (i = 0; i < filecount; i++) {
7615a7f
 		sprintf(path, "file%03d", i);
7615a7f
 		assert((ae = archive_entry_new()) != NULL);
7615a7f
 		archive_entry_copy_pathname(ae, path);
7615a7f
@@ -161,7 +162,7 @@ DEFINE_TEST(test_write_filter_lzop)
7615a7f
 		    archive_read_support_filter_all(a));
7615a7f
 		assertEqualIntA(a, ARCHIVE_OK,
7615a7f
 		    archive_read_open_memory(a, buff, used2));
7615a7f
-		for (i = 0; i < 100; i++) {
7615a7f
+		for (i = 0; i < filecount; i++) {
7615a7f
 			sprintf(path, "file%03d", i);
7615a7f
 			if (!assertEqualInt(ARCHIVE_OK,
7615a7f
 				archive_read_next_header(a, &ae)))
7615a7f
@@ -186,7 +187,7 @@ DEFINE_TEST(test_write_filter_lzop)
7615a7f
 	    archive_write_set_filter_option(a, NULL, "compression-level", "1"));
7615a7f
 	assertEqualIntA(a, ARCHIVE_OK,
7615a7f
 	    archive_write_open_memory(a, buff, buffsize, &used2));
7615a7f
-	for (i = 0; i < 100; i++) {
7615a7f
+	for (i = 0; i < filecount; i++) {
7615a7f
 		sprintf(path, "file%03d", i);
7615a7f
 		assert((ae = archive_entry_new()) != NULL);
7615a7f
 		archive_entry_copy_pathname(ae, path);
7615a7f
@@ -216,7 +217,7 @@ DEFINE_TEST(test_write_filter_lzop)
7615a7f
 	} else {
7615a7f
 		assertEqualIntA(a, ARCHIVE_OK,
7615a7f
 		    archive_read_open_memory(a, buff, used2));
7615a7f
-		for (i = 0; i < 100; i++) {
7615a7f
+		for (i = 0; i < filecount; i++) {
7615a7f
 			sprintf(path, "file%03d", i);
7615a7f
 			if (!assertEqualInt(ARCHIVE_OK,
7615a7f
 				archive_read_next_header(a, &ae)))
7615a7f
diff --git a/tar/test/test_option_b.c b/tar/test/test_option_b.c
7615a7f
index be2ae65..7164d4c 100644
7615a7f
--- a/tar/test/test_option_b.c
7615a7f
+++ b/tar/test/test_option_b.c
7615a7f
@@ -25,8 +25,14 @@
7615a7f
 #include "test.h"
7615a7f
 __FBSDID("$FreeBSD$");
7615a7f
 
7615a7f
+static char *ustar_opt = " --format=ustar";
7615a7f
+
7615a7f
 DEFINE_TEST(test_option_b)
7615a7f
 {
7615a7f
+	char *testprog_ustar = malloc(strlen(testprog) + strlen(ustar_opt) + 2);
7615a7f
+	strcpy(testprog_ustar, testprog);
7615a7f
+	strcat(testprog_ustar, ustar_opt);
7615a7f
+
7615a7f
 	assertMakeFile("file1", 0644, "file1");
7615a7f
 	if (systemf("cat file1 > test_cat.out 2> test_cat.err") != 0) {
7615a7f
 		skipping("Platform doesn't have cat");
7615a7f
@@ -36,7 +42,7 @@ DEFINE_TEST(test_option_b)
7615a7f
 	/*
7615a7f
 	 * Bsdtar does not pad if the output is going directly to a disk file.
7615a7f
 	 */
7615a7f
-	assertEqualInt(0, systemf("%s -cf archive1.tar file1 >test1.out 2>test1.err", testprog));
7615a7f
+	assertEqualInt(0, systemf("%s -cf archive1.tar file1 >test1.out 2>test1.err", testprog_ustar));
7615a7f
 	failure("bsdtar does not pad archives written directly to regular files");
7615a7f
 	assertFileSize("archive1.tar", 2048);
7615a7f
 	assertEmptyFile("test1.out");
7615a7f
@@ -46,24 +52,24 @@ DEFINE_TEST(test_option_b)
7615a7f
 	 * Bsdtar does pad to the block size if the output is going to a socket.
7615a7f
 	 */
7615a7f
 	/* Default is -b 20 */
7615a7f
-	assertEqualInt(0, systemf("%s -cf - file1 2>test2.err | cat >archive2.tar ", testprog));
7615a7f
+	assertEqualInt(0, systemf("%s -cf - file1 2>test2.err | cat >archive2.tar ", testprog_ustar));
7615a7f
 	failure("bsdtar does pad archives written to pipes");
7615a7f
 	assertFileSize("archive2.tar", 10240);
7615a7f
 	assertEmptyFile("test2.err");
7615a7f
 
7615a7f
-	assertEqualInt(0, systemf("%s -cf - -b 20 file1 2>test3.err | cat >archive3.tar ", testprog));
7615a7f
+	assertEqualInt(0, systemf("%s -cf - -b 20 file1 2>test3.err | cat >archive3.tar ", testprog_ustar));
7615a7f
 	assertFileSize("archive3.tar", 10240);
7615a7f
 	assertEmptyFile("test3.err");
7615a7f
 
7615a7f
-	assertEqualInt(0, systemf("%s -cf - -b 10 file1 2>test4.err | cat >archive4.tar ", testprog));
7615a7f
+	assertEqualInt(0, systemf("%s -cf - -b 10 file1 2>test4.err | cat >archive4.tar ", testprog_ustar));
7615a7f
 	assertFileSize("archive4.tar", 5120);
7615a7f
 	assertEmptyFile("test4.err");
7615a7f
 
7615a7f
-	assertEqualInt(0, systemf("%s -cf - -b 1 file1 2>test5.err | cat >archive5.tar ", testprog));
7615a7f
+	assertEqualInt(0, systemf("%s -cf - -b 1 file1 2>test5.err | cat >archive5.tar ", testprog_ustar));
7615a7f
 	assertFileSize("archive5.tar", 2048);
7615a7f
 	assertEmptyFile("test5.err");
7615a7f
 
7615a7f
-	assertEqualInt(0, systemf("%s -cf - -b 8192 file1 2>test6.err | cat >archive6.tar ", testprog));
7615a7f
+	assertEqualInt(0, systemf("%s -cf - -b 8192 file1 2>test6.err | cat >archive6.tar ", testprog_ustar));
7615a7f
 	assertFileSize("archive6.tar", 4194304);
7615a7f
 	assertEmptyFile("test6.err");
7615a7f