From f3ee655b493c7e57621226a98abc9e9db5d0cb27 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Thu, 8 May 2014 20:57:07 +0900 Subject: [PATCH 1/3] notmuch-dump: use fsync instead of fdatasync Since the file size will have changed, there is no performance benefit to calling fdatasync. Somewhat surprisingly, using fdatasync apparently causes portability problems on FreeBSD. --- notmuch-dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/notmuch-dump.c b/notmuch-dump.c index 2849eaba..887a2082 100644 --- a/notmuch-dump.c +++ b/notmuch-dump.c @@ -169,7 +169,7 @@ notmuch_database_dump (notmuch_database_t *notmuch, } if (output_file_name) { - ret = fdatasync (outfd); + ret = fsync (outfd); if (ret) { fprintf (stderr, "Error syncing %s to disk: %s\n", name_for_error, strerror (errno)); From ca34ac1440d9c7855f41fc4bca569038fa1bd6b0 Mon Sep 17 00:00:00 2001 From: Charles Celerier Date: Tue, 6 May 2014 13:02:24 -0400 Subject: [PATCH 2/3] test/Makefile.local: Added configured TALLOC_LDFLAGS. The linking to talloc is hard-coded in the testing Makefile. This patch causes the linking to talloc to be done according to how TALLOC_LDFLAGS was configured. Signed-off-by: Charles Celerier --- test/Makefile.local | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/Makefile.local b/test/Makefile.local index 987441f0..d622eafe 100644 --- a/test/Makefile.local +++ b/test/Makefile.local @@ -16,7 +16,7 @@ $(dir)/arg-test: $(dir)/arg-test.o command-line-arguments.o util/libutil.a $(call quiet,CC) $^ -o $@ $(dir)/hex-xcode: $(dir)/hex-xcode.o command-line-arguments.o util/libutil.a - $(call quiet,CC) $^ -o $@ -ltalloc + $(call quiet,CC) $^ $(TALLOC_LDFLAGS) -o $@ random_corpus_deps = $(dir)/random-corpus.o $(dir)/database-test.o \ notmuch-config.o command-line-arguments.o \ From a33ec9ce40ff6304d620d391593357f22dcebbf0 Mon Sep 17 00:00:00 2001 From: David Bremner Date: Tue, 6 May 2014 22:06:27 +0900 Subject: [PATCH 3/3] test: allow pending break points in atomicity script. This seems to fix problems with the symbol rename not being defined at startup on at least OS/X and some Debian Linux architectures. --- test/atomicity.gdb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/atomicity.gdb b/test/atomicity.gdb index fd675257..15adb16c 100644 --- a/test/atomicity.gdb +++ b/test/atomicity.gdb @@ -18,6 +18,10 @@ shell echo 0 > outcount shell touch inodes +# work around apparent issue with lazy library loading on some +# platforms +set breakpoint pending on + break rename commands # As an optimization, only consider snapshots after a Xapian commit.