File permission errors e.g., are hard to trigger as root.
test_expect_equal_file EXPECTED OUTPUT
test_begin_subtest "Xapian exception: read only files"
+test_subtest_broken_for_root
chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.*
output=$(NOTMUCH_NEW --debug 2>&1 | sed 's/: .*$//' )
chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.*
test_expect_code 1 'notmuch tag +- One'
test_begin_subtest "Xapian exception: read only files"
+test_subtest_broken_for_root
chmod u-w ${MAIL_DIR}/.notmuch/xapian/*.*
output=$(notmuch tag +something '*' 2>&1 | sed 's/: .*$//' )
chmod u+w ${MAIL_DIR}/.notmuch/xapian/*.*
test_subtest_known_broken_=t
}
+test_subtest_broken_for_root () {
+ if [ "$EUID" = "0" ]; then
+ test_subtest_known_broken_=t
+ fi
+}
+
test_expect_success () {
exec 1>&6 2>&7 # Restore stdout and stderr
if [ -z "$inside_subtest" ]; then