From a4d4f988598a33c9084db8fd7e0fbb3897fbfaf4 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Sat, 30 Nov 2013 17:33:56 +0200 Subject: [PATCH] [PATCH v2 7/7] HACK: fix broken messages in the perf test corpus --- 5d/767e99e8bcb58b1c7f76b7695a6b16d16d79f3 | 106 ++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 5d/767e99e8bcb58b1c7f76b7695a6b16d16d79f3 diff --git a/5d/767e99e8bcb58b1c7f76b7695a6b16d16d79f3 b/5d/767e99e8bcb58b1c7f76b7695a6b16d16d79f3 new file mode 100644 index 000000000..eae2fe892 --- /dev/null +++ b/5d/767e99e8bcb58b1c7f76b7695a6b16d16d79f3 @@ -0,0 +1,106 @@ +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 7532F429E2F + for ; Sat, 30 Nov 2013 07:35:01 -0800 (PST) +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 bdY8qTgqjAZf for ; + Sat, 30 Nov 2013 07:34:55 -0800 (PST) +Received: from mail-ea0-f171.google.com (mail-ea0-f171.google.com + [209.85.215.171]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) + (No client certificate requested) + by olra.theworths.org (Postfix) with ESMTPS id 167AE429E28 + for ; Sat, 30 Nov 2013 07:34:18 -0800 (PST) +Received: by mail-ea0-f171.google.com with SMTP id h10so7565546eak.2 + for ; Sat, 30 Nov 2013 07:34:18 -0800 (PST) +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=pz0idViY6MGdFvO+vit0oEPL12UDi7GGIzhuYBwo5AY=; + b=iGsvQ7GA7kPYte3fQNP2IxlDM3dTdGcjVrAoZDPP5ri2bEl+O8Uh9VKLW8Wi8MbN/W + kyWjsTASkreiHiHLLHZ8f3ZQ0HVbh6Fxp23q3Ykb+wAzcedM6JDBzxYfI43BM0Gccbv5 + QJPEOmSwp7kFzhbYuncTq31ajqtQVFnKtjeBlMwpInUL33IlXK8Nv2lW41TJ1AI7GFcx + e/sdwr7rM+M88oFj7T5G6Mxb8UJ823V5ugxgG+Cty9U6jHcEDlQ+Xt+VIcVM9wEMS0Rv + gF8lMKVFSRNqmaKJFJX4eRcH0wsfmLsEdndMyxEcFeT0ukr4v2EM9/ogikCqv1Robjs0 + FdXQ== +X-Gm-Message-State: + ALoCoQno5GFK2VnzXqexYHRJJzT1VlYe8V1NDsduwb+8Wjd52KPDtv9I06uqSkojdUhQn7fcs+ab +X-Received: by 10.15.54.72 with SMTP id s48mr30800334eew.3.1385825656756; + Sat, 30 Nov 2013 07:34:16 -0800 (PST) +Received: from localhost (dsl-hkibrasgw2-58c36f-91.dhcp.inet.fi. + [88.195.111.91]) + by mx.google.com with ESMTPSA id 44sm51853110eek.5.2013.11.30.07.34.15 + for + (version=TLSv1.2 cipher=RC4-SHA bits=128/128); + Sat, 30 Nov 2013 07:34:16 -0800 (PST) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH v2 7/7] HACK: fix broken messages in the perf test corpus +Date: Sat, 30 Nov 2013 17:33:56 +0200 +Message-Id: + +X-Mailer: git-send-email 1.8.4.2 +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: Sat, 30 Nov 2013 15:35:02 -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.2 + -- 2.26.2