[apparmor] [PATCH 3/4] parser: Regression tests for DBus rules

Seth Arnold seth.arnold at canonical.com
Mon Jul 29 23:38:26 UTC 2013


On Mon, Jul 29, 2013 at 04:06:23PM -0700, Tyler Hicks wrote:
> On 2013-07-29 15:49:39, Seth Arnold wrote:
> > On Sat, Jul 27, 2013 at 02:45:17AM -0700, Tyler Hicks wrote:
> > > This is a test in the style of gen-xtrans.pl that attempts to run
> > > through the most commonly constructed DBus rules. It also attempts to
> > > run through some common mistakes to ensure that the parser fails
> > > appropriately.
> > > 
> > > Signed-off-by: Tyler Hicks <tyhicks at canonical.com>
> > 
> > One quick question inline..

> > Here's the gen_file() prototype (to force C syntax on Perl :) :
> > > +sub gen_file($$$$$$$$$$) {
> > 
> > there's a few missing parameters.. does it all work out alright in the
> > end?
> 
> It does work out in the end. You can't force anything into the
> $quantifier param since it goes in front of the dbus keyword (which is
> why there's the one empty "" param), but then you can shove anything
> into any parameter after that.
> 
> Sorry, it is ugly but so is a bunch of empty parameters. I kept flip
> flopping between empty parameters and taking the shortcut that you
> caught. :)
> 
> Named parameters would be nice here...

Oh yes, but .. those are also awkward in Perl. :)

Acked-by: Seth Arnold <seth.arnold at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20130729/06e93a24/attachment-0001.pgp>


More information about the AppArmor mailing list