1 Return-Path: <bremner@tethera.net>
\r
2 X-Original-To: notmuch@notmuchmail.org
\r
3 Delivered-To: notmuch@notmuchmail.org
\r
4 Received: from localhost (localhost [127.0.0.1])
\r
5 by arlo.cworth.org (Postfix) with ESMTP id 2574B6DE0318
\r
6 for <notmuch@notmuchmail.org>; Tue, 5 Apr 2016 04:18:36 -0700 (PDT)
\r
7 X-Virus-Scanned: Debian amavisd-new at cworth.org
\r
11 X-Spam-Status: No, score=-0.02 tagged_above=-999 required=5 tests=[AWL=-0.009,
\r
12 SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled
\r
13 Received: from arlo.cworth.org ([127.0.0.1])
\r
14 by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)
\r
15 with ESMTP id oSt8j8RcOcW6 for <notmuch@notmuchmail.org>;
\r
16 Tue, 5 Apr 2016 04:18:27 -0700 (PDT)
\r
17 Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197])
\r
18 by arlo.cworth.org (Postfix) with ESMTPS id 038186DE00D3
\r
19 for <notmuch@notmuchmail.org>; Tue, 5 Apr 2016 04:18:19 -0700 (PDT)
\r
20 Received: from remotemail by fethera.tethera.net with local (Exim 4.84)
\r
21 (envelope-from <bremner@tethera.net>)
\r
22 id 1anP0W-0002xm-Eb; Tue, 05 Apr 2016 07:18:52 -0400
\r
23 Received: (nullmailer pid 5781 invoked by uid 1000);
\r
24 Tue, 05 Apr 2016 11:18:15 -0000
\r
25 From: David Bremner <david@tethera.net>
\r
26 To: notmuch@notmuchmail.org
\r
27 Subject: [PATCH 2/2] WIP: update test suite for glass xapian backend
\r
28 Date: Tue, 5 Apr 2016 08:18:02 -0300
\r
29 Message-Id: <1459855082-5715-3-git-send-email-david@tethera.net>
\r
30 X-Mailer: git-send-email 2.8.0.rc3
\r
31 In-Reply-To: <1459855082-5715-1-git-send-email-david@tethera.net>
\r
32 References: <1459855082-5715-1-git-send-email-david@tethera.net>
\r
33 X-BeenThere: notmuch@notmuchmail.org
\r
34 X-Mailman-Version: 2.1.20
\r
36 List-Id: "Use and development of the notmuch mail system."
\r
37 <notmuch.notmuchmail.org>
\r
38 List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,
\r
39 <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>
\r
40 List-Archive: <http://notmuchmail.org/pipermail/notmuch/>
\r
41 List-Post: <mailto:notmuch@notmuchmail.org>
\r
42 List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>
\r
43 List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,
\r
44 <mailto:notmuch-request@notmuchmail.org?subject=subscribe>
\r
45 X-List-Received-Date: Tue, 05 Apr 2016 11:18:36 -0000
\r
47 This fixes all but one of the test failures I found with xapian 1.3.5.
\r
48 Once I see what the real issue is with the atomicity test, I'll see how
\r
49 to organize this. In particular it might make sense to define a global
\r
50 variable in test-lib.sh for what the default xapian backend will be.
\r
52 test/T050-new.sh | 2 +-
\r
53 test/T060-count.sh | 2 ++
\r
54 test/T150-tagging.sh | 4 ++--
\r
55 test/T360-symbol-hiding.sh | 4 ++--
\r
56 test/T560-lib-error.sh | 10 ++++++++--
\r
57 5 files changed, 15 insertions(+), 7 deletions(-)
\r
59 diff --git a/test/T050-new.sh b/test/T050-new.sh
\r
60 index 93a6fa9..fc93bfd 100755
\r
61 --- a/test/T050-new.sh
\r
62 +++ b/test/T050-new.sh
\r
63 @@ -284,7 +284,7 @@ notmuch config set new.tags $OLDCONFIG
\r
66 test_begin_subtest "Xapian exception: read only files"
\r
67 -chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.DB
\r
68 +chmod u-w ${MAIL_DIR}/.notmuch/xapian/{*.DB,*.glass}
\r
69 output=$(NOTMUCH_NEW --debug 2>&1 | sed 's/: .*$//' )
\r
70 chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.DB
\r
71 test_expect_equal "$output" "A Xapian exception occurred opening database"
\r
72 diff --git a/test/T060-count.sh b/test/T060-count.sh
\r
73 index 3fec94e..f1df4a2 100755
\r
74 --- a/test/T060-count.sh
\r
75 +++ b/test/T060-count.sh
\r
76 @@ -96,6 +96,7 @@ test_expect_equal_file EXPECTED OUTPUT
\r
78 test_begin_subtest "error message for database open"
\r
79 dd if=/dev/zero of="${MAIL_DIR}/.notmuch/xapian/postlist.DB" count=3
\r
80 +dd if=/dev/zero of="${MAIL_DIR}/.notmuch/xapian/postlist.glass" count=3
\r
81 notmuch count '*' 2>OUTPUT 1>/dev/null
\r
82 output=$(sed 's/^\(A Xapian exception [^:]*\):.*$/\1/' OUTPUT)
\r
83 test_expect_equal "${output}" "A Xapian exception occurred opening database"
\r
84 @@ -106,6 +107,7 @@ set breakpoint pending on
\r
87 shell cp /dev/null ${MAIL_DIR}/.notmuch/xapian/postlist.DB
\r
88 +shell cp /dev/null ${MAIL_DIR}/.notmuch/xapian/postlist.glass
\r
92 diff --git a/test/T150-tagging.sh b/test/T150-tagging.sh
\r
93 index 8adcabc..601d091 100755
\r
94 --- a/test/T150-tagging.sh
\r
95 +++ b/test/T150-tagging.sh
\r
96 @@ -287,9 +287,9 @@ test_expect_code 1 "Empty tag names" 'notmuch tag + One'
\r
97 test_expect_code 1 "Tag name beginning with -" 'notmuch tag +- One'
\r
99 test_begin_subtest "Xapian exception: read only files"
\r
100 -chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.DB
\r
101 +chmod u-w ${MAIL_DIR}/.notmuch/xapian/{*.DB,*.glass}
\r
102 output=$(notmuch tag +something '*' 2>&1 | sed 's/: .*$//' )
\r
103 -chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.DB
\r
104 +chmod u+w ${MAIL_DIR}/.notmuch/xapian/{*.DB,*.glass}
\r
105 test_expect_equal "$output" "A Xapian exception occurred opening database"
\r
108 diff --git a/test/T360-symbol-hiding.sh b/test/T360-symbol-hiding.sh
\r
109 index 89e7f16..2ccdc63 100755
\r
110 --- a/test/T360-symbol-hiding.sh
\r
111 +++ b/test/T360-symbol-hiding.sh
\r
112 @@ -15,11 +15,11 @@ test_begin_subtest 'running test' run_test
\r
113 mkdir -p ${PWD}/fakedb/.notmuch
\r
114 ( LD_LIBRARY_PATH="$TEST_DIRECTORY/../lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" \
\r
115 $TEST_DIRECTORY/symbol-test ${PWD}/fakedb ${PWD}/nonexistent \
\r
116 - 2>&1 | notmuch_dir_sanitize | sed "s,\`,\',g") > OUTPUT
\r
117 + 2>&1 | notmuch_dir_sanitize | sed -e "s,\`,\',g" -e 's,chert\|glass,foo,g') > OUTPUT
\r
119 cat <<EOF > EXPECTED
\r
120 A Xapian exception occurred opening database: Couldn't stat 'CWD/fakedb/.notmuch/xapian'
\r
121 -caught No chert database found at path 'CWD/nonexistent'
\r
122 +caught No foo database found at path 'CWD/nonexistent'
\r
124 test_expect_equal_file EXPECTED OUTPUT
\r
126 diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh
\r
127 index 49d3674..7c5748b 100755
\r
128 --- a/test/T560-lib-error.sh
\r
129 +++ b/test/T560-lib-error.sh
\r
130 @@ -189,7 +189,13 @@ Path already exists: MAIL_DIR
\r
132 test_expect_equal_file EXPECTED OUTPUT
\r
134 -cat <<'EOF' > c_head
\r
135 +if [ -f "${MAIL_DIR}"/.notmuch/xapian/iamglass ]; then
\r
141 +cat <<EOF > c_head
\r
143 #include <sys/types.h>
\r
144 #include <sys/stat.h>
\r
145 @@ -210,7 +216,7 @@ int main (int argc, char** argv)
\r
146 fprintf (stderr, "error opening database: %d %s\n", stat, msg ? msg : "");
\r
149 - path = talloc_asprintf (db, "%s/.notmuch/xapian/postlist.DB", argv[1]);
\r
150 + path = talloc_asprintf (db, "%s/.notmuch/xapian/postlist.${db_ending}", argv[1]);
\r
151 fd = open(path,O_WRONLY|O_TRUNC);
\r
153 fprintf (stderr, "error opening %s\n", argv[1]);
\r