diff -Nru phoronix-test-suite.orig/pts/test-resources/memory-bandwidth/install.sh phoronix-test-suite/pts/test-resources/memory-bandwidth/install.sh
--- phoronix-test-suite.orig/pts/test-resources/memory-bandwidth/install.sh	2008-05-16 09:57:50.000000000 +0200
+++ phoronix-test-suite/pts/test-resources/memory-bandwidth/install.sh	2008-05-16 12:10:31.000000000 +0200
@@ -2,35 +2,119 @@
 
 cd $1
 
+rm -rf bandwidth-0.13/
+
 tar -xvf bandwidth-0.13.tar.gz
 
-echo "#!/bin/sh
+rm -f memory-bandwidth
 
-if [ ! -f \$THIS_RUN_TIME.result ]
-  then
-	rm -f *.result
-	./bandwidth > \$THIS_RUN_TIME.result
-fi
+echo "#!/bin/sh
 
 case \"\$1\" in
 \"TEST_L2READ\")
-	cat \$THIS_RUN_TIME.result | grep \"L2 cache sequential read\"
+	./bandwidth -l2read | grep \"L2 cache sequential read\"
 	;;
 \"TEST_L2WRITE\")
-	cat \$THIS_RUN_TIME.result | grep \"L2 cache sequential write\"
+	./bandwidth -l2write | grep \"L2 cache sequential write\"
 	;;
 \"TEST_READ\")
-	cat \$THIS_RUN_TIME.result | grep \"Main memory sequential read\"
+	./bandwidth -read | grep \"Main memory sequential read\"
 	;;
 \"TEST_WRITE\")
-	cat \$THIS_RUN_TIME.result | grep \"Main memory sequential write\"
+	./bandwidth -write | grep \"Main memory sequential write\"
 	;;
 esac
 " > memory-bandwidth
 chmod +x memory-bandwidth
 
-
 cd bandwidth-0.13/
+patch -p1 <<'EOT'
+--- bandwidth-0.13/main.c	2007-08-13 02:36:55.000000000 +0200
++++ bandwidth-0.13-patched/main.c	2008-04-07 03:23:59.000000000 +0200
+@@ -403,9 +403,52 @@
+ 	free(a2);
+ }
+ 
++void usage(char *argv0)
++{
++	printf ("usage: %s -l2read -l2write -read -write -fb -library\n"
++		"or: %s -all\n"
++		"will run the specified test(s), or all of them\n",
++		argv0, argv0);
++}
+ 
+-main()
++int main(int argc, char **argv)
+ {
++	char *argv0 = argv[0] ? argv[0] : "bandwidth";
++	int do_l2_seq_read = 0,
++	    do_l2_seq_write = 0,
++	    do_main_seq_read = 0,
++	    do_main_seq_write = 0,
++	    do_fb_readwrite = 0,
++	    do_library_test = 0,
++	    do_all_tests = 0;
++
++	if (argc <= 1) {
++		usage(argv0);
++		exit(1);
++	}
++	while (argc > 1) {
++		if (!strcmp(argv[1], "-all"))
++			do_all_tests = 1;
++		else if (!strcmp(argv[1], "-l2read"))
++			do_l2_seq_read = 1;
++		else if (!strcmp(argv[1], "-l2write"))
++			do_l2_seq_write = 1;
++		else if (!strcmp(argv[1], "-read"))
++			do_main_seq_read = 1;
++		else if (!strcmp(argv[1], "-write"))
++			do_main_seq_write = 1;
++		else if (!strcmp(argv[1], "-fb"))
++			do_fb_readwrite = 1;
++		else if (!strcmp(argv[1], "-library"))
++			do_library_test = 1;
++		else {
++			usage(argv0);
++			exit(1);
++		}
++		--argc;
++		++argv;
++	}
++
+ 	printf ("This is bandwidth version %s\n", VERSION);
+ 	printf ("Copyright (C) 2005,2007 by Zack T Smith\n\n");
+ 
+@@ -414,15 +457,21 @@
+ 	system ("grep MHz /proc/cpuinfo | uniq | sed \"s/[\\t\\n: a-zA-Z]//g\"");
+ 	fflush (stdout);
+ 
+-	l2_seq_read ();
+-	l2_seq_write ();
+-
+-	main_seq_read ();
+-	main_seq_write ();
++	if(do_l2_seq_read || do_all_tests)
++		l2_seq_read ();
++	if(do_l2_seq_write || do_all_tests)
++		l2_seq_write ();
++
++	if(do_main_seq_read || do_all_tests)
++		main_seq_read ();
++	if(do_main_seq_write || do_all_tests)
++		main_seq_write ();
+ 
+-	fb_readwrite();
++	if(do_fb_readwrite || do_all_tests)
++		fb_readwrite();
+ 
+-	library_test();
++	if(do_library_test || do_all_tests)
++		library_test();
+ 
+ 	return 0;
+ }
+
+EOT
 make
 ln bandwidth ../
-
