[augeas-devel] Writing lens for modules.autload.d

Doug Warner doug at warner.fm
Tue Oct 5 17:14:01 UTC 2010


Back on-list.

On 10/04/2010 04:42 PM, Raphaël Pinson wrote:
> 2010/10/4 Doug Warner <doug at warner.fm <mailto:doug at warner.fm>>
> 
>     I split out the tests like you recommended; I was mostly just doing it that
>     way to keep it simple for the time being.
> 
>     Setting options without a value will probably be necessary; I know linux can
>     take options like that for kernel boot options (flags like "rhgb" and the
>     like) and some modules might do the same thing.  If you can point me at a lens
>     that might do something similar I would appreciate it!
> 
> Sure. See tests/test_mysql.aug for example. Usually what I do in this case is
> that I actually give an empty value to the node. This is easier as it allows
> to do a 'set /path/to/node ""' to create the node.
> 

That's what I'm trying to do in my test currently (set "/ip_gre/option2" "")
but I'm getting this error:

test_modulesautoload.aug:72.2-74.32:exception thrown in test
test_modulesautoload.aug:72.7-73.28:exception: Value '' does not match regexp
/[^ \t\n#:]+/ in store lens
    Lens: ./modulesautoload.aug:19.32-.45:
    Error encountered at path /ip_gre/option2

Attached is the tests I've created and lens that you modified.

-Doug
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: modulesautoload.aug
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20101005/0d7cda34/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test_modulesautoload.aug
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20101005/0d7cda34/attachment-0001.ksh>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20101005/0d7cda34/attachment.sig>


More information about the augeas-devel mailing list