From: David Bremner <david@tethera.net>
To: notmuch@notmuchmail.org
Cc: jao@gnu.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 [thread overview]
Message-ID: <20221002175103.541050-1-david@tethera.net> (raw)
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 <<EOF > 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
next reply other threads:[~2022-10-02 17:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-02 17:51 David Bremner [this message]
2022-10-02 17:51 ` [PATCH 2/2] lib: add better diagnostics for over long filenames David Bremner
2022-10-02 20:03 ` Jose A Ortega Ruiz
2022-12-27 17:08 ` v2 of long filename diagnostics David Bremner
2022-12-27 17:08 ` [PATCH v2 1/2] test: add known broken test for diagnostics from over long filenames David Bremner
2022-12-27 17:08 ` [PATCH v2 2/2] lib: add better diagnostics for " David Bremner
2023-02-20 13:27 ` v2 of long filename diagnostics David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221002175103.541050-1-david@tethera.net \
--to=david@tethera.net \
--cc=jao@gnu.org \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://yhetil.org/notmuch.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).