From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iCaNI+snoWBiRgEAgWs5BA (envelope-from ) for ; Sun, 16 May 2021 16:10:51 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QJ4WH+snoWB0NgAAB5/wlQ (envelope-from ) for ; Sun, 16 May 2021 14:10:51 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [IPv6:2607:5300:201:3100::1657]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id E414011982 for ; Sun, 16 May 2021 16:10:50 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id A6A3D29042; Sun, 16 May 2021 10:10:33 -0400 (EDT) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id A2DFC271EE for ; Sun, 16 May 2021 10:10:24 -0400 (EDT) Received: by fethera.tethera.net (Postfix, from userid 1001) id 9A23A60018; Sun, 16 May 2021 10:10:24 -0400 (EDT) Received: (nullmailer pid 3516747 invoked by uid 1000); Sun, 16 May 2021 14:10:19 -0000 From: David Bremner To: notmuch@notmuchmail.org Cc: David Bremner Subject: [PATCH 3/4] test: ignore debugging messages Date: Sun, 16 May 2021 11:10:14 -0300 Message-Id: <20210516141015.3516582-4-david@tethera.net> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210516141015.3516582-1-david@tethera.net> References: <20210516141015.3516582-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: A2J7NYZ4L7G5A35CO7LDT5AA3ITX7WUG X-Message-ID-Hash: A2J7NYZ4L7G5A35CO7LDT5AA3ITX7WUG X-MailFrom: bremner@tethera.net X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1621174251; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=R/povnjHxBb0/zu6m2/Leu9iuBJ3FS+2D0FqVwILbaA=; b=W05h3gvLgH+1ynlNFY87If0D+2Z+ygmJUToxFavfmYeBvOvqCWYT3+Hw5+dbEcBr9DrVzv qkuBaFoTmcZI09dvbi1R/Hb1Kz3PjmMl8BtKAoowDiCOcdsfLqMgBlwGhPxsmqihyFEzTo whjka/4ZQ9dMlMMDnoZdzJh0tYzUmaOZ1BVhxrIFU5vSxiwjvd/r0y8Haj1uHj1hl/nDXS XhVAzmw3Ar9lcJmAyYVguwh1euAsQIxhNB71rX4R3NpCERglYT1oWdc+myphB1t7BdllVZ qNjCleDVPFVzP8XpHAS6SEUn+xxj2/EniOQBXl7QqHq2MQwTWkplNzLZlXfwnA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1621174251; a=rsa-sha256; cv=none; b=ebjCvuAePufQFZmw1g4j+TXxUwnz9d//IA0iYfNNYuZEUCsbYU1oGVkjvyvitKcs119s7n BC4XSgh/Ju14DwzSFRhy23Bizxp6hGWAmi4Zk7AXV5qSqvGzBnn9b7cZoA9D6To3o5BAfb LVQkM43T4ItzJBs3fZdhwOyT3VvmZjxzlGlxG9bbc9nQcRE7zpYi4MzZ1L6XXGnQ/Sz354 XBlkLF528c8PSjkuZcOAGKxSuqKKY0vwDV8/wE3nRlPWTxEhQuq6GKs2j9NwiFTo6DpxAP d20bKvgkVXnFXzWSuf6JiRw4bkHyLiAkKUhCmLsIk9svXWFTNZN7UyzT1QJ98w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 0.45 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2607:5300:201:3100::1657 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: E414011982 X-Spam-Score: 0.45 X-Migadu-Scanner: scn0.migadu.com X-TUID: c9FJ2uU4wPWs Previously building with "-DDEBUG" broke the test suite in several places. --- test/T300-encoding.sh | 12 ++++++------ test/T310-emacs.sh | 1 - test/T450-emacs-show.sh | 1 - test/test-lib.sh | 23 +++++++++++++++-------- 4 files changed, 21 insertions(+), 16 deletions(-) diff --git a/test/T300-encoding.sh b/test/T300-encoding.sh index 1e9d2a3d..6fcd10c5 100755 --- a/test/T300-encoding.sh +++ b/test/T300-encoding.sh @@ -31,18 +31,18 @@ test_expect_equal "$output" "thread:0000000000000002 2001-01-05 [1/1] Notmuch test_begin_subtest "RFC 2047 encoded word with spaces" add_message '[subject]="=?utf-8?q?encoded word with spaces?="' -output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize) -test_expect_equal "$output" "thread:0000000000000003 2001-01-05 [1/1] Notmuch Test Suite; encoded word with spaces (inbox unread)" +output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; encoded word with spaces (inbox unread)" test_begin_subtest "RFC 2047 encoded words back to back" add_message '[subject]="=?utf-8?q?encoded-words-back?==?utf-8?q?to-back?="' -output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize) -test_expect_equal "$output" "thread:0000000000000004 2001-01-05 [1/1] Notmuch Test Suite; encoded-words-backto-back (inbox unread)" +output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; encoded-words-backto-back (inbox unread)" test_begin_subtest "RFC 2047 encoded words without space before or after" add_message '[subject]="=?utf-8?q?encoded?=word without=?utf-8?q?space?=" ' -output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_show_sanitize) -test_expect_equal "$output" "thread:0000000000000005 2001-01-05 [1/1] Notmuch Test Suite; encodedword withoutspace (inbox unread)" +output=$(notmuch search id:${gen_msg_id} 2>&1 | notmuch_search_sanitize) +test_expect_equal "$output" "thread:XXX 2001-01-05 [1/1] Notmuch Test Suite; encodedword withoutspace (inbox unread)" test_begin_subtest "Mislabeled Windows-1252 encoding" add_message '[content-type]="text/plain; charset=iso-8859-1"' \ diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index 851ef64e..dad09b11 100755 --- a/test/T310-emacs.sh +++ b/test/T310-emacs.sh @@ -1058,7 +1058,6 @@ End of search results. === MESSAGES === YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details) === ERROR === -[XXX] YYY/notmuch_fail exited with status 1 command: YYY/notmuch_fail search --format\=sexp --format-version\=4 --sort\=newest-first tag\:inbox exit status: 1" diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh index bd76d378..52353bf4 100755 --- a/test/T450-emacs-show.sh +++ b/test/T450-emacs-show.sh @@ -190,7 +190,6 @@ test_expect_equal "$(notmuch_emacs_error_sanitize notmuch_fail OUTPUT MESSAGES E === MESSAGES === This is an error (see *Notmuch errors* for more details) === ERROR === -[XXX] This is an error command: YYY/notmuch_fail show --format\\=sexp --format-version\\=4 --decrypt\\=true --exclude\\=false \\' \\* \\' exit status: 1 diff --git a/test/test-lib.sh b/test/test-lib.sh index d46bb4c3..69d9583c 100644 --- a/test/test-lib.sh +++ b/test/test-lib.sh @@ -637,6 +637,11 @@ print(msg.as_string(False)) ' "$@" } +notmuch_debug_sanitize () +{ + grep -v '^D.:' +} + notmuch_exception_sanitize () { perl -pe 's/(A Xapian exception occurred at .*[.]cc?):([0-9]*)/\1:XXX/' @@ -644,7 +649,7 @@ notmuch_exception_sanitize () notmuch_search_sanitize () { - perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/' + notmuch_debug_sanitize | perl -pe 's/("?thread"?: ?)("?)................("?)/\1\2XXX\3/' } notmuch_search_files_sanitize () @@ -664,10 +669,11 @@ notmuch_show_sanitize () } notmuch_show_sanitize_all () { - sed \ - -e 's| filename:.*| filename:XXXXX|' \ - -e 's| id:[^ ]* | id:XXXXX |' | \ - notmuch_date_sanitize + notmuch_debug_sanitize | + sed \ + -e 's| filename:.*| filename:XXXXX|' \ + -e 's| id:[^ ]* | id:XXXXX |' | \ + notmuch_date_sanitize } notmuch_json_show_sanitize () @@ -688,9 +694,10 @@ notmuch_emacs_error_sanitize () shift for file in "$@"; do echo "=== $file ===" - cat "$file" + notmuch_debug_sanitize < "$file" done | sed \ - -e 's/^\[.*\]$/[XXX]/' \ + -e '/^$/d' \ + -e '/^\[.*\]$/d' \ -e "s|^\(command: \)\{0,1\}/.*/$command|\1YYY/$command|" } @@ -1133,7 +1140,7 @@ test_C () { echo "== stdout ==" > OUTPUT.stdout echo "== stderr ==" > OUTPUT.stderr ./${exec_file} "$@" 1>>OUTPUT.stdout 2>>OUTPUT.stderr - notmuch_dir_sanitize OUTPUT.stdout OUTPUT.stderr | notmuch_exception_sanitize > OUTPUT + notmuch_dir_sanitize OUTPUT.stdout OUTPUT.stderr | notmuch_exception_sanitize | notmuch_debug_sanitize > OUTPUT } make_shim () { -- 2.30.2