[ovs-dev] [PATCH] test-classifier: Include classifier.h instead of classifier.c
Jarno Rajahalme
jrajahalme at nicira.com
Thu Oct 23 20:29:07 UTC 2014
On Oct 23, 2014, at 1:14 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Thu, Oct 23, 2014 at 01:16:16PM -0700, Jarno Rajahalme wrote:
>>
>> On Oct 23, 2014, at 12:45 PM, Ben Pfaff <blp at nicira.com> wrote:
>>
>>> On Thu, Oct 23, 2014 at 11:38:48AM -0700, Jarno Rajahalme wrote:
>>>>> On Oct 23, 2014, at 8:22 AM, Ben Pfaff <blp at nicira.com> wrote:
>>>>>
>>>>>> On Thu, Oct 23, 2014 at 12:04:18PM +0200, Thomas Graf wrote:
>>>>>> Exposes the necessary structs and functions in classifier.h to allow
>>>>>> test-classifier.c to use the header and link to the library instead
>>>>>> of including classifier.c directly.
>>>>>>
>>>>>> Adds VLOG_DECLARE_THIS_MODULE() which allows to extend the namespace
>>>>>> of a vlog module.
>>>>>>
>>>>>> Also adds an assert to VLOG_DEFINE_MODULE() to catch duplicate
>>>>>> definitions with a proper backtrace.
>>>>>>
>>>>>> Cc: Scott Mann <smann at noironetworks.com>
>>>>>> Cc: Ben Pfaff <blp at nicira.com>
>>>>>> Cc: Gurucharan Shetty <shettyg at nicira.com>
>>>>>> Signed-off-by: Thomas Graf <tgraf at noironetworks.com>
>>>>>
>>>>> Jarno, are you OK with this? It solves a problem building with
>>>>> --enable-shared (which I'd add to the commit message):
>>>>> http://archives.openvswitch.org/pipermail/dev/2014-October/047674.html
>>>>
>>>> I'd rather not expose the classifier internals in a shared library
>>>> ABI, even if it is versioned. I'll see if there is another
>>>> solution. What was the problem?
>>>
>>> Two different definitions of a "classifier" vlog module, in different
>>> source files (lib/classifier.c directly and tests/test-classifier.c
>>> #include'ing classifier.c).
>>
>> I tested building with ?enable-shared again on the master and it builds fine.
>
> Yes, it builds fine, but you end up with test failures.
I thought the —enable-shared test failures (which I see too) are due to this:
$ make -k -j8 TESTSUITEFLAGS=1 check
fails, the interesting piece in tests/testsuite.log:
+2014-10-23T20:24:44Z|00001|daemon_unix|WARN|/home/jrajahalme/openvswitch/tests/testsuite.dir/0001/ovs-vswitchd.pid: open: No such file or directory
+lt-ovs-appctl: cannot read pidfile "/home/jrajahalme/openvswitch/tests/testsuite.dir/0001/ovs-vswitchd.pid" (No such file or directory)
$ ls tests/testsuite.dir/0001/
br0.mgmt db.sock lt-ovs-vswitchd.pid
br0.snoop lt-ovsdb-server.36077.ctl run
br1.mgmt lt-ovsdb-server.log stderr
br1.snoop lt-ovsdb-server.pid testsuite.log
cleanup lt-ovs-vswitchd.36111.ctl
conf.db lt-ovs-vswitchd.log
$
I.e., for some reason the names of the binaries have the “lt-“ prefix, which is not expected by “lt-ovs-appctl”.
Jarno
More information about the dev
mailing list