Let me point out the Diamond epicsdbbuilder, currently on github at https://github.com/Araneidae/epicsdbbuilder -- this does the opposite side of the job, generating well formed and validated databases from a Python script, using the EPICS database checking API from libdbStaticHost.so to validate against the specified dbd files as the database is built.
> -----Original Message-----
> From: [email protected] [mailto:tech-talk-
> [email protected]] On Behalf Of Michael Davidsaver
> Sent: 23 April 2015 17:55
> To: [email protected]
> Subject: Re: DBD/DB validator?
>
> I'd second the call for a syntax check of .db files. The fact that
> this
> gets discovered at runtime is terrible.
>
> I can't count the number of times I've missed (and seen others miss) a
> closing quote, and then miss the error from dbLoadRecord because it
> scrolled off the top of the screen.
>
>
> The complicate is that all the parsers in Base are designed to work on
> full definitions.
>
> On a .db file with only record definitions dbExpand from 3.14 gives:
>
> > /usr/lib/epics/bin/linux-x86_64/dbExpand -I. cacount.db >/dev/null
> > Record "cnt1" is of unknown type "calc"
>
> dbdExpand.pl from 3.15 doesn't recognize the "record" keyword.
>
> > ./bin/linux-x86_64/dbdExpand.pl -I. cacount.db
> > dbdExpand.pl: Syntax error in 'record(calc, "cnt1") {'
>
>
> So I can see two courses.
>
> 1) Modify the makefiles so that the validator can be given .dbd file(s)
> as well. This would allow (an updated) "dbdExpand ... >/dev/null" to
> serve as a check.
>
> 2) Write a new utility which parses, but doesn't follow include
> statements, then does as much checking as possible.
>
>
> Michael
>
>
>
> On 04/23/2015 05:56 AM, Ralph Lange wrote:
> > Dear all,
> >
> > Ages ago I remember there was a tool called 'dbst' that could be used
> to
> > validate DBD/DB setups and that could dump DBs in a sorted,
> normalized
> > way (only non-default value fields, standard indentation) to make
> them
> > easily comparable with diff and such.
> >
> > Is dbst still around? I suppose there are more recent ways nowadays.
> > Perl/Python? Web-Service?
> > (I do like the idea of using the same library as the IOC, though...)
> >
> > What is a good way to do database validation?
> >
> > Thanks a lot,
> > ~Ralph
> >
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
- References:
- DBD/DB validator? Ralph Lange
- Re: DBD/DB validator? Michael Davidsaver
- Navigate by Date:
- Prev:
RE: DBD/DB validator? Lang, Keenan C.
- Next:
Struck SIS3316 Device Support Heinz Junkes
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: DBD/DB validator? Michael Davidsaver
- Next:
RE: DBD/DB validator? Zelazny, Michael Stanley
- Index:
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
<2015>
2016
2017
2018
2019
2020
2021
2022
2023
2024
|