From: Charles Celerier <cceleri@cs.stanford.edu>
To: David Bremner <david@tethera.net>,
Notmuch Mail <notmuch@notmuchmail.org>
Subject: Re: [PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump.
Date: Thu, 08 May 2014 11:03:05 -0400 [thread overview]
Message-ID: <m2zjisnwie.fsf@jane.lan> (raw)
In-Reply-To: <87d2fov2qj.fsf@maritornes.cs.unb.ca>
[-- Attachment #1: Type: text/plain, Size: 5708 bytes --]
David Bremner <david@tethera.net> writes:
> Charles Celerier <cceleri@cs.stanford.edu> writes:
>> test_begin_subtest 'comparing existing to exported symbols'
>> -objdump -t $TEST_DIRECTORY/../lib/*.o | awk '$4 == ".text" && $6 ~ "^notmuch" {print $6}' | sort | uniq > ACTUAL
>> +nm -g $TEST_DIRECTORY/../lib/*.o | sed -n 's/.*\s\+T\s\+_\(notmuch_.*\)/\1/p' | sort | uniq > ACTUAL
>> sed -n 's/[[:blank:]]*\(notmuch_[^;]*\);/\1/p' $TEST_DIRECTORY/../notmuch.sym | sort | uniq > EXPORTED
>
> Hmm. It seems like the _ there is wrong. It grabs all of the symbols
> starting with _notmuch, which are symbols we _don't_ want exported.
> It makes me wonder what ends up in "notmuch.sym" on MacOS, if that test
> passes for you.
Ok. Apologies in advance for the verbose content of this email. Here is my notmuch.sym:
$ cat notmuch.sym
{
global:
__ZTIN6Xapian10LogicErrorE;
__ZTIN6Xapian12RuntimeErrorE;
__ZTIN6Xapian16DocNotFoundErrorE;
__ZTIN6Xapian20InvalidArgumentErrorE;
__ZTIN6Xapian5ErrorE;
__ZTSN6Xapian10LogicErrorE;
__ZTSN6Xapian12RuntimeErrorE;
__ZTSN6Xapian16DocNotFoundErrorE;
__ZTSN6Xapian20InvalidArgumentErrorE;
__ZTSN6Xapian5ErrorE;
notmuch_status_to_string;
notmuch_database_create;
notmuch_database_open;
notmuch_database_close;
notmuch_database_compact;
notmuch_database_destroy;
notmuch_database_get_path;
notmuch_database_get_version;
notmuch_database_needs_upgrade;
notmuch_database_upgrade;
notmuch_database_begin_atomic;
notmuch_database_end_atomic;
notmuch_database_get_directory;
notmuch_database_add_message;
notmuch_database_remove_message;
notmuch_database_find_message;
notmuch_database_find_message_by_filename;
notmuch_database_get_all_tags;
notmuch_query_create;
notmuch_query_get_query_string;
notmuch_query_set_omit_excluded;
notmuch_query_set_sort;
notmuch_query_get_sort;
notmuch_query_add_tag_exclude;
notmuch_query_search_threads;
notmuch_query_search_messages;
notmuch_query_destroy;
notmuch_threads_valid;
notmuch_threads_get;
notmuch_threads_move_to_next;
notmuch_threads_destroy;
notmuch_query_count_messages;
notmuch_query_count_threads;
notmuch_thread_get_thread_id;
notmuch_thread_get_total_messages;
notmuch_thread_get_toplevel_messages;
notmuch_thread_get_messages;
notmuch_thread_get_matched_messages;
notmuch_thread_get_authors;
notmuch_thread_get_subject;
notmuch_thread_get_oldest_date;
notmuch_thread_get_newest_date;
notmuch_thread_get_tags;
notmuch_thread_destroy;
notmuch_messages_valid;
notmuch_messages_get;
notmuch_messages_move_to_next;
notmuch_messages_destroy;
notmuch_messages_collect_tags;
notmuch_message_get_message_id;
notmuch_message_get_thread_id;
notmuch_message_get_replies;
notmuch_message_get_filename;
notmuch_message_get_filenames;
notmuch_message_get_flag;
notmuch_message_set_flag;
notmuch_message_get_date;
notmuch_message_get_header;
notmuch_message_get_tags;
notmuch_message_add_tag;
notmuch_message_remove_tag;
notmuch_message_remove_all_tags;
notmuch_message_maildir_flags_to_tags;
notmuch_message_tags_to_maildir_flags;
notmuch_message_freeze;
notmuch_message_thaw;
notmuch_message_destroy;
notmuch_tags_valid;
notmuch_tags_get;
notmuch_tags_move_to_next;
notmuch_tags_destroy;
notmuch_directory_set_mtime;
notmuch_directory_get_mtime;
notmuch_directory_get_child_files;
notmuch_directory_get_child_directories;
notmuch_directory_destroy;
notmuch_filenames_valid;
notmuch_filenames_get;
notmuch_filenames_move_to_next;
notmuch_filenames_destroy;
local: *;
};
The output of the test in question (T360-symbol-hiding) after
applying all of the patches in this series is
T360-symbol-hiding: Testing exception symbol hiding
PASS running test
PASS checking output
FAIL comparing existing to exported symbols
--- T360-symbol-hiding.3.EXPORTED 2014-05-08
14:48:52.000000000 +0000
+++ T360-symbol-hiding.3.ACTUAL 2014-05-08 14:48:52.000000000
+0000
@@ -26,7 +26,11 @@
notmuch_filenames_valid
notmuch_message_add_tag
notmuch_message_destroy
+notmuch_message_file_close
+notmuch_message_file_get_header
+notmuch_message_file_open
notmuch_message_freeze
+notmuch_message_get_author
notmuch_message_get_date
notmuch_message_get_filename
notmuch_message_get_filenames
@@ -39,6 +43,7 @@
notmuch_message_maildir_flags_to_tags
notmuch_message_remove_all_tags
notmuch_message_remove_tag
+notmuch_message_set_author
notmuch_message_set_flag
notmuch_message_tags_to_maildir_flags
notmuch_message_thaw
@@ -58,6 +63,8 @@
notmuch_query_search_threads
notmuch_query_set_omit_excluded
notmuch_query_set_sort
+notmuch_sha1_of_file
+notmuch_sha1_of_string
notmuch_status_to_string
notmuch_tags_destroy
notmuch_tags_get
This output was a clear motivation for the patch in
id:1399402716-13714-1-git-send-email-cceleri@cs.stanford.edu.
Here is some of output of the matches made on the output of nm:
$ nm -g test/../lib/*.o | sed -n '/.*\s\+T\s\+_\(notmuch_.*\)/p'
00000000000028c0 T _notmuch_database_add_message
0000000000002280 T _notmuch_database_begin_atomic
0000000000001af0 T _notmuch_database_close
0000000000001de0 T _notmuch_database_compact
0000000000000300 T _notmuch_database_create
0000000000001db0 T _notmuch_database_destroy
0000000000002300 T _notmuch_database_end_atomic
...
chuck
[-- Attachment #2: Type: application/pgp-signature, Size: 494 bytes --]
next prev parent reply other threads:[~2014-05-08 15:03 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-06 17:02 [PATCH 0/5] Improving portability to Mac OS X Charles Celerier
2014-05-06 17:02 ` [PATCH 1/5] test/Makefile.local: Added configured TALLOC_LDFLAGS Charles Celerier
2014-05-06 17:02 ` [PATCH 2/5] configure, test: Added variables for paths to true and false Charles Celerier
2014-05-06 17:02 ` [PATCH 3/5] atomicity.gdb: Allow breakpoint symbols to be resolved later Charles Celerier
2014-05-06 17:02 ` [PATCH 4/5] T360-symbol-hiding: Added code to support testing on Mac OS X Charles Celerier
2014-05-06 17:02 ` [PATCH 5/5] T360-symbol-hiding: Use nm instead of objdump Charles Celerier
2014-05-06 18:21 ` [PATCH 4/5] T360-symbol-hiding: Added code to support testing on Mac OS X Tomi Ollila
2014-05-06 18:35 ` Charles Celerier
2014-05-06 19:09 ` Tomi Ollila
2014-05-06 18:26 ` [PATCH 3/5] atomicity.gdb: Allow breakpoint symbols to be resolved later Tomi Ollila
2014-05-08 12:32 ` [PATCH 2/5] configure, test: Added variables for paths to true and false David Bremner
2014-05-08 15:00 ` Charles Celerier
2014-05-08 22:14 ` David Bremner
2014-05-17 21:46 ` [PATCH 1/5] test/Makefile.local: Added configured TALLOC_LDFLAGS David Bremner
2014-05-07 3:50 ` [PATCH v2 4/5] T360-symbol-hiding: Added code to support testing on Mac OS X Charles Celerier
2014-05-07 3:50 ` [PATCH v2 5/5] T360-symbol-hiding: Use nm instead of objdump Charles Celerier
2014-05-08 13:06 ` David Bremner
2014-05-08 15:03 ` Charles Celerier [this message]
2014-05-08 22:07 ` David Bremner
2014-05-09 1:20 ` Charles Celerier
2014-05-10 9:49 ` David Bremner
2014-05-10 14:55 ` Charles Celerier
2014-07-12 19:00 ` David Bremner
2014-07-13 15:36 ` [PATCH v2 4/5] T360-symbol-hiding: Added code to support testing on Mac OS X David Bremner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://notmuchmail.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2zjisnwie.fsf@jane.lan \
--to=cceleri@cs.stanford.edu \
--cc=david@tethera.net \
--cc=notmuch@notmuchmail.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).