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
>
- Replies:
- RE: DBD/DB validator? michael.abbott
- RE: DBD/DB validator? Zelazny, Michael Stanley
- References:
- DBD/DB validator? Ralph Lange
- Navigate by Date:
- Prev:
DBD/DB validator? Ralph Lange
- Next:
Re: DBD/DB validator? Andrew Johnson
- 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:
DBD/DB validator? Ralph Lange
- Next:
RE: DBD/DB validator? michael.abbott
- 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
|