--- /dev/null
+Return-Path: <bremner@tethera.net>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id C4CC06DE0319\r
+ for <notmuch@notmuchmail.org>; Wed, 6 Apr 2016 03:27:35 -0700 (PDT)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.02\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[AWL=-0.009,\r
+ SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id omclZ2_7KJsS for <notmuch@notmuchmail.org>;\r
+ Wed, 6 Apr 2016 03:27:28 -0700 (PDT)\r
+Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])\r
+ by arlo.cworth.org (Postfix) with ESMTPS id AD6BA6DE02C2\r
+ for <notmuch@notmuchmail.org>; Wed, 6 Apr 2016 03:27:20 -0700 (PDT)\r
+Received: from remotemail by fethera.tethera.net with local (Exim 4.84)\r
+ (envelope-from <bremner@tethera.net>)\r
+ id 1ankgk-00033U-17; Wed, 06 Apr 2016 06:27:54 -0400\r
+Received: (nullmailer pid 28742 invoked by uid 1000);\r
+ Wed, 06 Apr 2016 10:27:16 -0000\r
+From: David Bremner <david@tethera.net>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: [PATCH 3/3] test: cope with glass backend file naming variations\r
+Date: Wed, 6 Apr 2016 07:27:11 -0300\r
+Message-Id: <1459938431-28670-4-git-send-email-david@tethera.net>\r
+X-Mailer: git-send-email 2.8.0.rc3\r
+In-Reply-To: <1459938431-28670-1-git-send-email-david@tethera.net>\r
+References: <1459855082-5715-2-git-send-email-david@tethera.net>\r
+ <1459938431-28670-1-git-send-email-david@tethera.net>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Wed, 06 Apr 2016 10:27:35 -0000\r
+\r
+In several places in the test suite we intentionally corrupt the Xapian\r
+database in order to test error handling. This corruption is specific to\r
+the on-disk organization of the database, and that changed with the\r
+glass backend. Hopefully introducing a new backend will be a relatively\r
+rare event, so that hardcoding the names of backends in the test suite\r
+is good enough.\r
+---\r
+ test/T050-new.sh | 2 +-\r
+ test/T060-count.sh | 2 ++\r
+ test/T150-tagging.sh | 4 ++--\r
+ test/T360-symbol-hiding.sh | 4 ++--\r
+ test/T560-lib-error.sh | 10 ++++++++--\r
+ 5 files changed, 15 insertions(+), 7 deletions(-)\r
+\r
+diff --git a/test/T050-new.sh b/test/T050-new.sh\r
+index 93a6fa9..fc93bfd 100755\r
+--- a/test/T050-new.sh\r
++++ b/test/T050-new.sh\r
+@@ -284,7 +284,7 @@ notmuch config set new.tags $OLDCONFIG\r
+ \r
+ \r
+ test_begin_subtest "Xapian exception: read only files"\r
+-chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.DB\r
++chmod u-w ${MAIL_DIR}/.notmuch/xapian/{*.DB,*.glass}\r
+ output=$(NOTMUCH_NEW --debug 2>&1 | sed 's/: .*$//' )\r
+ chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.DB\r
+ test_expect_equal "$output" "A Xapian exception occurred opening database"\r
+diff --git a/test/T060-count.sh b/test/T060-count.sh\r
+index 3fec94e..f1df4a2 100755\r
+--- a/test/T060-count.sh\r
++++ b/test/T060-count.sh\r
+@@ -96,6 +96,7 @@ test_expect_equal_file EXPECTED OUTPUT\r
+ backup_database\r
+ test_begin_subtest "error message for database open"\r
+ dd if=/dev/zero of="${MAIL_DIR}/.notmuch/xapian/postlist.DB" count=3\r
++dd if=/dev/zero of="${MAIL_DIR}/.notmuch/xapian/postlist.glass" count=3\r
+ notmuch count '*' 2>OUTPUT 1>/dev/null\r
+ output=$(sed 's/^\(A Xapian exception [^:]*\):.*$/\1/' OUTPUT)\r
+ test_expect_equal "${output}" "A Xapian exception occurred opening database"\r
+@@ -106,6 +107,7 @@ set breakpoint pending on\r
+ break count_files\r
+ commands\r
+ shell cp /dev/null ${MAIL_DIR}/.notmuch/xapian/postlist.DB\r
++shell cp /dev/null ${MAIL_DIR}/.notmuch/xapian/postlist.glass\r
+ continue\r
+ end\r
+ run\r
+diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh\r
+index 8adcabc..601d091 100755\r
+--- a/test/T150-tagging.sh\r
++++ b/test/T150-tagging.sh\r
+@@ -287,9 +287,9 @@ test_expect_code 1 "Empty tag names" 'notmuch tag + One'\r
+ test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One'\r
+ \r
+ test_begin_subtest "Xapian exception: read only files"\r
+-chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.DB\r
++chmod u-w ${MAIL_DIR}/.notmuch/xapian/{*.DB,*.glass}\r
+ output=$(notmuch tag +something '*' 2>&1 | sed 's/: .*$//' )\r
+-chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.DB\r
++chmod u+w ${MAIL_DIR}/.notmuch/xapian/{*.DB,*.glass}\r
+ test_expect_equal "$output" "A Xapian exception occurred opening database"\r
+ \r
+ test_done\r
+diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh\r
+index 89e7f16..2ccdc63 100755\r
+--- a/test/T360-symbol-hiding.sh\r
++++ b/test/T360-symbol-hiding.sh\r
+@@ -15,11 +15,11 @@ test_begin_subtest 'running test' run_test\r
+ mkdir -p ${PWD}/fakedb/.notmuch\r
+ ( LD_LIBRARY_PATH="$TEST_DIRECTORY/../lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \\r
+ $TEST_DIRECTORY/symbol-test ${PWD}/fakedb ${PWD}/nonexistent \\r
+- 2>&1 | notmuch_dir_sanitize | sed "s,\`,\',g") > OUTPUT\r
++ 2>&1 | notmuch_dir_sanitize | sed -e "s,\`,\',g" -e 's,chert\|glass,foo,g') > OUTPUT\r
+ \r
+ cat <<EOF > EXPECTED\r
+ A Xapian exception occurred opening database: Couldn't stat 'CWD/fakedb/.notmuch/xapian'\r
+-caught No chert database found at path 'CWD/nonexistent'\r
++caught No foo database found at path 'CWD/nonexistent'\r
+ EOF\r
+ test_expect_equal_file EXPECTED OUTPUT\r
+ \r
+diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh\r
+index 49d3674..7c5748b 100755\r
+--- a/test/T560-lib-error.sh\r
++++ b/test/T560-lib-error.sh\r
+@@ -189,7 +189,13 @@ Path already exists: MAIL_DIR\r
+ EOF\r
+ test_expect_equal_file EXPECTED OUTPUT\r
+ \r
+-cat <<'EOF' > c_head\r
++if [ -f "${MAIL_DIR}"/.notmuch/xapian/iamglass ]; then\r
++ db_ending=glass\r
++else\r
++ db_ending=DB\r
++fi\r
++\r
++cat <<EOF > c_head\r
+ #include <stdio.h>\r
+ #include <sys/types.h>\r
+ #include <sys/stat.h>\r
+@@ -210,7 +216,7 @@ int main (int argc, char** argv)\r
+ fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");\r
+ exit (1);\r
+ }\r
+- path = talloc_asprintf (db, "%s/.notmuch/xapian/postlist.DB", argv[1]);\r
++ path = talloc_asprintf (db, "%s/.notmuch/xapian/postlist.${db_ending}", argv[1]);\r
+ fd = open(path,O_WRONLY|O_TRUNC);\r
+ if (fd < 0) {\r
+ fprintf (stderr, "error opening %s\n", argv[1]);\r
+-- \r
+2.8.0.rc3\r
+\r