[llvm-commits] [test-suite] r105477 - in /test-suite/trunk/MultiSource/Benchmarks/PAQ8p: paq8p.cpp paq8p.reference_output paq8p.reference_output.small
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Jun 4 12:01:13 PDT 2010
Author: stoklund
Date: Fri Jun 4 14:01:13 2010
New Revision: 105477
URL: http://llvm.org/viewvc/llvm-project?rev=105477&view=rev
Log:
Fix paq8p again...
The benchmark is compressing a file to a temporary file and then decompressing
while comparing to the original. It was using a temporary archive name based on
the input file name, and this caused races whenever make -j decided to run the
llc and nat tests in parallel.
Use basename(input).basename(argv[0]) for the temporary file name, so the
tempfiles will be file1.in.paq8p.nat and file1.in.paq8p.llc while running in
parallel.
Don't print the archive file name in the output at all, and update the reference
outputs to reflect this.
Modified:
test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp
test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output
test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small
Modified: test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp?rev=105477&r1=105476&r2=105477&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp (original)
+++ test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.cpp Fri Jun 4 14:01:13 2010
@@ -4234,6 +4234,10 @@
// To compress to file1.paq8p: paq8p [-n] file1 [file2...]
// To decompress: paq8p file1.paq8p [output_dir]
int paqmain(int argc, char** argv) {
+ // LLVM hack: Use the executable name as a suffix to allow nat and llc tests
+ // to run in parallel.
+ const char *suffix = mybasename(argv[0]);
+
bool pause=argc<=2; // Pause when done?
try {
@@ -4292,17 +4296,17 @@
Mode mode=COMPRESS;
String archiveName(mybasename(argv[1]));
{
- const int prognamesize=strlen(PROGNAME);
+ const int prognamesize=strlen(suffix);
const int arg1size=strlen(argv[1]);
if (arg1size>prognamesize+1 && argv[1][arg1size-prognamesize-1]=='.'
- && equals(PROGNAME, argv[1]+arg1size-prognamesize)) {
+ && equals(suffix, argv[1]+arg1size-prognamesize)) {
mode=DECOMPRESS;
}
else if (doExtract)
mode=DECOMPRESS;
else {
archiveName+=".";
- archiveName+=PROGNAME;
+ archiveName+=suffix;
}
}
@@ -4341,8 +4345,7 @@
if (!archive) perror(archiveName.c_str()), quit();
fprintf(archive, PROGNAME " -%d\r\n%s\x1A",
level, header_string.c_str());
- printf("Creating archive %s with %d file(s)...\n",
- archiveName.c_str(), files);
+ printf("Creating archive with %d file(s)...\n", files);
// Fill fname[files], fsize[files] with input filenames and sizes
fname.resize(files);
@@ -4377,8 +4380,7 @@
// Fill fname[files], fsize[files] with output file names and sizes
while (getline(archive)) ++files; // count files
- printf("Extracting %d file(s) from %s -%d\n", files,
- archiveName.c_str(), level);
+ printf("Extracting %d file(s) from archive -%d\n", files, level);
long header_size=ftell(archive);
filenames.resize(header_size+4); // copy of header
rewind(archive);
@@ -4486,7 +4488,8 @@
argv++;
while(argc && argv[0][0] == '-') {argc--; argv++;}
String archiveName(argv[0]);
- archiveName += "."PROGNAME;
+ archiveName += ".";
+ archiveName += mybasename(deargv[0]);
deargv[2] = strdup(archiveName.c_str());
if (paqmain(3, deargv))
return 1;
Modified: test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output?rev=105477&r1=105476&r2=105477&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output (original)
+++ test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output Fri Jun 4 14:01:13 2010
@@ -1,6 +1,6 @@
-Creating archive file1.in.paq8p with 1 file(s)...
+Creating archive with 1 file(s)...
file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840 1679
36 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048 262144262371
262144 -> 262400
-Extracting 1 file(s) from file1.in.paq8p -4
+Extracting 1 file(s) from archive -4
Comparing file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840
167936 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048identical
exit 0
Modified: test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small
URL: http://llvm.org/viewvc/llvm-project/test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small?rev=105477&r1=105476&r2=105477&view=diff
==============================================================================
--- test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small (original)
+++ test-suite/trunk/MultiSource/Benchmarks/PAQ8p/paq8p.reference_output.small Fri Jun 4 14:01:13 2010
@@ -1,6 +1,6 @@
-Creating archive file1.in.paq8p with 1 file(s)...
+Creating archive with 1 file(s)...
file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840 1679
36 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048 262144262360
262144 -> 262389
-Extracting 1 file(s) from file1.in.paq8p -1
+Extracting 1 file(s) from archive -1
Comparing file1.in 262144 -> 4096 8192 12288 16384 20480 24576 28672 32768 36864 40960 45056 49152 53248 57344 61440 65536 69632 73728 77824 81920 86016 90112 94208 98304 102400 106496 110592 114688 118784 122880 126976 131072 135168 139264 143360 147456 151552 155648 159744 163840
167936 172032 176128 180224 184320 188416 192512 196608 200704 204800 208896 212992 217088 221184 225280 229376 233472 237568 241664 245760 249856 253952 258048identical
exit 0
More information about the llvm-commits
mailing list