From: Jani Nikula Date: Wed, 16 Oct 2013 19:00:13 +0000 (+0300) Subject: [PATCH 6/6] HACK: fix broken messages in the perf test corpus X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=9a6eea4df0a17c1a4f81a204f47d53ea9568a7bd;p=notmuch-archives.git [PATCH 6/6] HACK: fix broken messages in the perf test corpus --- diff --git a/d6/93cdaeb566a24ead602d111c83fd6af719b427 b/d6/93cdaeb566a24ead602d111c83fd6af719b427 new file mode 100644 index 000000000..465903e9e --- /dev/null +++ b/d6/93cdaeb566a24ead602d111c83fd6af719b427 @@ -0,0 +1,105 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by olra.theworths.org (Postfix) with ESMTP id 57A6A431FCF + for ; Wed, 16 Oct 2013 12:01:13 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at olra.theworths.org +X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" +X-Spam-Flag: NO +X-Spam-Score: -0.7 +X-Spam-Level: +X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5 + tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled +Received: from olra.theworths.org ([127.0.0.1]) + by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id eW5yNjIWkJ2Y for ; + Wed, 16 Oct 2013 12:01:08 -0700 (PDT) +Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com + [74.125.83.45]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client + certificate requested) by olra.theworths.org (Postfix) with ESMTPS id + E3236431FDB for ; Wed, 16 Oct 2013 12:00:35 -0700 + (PDT) +Received: by mail-ee0-f45.google.com with SMTP id c50so579835eek.32 + for ; Wed, 16 Oct 2013 12:00:34 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to + :references:in-reply-to:references; + bh=NwfZdhRBcffrWLgeWk1mDpb0/rOnoSbFuhU1rN3mvTk=; + b=WMfhVWktN5FHBEOmLvnVoaA//sUWmeYdN+4dXBGJGdz3+yfk88Id3eJgly/EzrBwC8 + CxIGgHpEf4ct1c9WaHoiSpglEr0wn6ITcfGb4Dy+rg+j9N0+JY42WSU/+Y7ORfMon5pu + 7OCa5ODjBobA0m6Ym7dcdWJQQS1jfFhZNZvWW26KlK7VBq1PUB9Z04ZYdTYjp6AMaMnp + 19YvcfP/x+itJA87BVP2S1yrICh+1MN2av/0PpOjI0F5Lo9wJODo3SfYyLwGbgVp9hBF + AqMIkkX//QHtyFPyloGpyIaOsr/y0dpda1411ZF49HiDuewYYm5sdSfrp4w1WhO9d2yi + TjMQ== +X-Gm-Message-State: + ALoCoQmNGlWhFQJzAFVB2pSFF7+dEWXKuG6sZe96WmkMy3Y7NBZ6FhViFuR9WBwd4t+07AFvgm25 +X-Received: by 10.15.56.72 with SMTP id x48mr6113931eew.62.1381950034797; + Wed, 16 Oct 2013 12:00:34 -0700 (PDT) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) by mx.google.com with ESMTPSA id + k7sm182973893eeg.13.1969.12.31.16.00.00 + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Wed, 16 Oct 2013 12:00:34 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH 6/6] HACK: fix broken messages in the perf test corpus +Date: Wed, 16 Oct 2013 22:00:13 +0300 +Message-Id: + +X-Mailer: git-send-email 1.8.4.rc3 +In-Reply-To: +References: +In-Reply-To: +References: +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.13 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Wed, 16 Oct 2013 19:01:13 -0000 + +The gmime header parser rejects a lot of messages in the perf test +corpus which have this in the middle of headers: + +Microsoft Mail Internet Headers Version 2.0 + +The header parsing stops right there. This illustrates a change in the +parsing. The message is clearly broken, but previously notmuch +accepted it anyway. + +This patch "fixes" the messages in the perf test corpus to be able to +do fair comparisons of the parsers. + +NOT TO BE MERGED, if that isn't obvious. This is just a quick hack. +--- + performance-test/perf-test-lib.sh | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/performance-test/perf-test-lib.sh b/performance-test/perf-test-lib.sh +index 9ee7661..caec0d0 100644 +--- a/performance-test/perf-test-lib.sh ++++ b/performance-test/perf-test-lib.sh +@@ -84,7 +84,11 @@ add_email_corpus () + "${args[@]}" + + printf "\n" ++ printf "Fix broken messages in corpus..." + ++ find "${TEST_DIRECTORY}/corpus" -type f -print0 | xargs -0 sed -i -e 's/^Microsoft Mail Internet Headers Version 2\.0/X-Crap: &/' ++ ++ printf "\n" + fi + + cp -lr $TAG_CORPUS $TMP_DIRECTORY/corpus.tags +-- +1.8.4.rc3 +