On Tue, Sep 20, 2016 at 09:54:02PM +0200, Christian Boltz wrote:
> Am Dienstag, 20. September 2016, 12:03:57 CEST schrieb Steve Beattie:
> > Currently, the utils/ make check tests fail when run under
> > python2.7.  For reasons that aren't entirely clear, the action to set
> > apparmor.aa.cfg['settings']['ldd'] to './fake_ldd' does not actually
> > work on python2.7, so get_reqs() tries to use /usr/bin/ldd anyway
> > (printing out the contents of apparmor.aa.cfg['settings']['ldd']
> > after the set operation in _run_test() shows it to still contain
> > '/usr/bin/ldd' o.O). 
> That sounds interesting[tm]. At least it isn't something only you see - 
> I can reproduce it here.
> Maybe the reason is that py2 and py3 use different {c,C}onfigparser 
> python modules to read the config file (see apparmor/config.py) - but I'm 
> still surprised why the py2 result seems to be read-only and the py3 
> result isn't. And I'm even more surprised that, assuming the py2 result 
> is really read-only, we don't get an exception when trying to write to 
> it.

Yeah, it's really goofy, and I don't understand why it happens. Another
possibility is that somehow the unittest test isolation is interfering
in some way, but I don't really see how.

> > Therefore, skip these two tests when running
> > under python2.7.
> That's not really nice, but the easiest solution ;-)

Yeah, was not thrilled to just skip these tests, but attempts at
getting the config to change failed.

> > +            print("Skipping on python < 2.x")
> This message is wrong - it should say "... python 2.x", not 
> "... python < 2.x" (which effectively means 1.x)
> With the skip message changed,
>     Acked-by: Christian Boltz <appar...@cboltz.de>

Nice catch, fixed and committed. Thanks for the review!

> I get similar py2 failures in AaTest_create_new_profile, so you might 
> want to apply your patch to this class also. Consider this
>     Pre-Acked-by: Christian Boltz <appar...@cboltz.de>

Interesting, I'm unable to reproduce it for that test class. Do you
have example output?

Steve Beattie

Attachment: signature.asc
Description: PGP signature

AppArmor mailing list
Modify settings or unsubscribe at: 

Reply via email to