You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Rabih M <ra...@gmail.com> on 2016/06/01 17:12:36 UTC

[proton-c 0.12.0] SASL unit test are failing

Hello,

I tried to launch proton 0.12.0 unit tests on Linux, everything is working
fine except when i launch SASL related unit tests in python-test.

The following 2 tests are failing when SASL is activated but are passing
when SASL is deactivated:

proton_tests.engine.SaslEventTest.testPipelinedServerReadFirst:
File
"/data/src/new/proton-ssl/qpid-proton/tests/python/proton_tests/engine.py",
line 2679, in testPipelinedServerReadFirst
assert server.sasl().outcome == SASL.OK
AssertionError

proton_tests.engine.SaslEventTest.testPipelinedServerWriteFirst:
File
"/data/src/new/proton-ssl/qpid-proton/tests/python/proton_tests/engine.py",
line 2288, in expect_oneof
assert False, "actual events %s did not match any of the expected
sequences: %s" % (events, sequences)
AssertionError: actual events [PN_CONNECTION_INIT(<proton.Connection
0x7fcafa7766d0 ~ 0x1123220>), PN_CONNECTION_BOUND(<proton.Connection
0x7fcafa7766d0 ~ 0x1123220>), PN_TRANSPORT_ERROR(<proton.Transport
0x7fcafa7766d0 ~ 0x1153590>), PN_TRANSPORT_TAIL_CLOSED(<proton.Transport
0x7fcafa7766d0 ~ 0x1153590>), PN_TRANSPORT_HEAD_CLOSED(<proton.Transport
0x7fcafa7766d0 ~ 0x1153590>), PN_TRANSPORT_CLOSED(<proton.Transport
0x7fcafa7766d0 ~ 0x1153590>)] did not match any of the expected sequences:
((PN_CONNECTION_INIT, PN_CONNECTION_BOUND, PN_TRANSPORT),)

The following test is only launched when SASL is activated and is blocking:

test_authentication_via_container_attributes:
2016-06-01 12:11:18,077 ERROR amqp:unauthorized-access: Authentication
failed [mech=(null)]
2016-06-01 12:11:18,078 ERROR amqp:connection:framing-error: connection
aborted

Has anyone already encountered those failures?

Thanks,
Rabih

Re: [proton-c 0.12.0] SASL unit test are failing

Posted by Andrew Stitcher <as...@redhat.com>.
On Fri, 2016-06-03 at 09:51 +0200, Adel Boutros wrote:
> Hello Andrew,
> I wasn't talking about disabling tests based on a detection mechanism
> but more like on based on a cmake variable (For example:
> -DSASL_ENABLED=false) which would skip tests requiring SASL.If my
> memory doesn't betray me, I saw stuff like that in the code line.

This isn't really correct - CMake will either build default or extended
SASL support (If it detects Cyrus SASL it will build extended SASL
support).

If it builds extended SASL support it will also test extended SASL
support. In this case it will test some SASL mechanisms that you might
not have installed, but that are important to fill the testing matrix,
specifically DIGEST-MD5, really I should note that you need to have it
installed to run the tests.

Andrew

> Regards,Adel
> 
> > 
> > Subject: Re: [proton-c 0.12.0] SASL unit test are failing
> > From: aconway@redhat.com
> > To: users@qpid.apache.org
> > Date: Thu, 2 Jun 2016 15:20:39 -0400
> > 
> > On Thu, 2016-06-02 at 14:10 -0400, Andrew Stitcher wrote:
> > > 
> > > On Thu, 2016-06-02 at 19:24 +0200, Adel Boutros wrote:
> > > > 
> > > > 
> > > > It turned out we were missing an md5 library. The tests are
> > > > working
> > > > after we installed it.
> > > > I agree that tests should be skipped when they depend on a
> > > > disabled
> > > > feature.
> > > It's impossible (or at least beyond my time constraints!) to
> > > detect
> > > that a SASL mechanism is not installed and hence disable just
> > > those
> > > unit tests that depend on that mechanism.
> > > 
> > > If Cyrus SASL as a whole is not installed then only the basic
> > > SASL
> > > mechs that are implemented in the default SASL implementation
> > > will be
> > > tested.
> > Sounds reasonable to me.
> > 
> > -----------------------------------------------------------------
> > ----
> > To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> > For additional commands, e-mail: users-help@qpid.apache.org
> > 
> �		�	���		��

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: [proton-c 0.12.0] SASL unit test are failing

Posted by Adel Boutros <ad...@live.com>.
Hello Andrew,
I wasn't talking about disabling tests based on a detection mechanism but more like on based on a cmake variable (For example: -DSASL_ENABLED=false) which would skip tests requiring SASL.If my memory doesn't betray me, I saw stuff like that in the code line.
Regards,Adel

> Subject: Re: [proton-c 0.12.0] SASL unit test are failing
> From: aconway@redhat.com
> To: users@qpid.apache.org
> Date: Thu, 2 Jun 2016 15:20:39 -0400
> 
> On Thu, 2016-06-02 at 14:10 -0400, Andrew Stitcher wrote:
> > On Thu, 2016-06-02 at 19:24 +0200, Adel Boutros wrote:
> > > 
> > > It turned out we were missing an md5 library. The tests are working
> > > after we installed it.
> > > I agree that tests should be skipped when they depend on a disabled
> > > feature.
> > It's impossible (or at least beyond my time constraints!) to detect
> > that a SASL mechanism is not installed and hence disable just those
> > unit tests that depend on that mechanism.
> > 
> > If Cyrus SASL as a whole is not installed then only the basic SASL
> > mechs that are implemented in the default SASL implementation will be
> > tested.
> 
> Sounds reasonable to me.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
 		 	   		  

Re: [proton-c 0.12.0] SASL unit test are failing

Posted by Alan Conway <ac...@redhat.com>.
On Thu, 2016-06-02 at 14:10 -0400, Andrew Stitcher wrote:
> On Thu, 2016-06-02 at 19:24 +0200, Adel Boutros wrote:
> > 
> > It turned out we were missing an md5 library. The tests are working
> > after we installed it.
> > I agree that tests should be skipped when they depend on a disabled
> > feature.
> It's impossible (or at least beyond my time constraints!) to detect
> that a SASL mechanism is not installed and hence disable just those
> unit tests that depend on that mechanism.
> 
> If Cyrus SASL as a whole is not installed then only the basic SASL
> mechs that are implemented in the default SASL implementation will be
> tested.

Sounds reasonable to me.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: [proton-c 0.12.0] SASL unit test are failing

Posted by Andrew Stitcher <as...@redhat.com>.
On Thu, 2016-06-02 at 19:24 +0200, Adel Boutros wrote:
> It turned out we were missing an md5 library. The tests are working
> after we installed it.
> I agree that tests should be skipped when they depend on a disabled
> feature.

It's impossible (or at least beyond my time constraints!) to detect
that a SASL mechanism is not installed and hence disable just those
unit tests that depend on that mechanism.

If Cyrus SASL as a whole is not installed then only the basic SASL
mechs that are implemented in the default SASL implementation will be
tested.

A

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


RE: [proton-c 0.12.0] SASL unit test are failing

Posted by Adel Boutros <ad...@live.com>.
It turned out we were missing an md5 library. The tests are working after we installed it.
I agree that tests should be skipped when they depend on a disabled feature.
Regards,Adel

> Subject: Re: [proton-c 0.12.0] SASL unit test are failing
> From: aconway@redhat.com
> To: users@qpid.apache.org
> Date: Thu, 2 Jun 2016 13:10:53 -0400
> 
> On Thu, 2016-06-02 at 11:00 -0400, Andrew Stitcher wrote:
> > On Wed, 2016-06-01 at 19:12 +0200, Rabih M wrote:
> > > 
> > > ...
> > > test_authentication_via_container_attributes:
> > > 2016-06-01 12:11:18,077 ERROR amqp:unauthorized-access:
> > > Authentication
> > > failed [mech=(null)]
> > It looks like you don't have sufficient sasl mechanisms installed.
> > 
> > If you are using a distro with packages you probably need to install
> > packages named like cyrus-sasl-plain, cyrus-sasl-md5 & cyrus-sasl-
> > scram
> 
> I think this is true, but SASL is an optional dependency. If proton is
> built without it, tests that require unavailable SASL features should
> be skipped. (If that's not the issue here, ignore this.)
> 
> Cheers,
> Alan.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
> 
 		 	   		  

Re: [proton-c 0.12.0] SASL unit test are failing

Posted by Alan Conway <ac...@redhat.com>.
On Thu, 2016-06-02 at 11:00 -0400, Andrew Stitcher wrote:
> On Wed, 2016-06-01 at 19:12 +0200, Rabih M wrote:
> > 
> > ...
> > test_authentication_via_container_attributes:
> > 2016-06-01 12:11:18,077 ERROR amqp:unauthorized-access:
> > Authentication
> > failed [mech=(null)]
> It looks like you don't have sufficient sasl mechanisms installed.
> 
> If you are using a distro with packages you probably need to install
> packages named like cyrus-sasl-plain, cyrus-sasl-md5 & cyrus-sasl-
> scram

I think this is true, but SASL is an optional dependency. If proton is
built without it, tests that require unavailable SASL features should
be skipped. (If that's not the issue here, ignore this.)

Cheers,
Alan.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: [proton-c 0.12.0] SASL unit test are failing

Posted by Andrew Stitcher <as...@redhat.com>.
On Wed, 2016-06-01 at 19:12 +0200, Rabih M wrote:
> ...
> test_authentication_via_container_attributes:
> 2016-06-01 12:11:18,077 ERROR amqp:unauthorized-access:
> Authentication
> failed [mech=(null)]

It looks like you don't have sufficient sasl mechanisms installed.

If you are using a distro with packages you probably need to install
packages named like cyrus-sasl-plain, cyrus-sasl-md5 & cyrus-sasl-scram

Andrew


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org