Skip to content

Instantly share code, notes, and snippets.

@sjp38
Created December 24, 2017 08:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save sjp38/bf878043c2f45bb9da72be4d217e465a to your computer and use it in GitHub Desktop.
Save sjp38/bf878043c2f45bb9da72be4d217e465a to your computer and use it in GitHub Desktop.
A patch for SPEC CPU2006. It skips code corruption check for benchmark code modification
diff --git a/bin/formatter/setup_common.pl b/bin/formatter/setup_common.pl
index 36170cda1649..b21890972dbd 100755
--- a/bin/formatter/setup_common.pl
+++ b/bin/formatter/setup_common.pl
@@ -278,13 +278,13 @@ sub check_important_files {
return if ( $::suite_version > 4
&& !$ENV{'SPEC_CHECK'});
$::check_integrity = 1;
- foreach my $important_file (jp('bin', basename($0)),
- grep { m/$re/ } keys %::file_md5) {
- if (!check_files(\%::file_md5, $important_file)) {
- print STDERR "\n\nPart of the tools ($important_file) is corrupt!\nAborting...\n\n";
- exit 1;
- }
- }
+# foreach my $important_file (jp('bin', basename($0)),
+# grep { m/$re/ } keys %::file_md5) {
+# if (!check_files(\%::file_md5, $important_file)) {
+# print STDERR "\n\n Part of the tools ($important_file) is corrupt!\nAborting...\n\n";
+# exit 1;
+# }
+# }
}
1;
diff --git a/bin/setup_common.pl b/bin/setup_common.pl
index 36170cda1649..d9dbe214d498 100755
--- a/bin/setup_common.pl
+++ b/bin/setup_common.pl
@@ -219,9 +219,9 @@ sub md5filedigest {
sub load_module {
my ($module, $quiet) = @_;
- if ($::check_integrity && !check_files(\%::file_md5, jp('bin', $module))) {
- die "\n\nPart of the tools ($module) is corrupt! Aborting...\n\n";
- }
+# if ($::check_integrity && !check_files(\%::file_md5, jp('bin', $module))) {
+# die "\n\nPart of the tools ($module) is corrupt! Aborting...\n\n";
+# }
eval "require \"$module\";";
print '.' unless ($quiet);
if ($@) {
@@ -278,13 +278,13 @@ sub check_important_files {
return if ( $::suite_version > 4
&& !$ENV{'SPEC_CHECK'});
$::check_integrity = 1;
- foreach my $important_file (jp('bin', basename($0)),
- grep { m/$re/ } keys %::file_md5) {
- if (!check_files(\%::file_md5, $important_file)) {
- print STDERR "\n\nPart of the tools ($important_file) is corrupt!\nAborting...\n\n";
- exit 1;
- }
- }
+# foreach my $important_file (jp('bin', basename($0)),
+# grep { m/$re/ } keys %::file_md5) {
+# if (!check_files(\%::file_md5, $important_file)) {
+# print STDERR "\n\nPart of the tools ($important_file) is corrupt!\nAborting...\n\n";
+# exit 1;
+# }
+# }
}
1;
diff --git a/bin/util.pl b/bin/util.pl
index ccf4a72477c0..c8c0cd786522 100755
--- a/bin/util.pl
+++ b/bin/util.pl
@@ -211,11 +211,11 @@ sub copy_tree {
offer_verify_advice();
return 0;
}
- if ($sumhash->{$sf} ne md5filedigest($sf)) {
- Log(0, "\n$sf is corrupt!\n");
- offer_verify_advice();
- return 0;
- }
+# if ($sumhash->{$sf} ne md5filedigest($sf)) {
+# Log(0, "\n$sf is corrupt!\n");
+# offer_verify_advice();
+# return 0;
+# }
}
if ($sf =~ /\.bz2$/) {
copy_bz2_file($sf, $file, [$target], 0);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment