From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WDTOGJ3POWM4ggAAbAwnHQ (envelope-from ) for ; Sun, 02 Oct 2022 19:51:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 6DL6F53POWMA/AAAG6o9tA (envelope-from ) for ; Sun, 02 Oct 2022 19:51:25 +0200 Received: from mail.notmuchmail.org (yantan.tethera.net [IPv6:2a01:4f9:c011:7a79::1]) (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 17C051D85C for ; Sun, 2 Oct 2022 19:51:24 +0200 (CEST) Received: from yantan.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id D24A35E01E; Sun, 2 Oct 2022 17:51:19 +0000 (UTC) Received: from fethera.tethera.net (fethera.tethera.net [IPv6:2607:5300:60:c5::1]) by mail.notmuchmail.org (Postfix) with ESMTP id D223D5DD59 for ; Sun, 2 Oct 2022 17:51:17 +0000 (UTC) Received: by fethera.tethera.net (Postfix, from userid 1001) id EB13C5FBC2; Sun, 2 Oct 2022 13:51:15 -0400 (EDT) Received: (nullmailer pid 541063 invoked by uid 1000); Sun, 02 Oct 2022 17:51:14 -0000 From: David Bremner To: notmuch@notmuchmail.org Subject: [PATCH 1/2] test: add known broken test for diagnostics from over long filenames. Date: Sun, 2 Oct 2022 14:51:02 -0300 Message-Id: <20221002175103.541050-1-david@tethera.net> X-Mailer: git-send-email 2.35.2 MIME-Version: 1.0 Message-ID-Hash: EZPGBAFJZ23JJGCA7FY4BT2B567QGKRA X-Message-ID-Hash: EZPGBAFJZ23JJGCA7FY4BT2B567QGKRA 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 CC: jao@gnu.org 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-Flow: FLOW_IN X-Migadu-Country: DE ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1664733085; 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:list-id:list-help: list-owner:list-unsubscribe:list-subscribe:list-post; bh=hzq0gSXBj3esCqqhN6ys/4u0Q9QP7KKCVCQq4eQ3wyI=; b=csx+A14Gx5WkO3rX9JJHBKsXvoGZcAcvSnUlIQHj8B2ErDvOhUD1dkqqEy8DgxUsNr3F6A h6LCqD9+hjKZLYMRHdsjv5xAMNTTTRMNcnnFZL5TnjQZXJ47kNXnMEOWnAJntnbKTBa8Ky JyFF4v+NvegPKqpZL6qwPkiTrs1M7FZo5PdNw2uM/LMRgMZ7NQUydt0Fsf287oz4lpunBS 8NBJCpCLot+xhSP6MZtI1T3OP8cXlpK596QelZCGCp4CCjYrYJK6AkqxSYWbAcClTD9RJ+ NfjPNB3n63rzsuDwdS3y8lTaEKMt0XZJNr3rGn1Xg603i06/0lIZYegC64wwaw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664733085; a=rsa-sha256; cv=none; b=sdcFkF0FrkBj4rMaVxNnItMBl+9QTmZA8a/z4y5LNb7GODsi22mshI2fUD+o916fUgw3Nh O7Ka5C26sRXO9REbtcakIG4Oj7m9XH6ofEwRgJOZ7fPTEAiI2jUR3GjkJxAl8J8wbxedMa EGnMaPzcM4Pea05w8lpyvCwIHRC3povkftr+ZPvScEgpig9HgSlpm4BUQyIDnY3zsPm5py ieNloZPqf2cc7Orccj1jyZyLsK0e/3w4pvMmKm22mC7ILY5+XX35YhW5SjiOVvh1RdK+EG Szcg1ZMm4Q5NhEluDL9RgKTqZGGZHZVuxmWqSYzdMk7e38ZaRFJ7W7VrEw+MzQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: -0.09 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 2a01:4f9:c011:7a79::1 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: 17C051D85C X-Spam-Score: -0.09 X-Migadu-Scanner: scn1.migadu.com X-TUID: t02shYKHl23j 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..74890928 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 +Unexpected error with file MAIL_DIR/$name +add_file: Something went wrong trying to read or write a file +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