From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id SE6DO7kmq2PLqwAAbAwnHQ (envelope-from ) for ; Tue, 27 Dec 2022 18:09:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 4DMUALomq2OMagAAauVa8A (envelope-from ) for ; Tue, 27 Dec 2022 18:09:14 +0100 Received: from mail.notmuchmail.org (yantan.tethera.net [135.181.149.255]) (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 B8FC338491 for ; Tue, 27 Dec 2022 18:09:13 +0100 (CET) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 0ED07604A9; Tue, 27 Dec 2022 17:08:59 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by mail.notmuchmail.org (Postfix) with ESMTP id D3F1F5FC27 for ; Tue, 27 Dec 2022 17:08:56 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id 365AA5FBA1; Tue, 27 Dec 2022 12:08:56 -0500 (EST) Received: (nullmailer pid 4007777 invoked by uid 1000); Tue, 27 Dec 2022 17:08:53 -0000 From: David Bremner To: Jose A Ortega Ruiz , David Bremner , notmuch@notmuchmail.org Subject: [PATCH v2 1/2] test: add known broken test for diagnostics from over long filenames. Date: Tue, 27 Dec 2022 13:08:46 -0400 Message-Id: <20221227170847.4007402-2-david@tethera.net> X-Mailer: git-send-email 2.35.2 In-Reply-To: <20221227170847.4007402-1-david@tethera.net> References: <87mtaej8nd.fsf@mail.jao.io> <20221227170847.4007402-1-david@tethera.net> MIME-Version: 1.0 Message-ID-Hash: ICWI27JOV2UGC2FUSR6RSJ7SKNZJFY35 X-Message-ID-Hash: ICWI27JOV2UGC2FUSR6RSJ7SKNZJFY35 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; digests; suspicious-header X-Mailman-Version: 3.3.3 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Country: DE X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1672160953; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to: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-owner:list-unsubscribe:list-subscribe:list-post; bh=56TxhcVy0KYyHlU7sWIYLs1+tq0BkQGmVIGtKUrRPM4=; b=tDW+uaKFGuW3tAZaTNuRSAdnGLnhIgsoe5tTkrkWDSAP1AYhudByMxBVc/Ivm+4e1ixcSt dXN154z5B5YmuMTyPD3MH39IU12+lwA6PN+PFKlBkQdCG9Ge+rm8jVFtFNHGgzungi9V2X q1JeUeuVygv9ppUqshg2jWISIaIhCfKRw+VzgUGNcN8NdbovSmhpu2Ec3C1FJ/zVSRLEEN uqhctXGRgXZlxpQbpOMq5TLTtDRgQan1zCbmi9DoF8xO62g7M7fGsvMVYxyyAKbvQNpNgC u6setjWXFHloI2fnzPQyqYnaXreoy/dcnd9hwVWcAT9aP6ym2AxXa1IbURxL/Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1672160953; a=rsa-sha256; cv=none; b=OJofmamPPhl9+pqRWvSC/lVRSiwjiw++QATnnMh7MXq9yg6rD3RaVg9A/cxjRrUDPAbqau 0ESiGO8scSkf2VfcuhfwKuqcLmHGhgSdGsL6t4nknzJwoPGAnme+k5Tq4o3X1DSNdosGsj H2ZWBOTHe+/0zVGIVeTZzZmFlt9mlG0vf9kyGiDYZBMVowOSYKNRejX1HWktr5YuP2PX8N dn9I6pqHqEv8zgzG4AGWB9GE7ygOJAbkndpsBvyhlZI5nxYmmk4qLxkqURN3glUwuICc32 5IPmJHZ00lxlqXDk5Q9A2WRr0V0/kxKYNIff9OzIjJERZz0E9xyHitTnC//pBw== X-Spam-Score: -0.40 X-Migadu-Queue-Id: B8FC338491 Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 135.181.149.255 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org; dmarc=none X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -0.40 X-TUID: 08gFVB6Grdh2 Previously we tested over long directory names, add similar testing for over long filenames. --- test/T050-new.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index cb67889c..f0a56c96 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -383,6 +383,21 @@ No new mail. Removed 1 message. EOF test_expect_equal_file EXPECTED OUTPUT +test_begin_subtest "Long file names have reasonable diagnostics" +test_subtest_known_broken +printf -v name 'f%.0s' {1..234} +generate_message "[filename]=$name" +notmuch new 2>&1 | notmuch_dir_sanitize >OUTPUT +rm ${MAIL_DIR}/${name} +cat < EXPECTED +Note: Ignoring non-indexable path: MAIL_DIR/$name +add_file: Path supplied is illegal for this function +filename too long for file-direntry term: MAIL_DIR/$name +Processed 1 file in almost no time. +No new mail. +EOF +test_expect_equal_file EXPECTED OUTPUT + test_begin_subtest "Xapian exception: read only files" chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.* output=$(NOTMUCH_NEW --debug 2>&1 | sed 's/: .*$//' ) -- 2.35.2