unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH 1/2] test: add known broken test for diagnostics from over long filenames.
@ 2022-10-02 17:51 David Bremner
  2022-10-02 17:51 ` [PATCH 2/2] lib: add better diagnostics for " David Bremner
  0 siblings, 1 reply; 7+ messages in thread
From: David Bremner @ 2022-10-02 17:51 UTC (permalink / raw)
  To: notmuch; +Cc: jao

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2023-02-20 13:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-02 17:51 [PATCH 1/2] test: add known broken test for diagnostics from over long filenames David Bremner
2022-10-02 17:51 ` [PATCH 2/2] lib: add better diagnostics for " 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

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).