EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: DBD/DB validator?
From: Andrew Johnson <[email protected]>
To: <[email protected]>
Date: Thu, 23 Apr 2015 12:02:22 -0500
Hi Ralph,

On 04/23/2015 04:56 AM, Ralph Lange wrote:
> 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...)

I think it came with the CapFast tools.

> What is a good way to do database validation?

Take a look at the dbVerbose extension which contains just one source
file. If you change the final argument to the dbWriteRecord() and/or
dbWriteRecordFP() calls from 1 to 0 you'll get the same output as dbst.

However this approach only works when compiled against 3.14 as it needs
the dbStaticHost library routines that store each field as a string — it
would need to call a registerRecordDeviceDriver() routine to work with
the run-time dbStatic library routines, but no tool can know what all
the record types are that you might have. It might be possible to
extract the dbStaticNoRun.c file from 3.14 and try and build that into
the tool, I haven't thought about that much though.

I have always intended to create a database validator using the Perl
modules I wrote for 3.15, but haven't got around to implementing the DB
file reading/writing part yet. This shouldn't be too hard to do, it will
just take a bit of time to implement — sorry!

- Andrew

-- 
Light thinks it travels faster than anything but it is wrong.
No matter how fast light travels, it finds the darkness has
always got there first, and is waiting for it.
    -- Terry Pratchett, Reaper Man

References:
DBD/DB validator? Ralph Lange

Navigate by Date:
Prev: Re: DBD/DB validator? Michael Davidsaver
Next: RE: DBD/DB validator? Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: DBD/DB validator? Michael Davidsaver
Next: RE: DBD/DB validator? Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·