12 Commits

Author SHA1 Message Date
Michael Davidsaver 466d41ebb9 1.3.1 2021-06-30 10:05:36 -07:00
Michael Davidsaver d18e2219b3 pvalink: missing NULL check 2021-04-23 15:29:45 -07:00
Michael Davidsaver ff22538129 pdb: Create db_field_log for GETs 2021-03-17 13:22:42 -07:00
Michael Davidsaver 67e668795e test PDB get w/ filter 2021-03-17 13:22:42 -07:00
Michael Davidsaver 1ac2e6c809 ci: github actions add mingw 2021-03-17 12:47:34 -07:00
Michael Davidsaver 40b327cfcb testpvif 3.15 compat 2021-03-12 11:45:13 -08:00
Michael Davidsaver 20edb8fdf5 CI update 2021-03-12 11:09:26 -08:00
Michael Davidsaver babda345b4 ci: appveyor fix mingw builds 2021-03-12 09:59:02 -08:00
Michael Davidsaver 04fbaf5a2e fix LocalFL 2021-03-12 09:59:02 -08:00
Michael Davidsaver 3438fde276 test: cover server side filters 2021-03-12 09:59:02 -08:00
Simon Rose b515fd30ca Syncing softMain.cpp with epics-base 2021-03-12 07:09:22 -08:00
Michael Davidsaver ad8b77e19f Set next development version 2021-02-26 13:26:20 -08:00
15 changed files with 151 additions and 20 deletions
+1 -1
View File
@@ -49,7 +49,7 @@ environment:
CMP: vs2019
BASE: 7.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
CMP: mingw
CMP: gcc
BASE: 7.0
- APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
CMP: vs2017
+1 -1
Submodule .ci updated: ad8dd4a136...3db08b5977
+13 -6
View File
@@ -93,21 +93,21 @@ jobs:
- os: ubuntu-16.04
cmp: gcc-4.8
utoolchain: true
utoolchain: "4.8"
configuration: default
base: "7.0"
name: "7.0 Ub-16 gcc-4.8"
- os: ubuntu-16.04
cmp: gcc-4.9
utoolchain: true
utoolchain: "4.9"
configuration: default
base: "7.0"
name: "7.0 Ub-16 gcc-4.9"
- os: ubuntu-20.04
cmp: gcc-8
utoolchain: true
utoolchain: "8"
configuration: default
base: "7.0"
name: "7.0 Ub-20 gcc-8"
@@ -136,6 +136,12 @@ jobs:
base: "7.0"
name: "7.0 Win2019 MSC-19, static"
- os: windows-2019
cmp: gcc
configuration: static
base: "7.0"
name: "7.0 Win2019 mingw, static"
steps:
- uses: actions/checkout@v2
with:
@@ -144,18 +150,19 @@ jobs:
uses: actions/cache@v2
with:
path: ~/.cache
key: ${{ matrix.base }}/${{ matrix.os }}/${{ matrix.cmp }}/${{ matrix.configuration }}/${{ matrix.wine }}${{ matrix.rtems }}/${{ matrix.extra }}
key: ${{ matrix.base }}/${{ matrix.os }}/${{ matrix.cmp }}/${{ matrix.configuration }}/${{ matrix.wine }}${{ matrix.rtems }}/${{ matrix.extra }}/${{ hashFiles('.github/workflows/ci-scripts-build.yml') }}
- name: "apt-get install"
run: |
sudo apt-get update
sudo apt-get -y install qemu-system-x86 g++-mingw-w64-x86-64 gdb
if: runner.os == 'Linux'
- name: "apt-get install ${{ matrix.cmp }}"
- name: "apt-get install gcc-${{ matrix.utoolchain }}"
run: |
sudo apt-get update
sudo apt-get -y install software-properties-common
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get -y install ${{ matrix.cmp }}
sudo apt-get -y install g++-${{ matrix.utoolchain }}
if: matrix.utoolchain
- name: Prepare and compile dependencies
run: python .ci/cue.py prepare
+1 -1
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = pva2pva
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.3.0
PROJECT_NUMBER = 1.3.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
+1 -1
View File
@@ -1,7 +1,7 @@
# Module (source) version
EPICS_QSRV_MAJOR_VERSION = 1
EPICS_QSRV_MINOR_VERSION = 3
EPICS_QSRV_MAINTENANCE_VERSION = 0
EPICS_QSRV_MAINTENANCE_VERSION = 1
# ABI version
EPICS_QSRV_ABI_MAJOR_VERSION = 1
+1 -1
View File
@@ -38,7 +38,7 @@ PROJECT_NAME = pva2pva
# could be handy for archiving the generated documentation or if some version
# control system is used.
PROJECT_NUMBER = 1.3.0
PROJECT_NUMBER = 1.3.1
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
+8
View File
@@ -2,6 +2,14 @@
@page release_notes Release Notes
Release 1.3.1 (June 2021)
=========================
- Bug Fixes
- Correct handling for server side filters.
- Changes
- Syncing softMain.cpp with epics-base
Release 1.3.0 (Feb 2021)
========================
+6 -3
View File
@@ -394,8 +394,10 @@ void PDBGroupPut::get()
changed->clear();
if(atomic) {
DBManyLocker L(channel->pv->locker);
for(size_t i=0; i<npvs; i++)
pvif[i]->put(*changed, DBE_VALUE|DBE_ALARM|DBE_PROPERTY, NULL);
for(size_t i=0; i<npvs; i++) {
LocalFL FL(NULL, channel->pv->members[i].chan);
pvif[i]->put(*changed, DBE_VALUE|DBE_ALARM|DBE_PROPERTY, FL.pfl);
}
} else {
for(size_t i=0; i<npvs; i++)
@@ -403,7 +405,8 @@ void PDBGroupPut::get()
PDBGroupPV::Info& info = channel->pv->members[i];
DBScanLocker L(dbChannelRecord(info.chan));
pvif[i]->put(*changed, DBE_VALUE|DBE_ALARM|DBE_PROPERTY, NULL);
LocalFL FL(NULL, info.chan);
pvif[i]->put(*changed, DBE_VALUE|DBE_ALARM|DBE_PROPERTY, FL.pfl);
}
}
//TODO: report unused fields as changed?
+2 -1
View File
@@ -426,7 +426,8 @@ void PDBSinglePut::get()
changed->clear();
{
DBScanLocker L(pvif->chan);
pvif->put(*changed, DBE_VALUE|DBE_ALARM|DBE_PROPERTY, NULL);
LocalFL FL(NULL, pvif->chan);
pvif->put(*changed, DBE_VALUE|DBE_ALARM|DBE_PROPERTY, FL.pfl);
}
//TODO: report unused fields as changed?
changed->clear();
+3 -1
View File
@@ -89,7 +89,9 @@ pvd::PVField::const_shared_pointer pvaLink::getSubField(const char *name)
} else {
// we access a sub-struct
ret = lchan->op_mon.root->getSubField(fieldName);
if(ret->getField()->getType()!=pvd::structure) {
if(!ret) {
// noop
} else if(ret->getField()->getType()!=pvd::structure) {
// addressed sub-field isn't a sub-structure
if(strcmp(name, "value")!=0) {
// unless we are trying to fetch the "value", we fail here
+1
View File
@@ -254,6 +254,7 @@ struct LocalFL
if(pfl) pfl = dbChannelRunPostChain(pchan, pfl);
}
}
this->pfl = pfl;
}
~LocalFL() {
if(ours) db_delete_field_log(pfl);
+3 -2
View File
@@ -136,6 +136,7 @@ int main(int argc, char *argv[])
xmacro;
bool interactive = true;
bool loadedDb = false;
bool ranScript = false;
#ifdef USE_EXECDIR
// attempt to compute relative paths
@@ -240,7 +241,7 @@ int main(int argc, char *argv[])
std::cout<<"# End "<<argv[optind]<<"\n";
epicsThreadSleep(0.2);
loadedDb = true; /* Give it the benefit of the doubt... */
ranScript = true; /* Assume the script has done any necessary initialization */
}
if (loadedDb) {
@@ -259,7 +260,7 @@ int main(int argc, char *argv[])
}
} else {
if (loadedDb) {
if (loadedDb || ranScript) {
epicsThreadExitMain();
} else {
+4
View File
@@ -0,0 +1,4 @@
record (waveform, "TEST") {
field(FTVL, "SHORT")
field(NELM, "10")
}
+42 -1
View File
@@ -292,6 +292,45 @@ void testGroupMonitorTriggers(pvac::ClientProvider& client)
#endif
}
void testFilters(pvac::ClientProvider& client)
{
testDiag("test w/ server side filters");
pvd::shared_vector<const pvd::int16> expected;
{
pvd::shared_vector<pvd::int16> scratch(9);
scratch[0] = 9;
scratch[1] = 8;
scratch[2] = 7;
scratch[3] = 6;
scratch[4] = 5;
scratch[5] = 4;
scratch[6] = 3;
scratch[7] = 2;
scratch[8] = 1;
expected = pvd::freeze(scratch);
}
client.connect("TEST").put().set("value", expected).exec();
pvd::PVStructure::const_shared_pointer root(client.connect("TEST").get());
testFieldEqual<pvd::PVShortArray>(root, "value", expected);
root = client.connect("TEST.{\"arr\":{\"i\":2}}").get();
{
pvd::shared_vector<pvd::int16> scratch(5);
scratch[0] = 9;
scratch[1] = 7;
scratch[2] = 5;
scratch[3] = 3;
scratch[4] = 1;
expected = pvd::freeze(scratch);
}
testFieldEqual<pvd::PVShortArray>(root, "value", expected);
}
} // namespace
extern "C"
@@ -299,7 +338,7 @@ void p2pTestIoc_registerRecordDeviceDriver(struct dbBase *);
MAIN(testpdb)
{
testPlan(93);
testPlan(95);
try{
QSRVRegistrar_counters();
epics::RefSnapshot ref_before;
@@ -318,6 +357,7 @@ MAIN(testpdb)
#ifdef USE_MULTILOCK
testdbReadDatabase("testpdb-groups.db", NULL, NULL);
#endif
testdbReadDatabase("testfilters.db", NULL, NULL);
IOC.init();
@@ -333,6 +373,7 @@ MAIN(testpdb)
testSingleMonitor(client);
testGroupMonitor(client);
testGroupMonitorTriggers(client);
testFilters(client);
testEqual(epics::atomic::get(PDBProvider::num_instances), 1u);
}
+64 -1
View File
@@ -546,11 +546,73 @@ void testPlain()
dbScanUnlock((dbCommon*)prec_mbbi);
}
void testFilters()
{
testDiag("testFilter");
#if EPICS_VERSION_INT < VERSION_INT(7, 0, 0, 0)
testSkip(5, "Needs Base >=7.0");
#else
TestIOC IOC;
testdbReadDatabase("p2pTestIoc.dbd", NULL, NULL);
p2pTestIoc_registerRecordDeviceDriver(pdbbase);
testdbReadDatabase("testfilters.db", NULL, NULL);
IOC.init();
static const epicsInt32 arr[] = {9, 8, 7, 6, 5, 4, 3, 2, 1};
testdbPutArrFieldOk("TEST", DBF_LONG, 9, arr);
#if EPICS_VERSION_INT > VERSION_INT(7, 0, 5, 0)
testdbGetArrFieldEqual("TEST", DBF_LONG, 10, 9, arr);
testdbGetArrFieldEqual("TEST.{\"arr\":{\"s\":5}}", DBF_LONG, 10, 4, arr+5);
static const epicsInt32 arr2[] = {9, 7, 5, 3, 1};
testdbGetArrFieldEqual("TEST.{\"arr\":{\"i\":2}}", DBF_LONG, 10, 5, arr2);
#else
testSkip(3, "dbUnitTest doesn't use dbChannel");
#endif
pvd::PVStructurePtr root;
p2p::auto_ptr<PVIF> pvif;
DBCH chan("TEST.{\"arr\":{\"i\":2}}");
ScalarBuilder builder(chan);
root = pvd::FieldBuilder::begin()
->add("dut", builder.dtype())
->createStructure()->build();
pvif.reset(builder.attach(root, FieldName("dut")));
LocalFL fl(0, chan.chan);
pvd::shared_vector<pvd::int16> scratch(5);
scratch[0] = 9;
scratch[1] = 7;
scratch[2] = 5;
scratch[3] = 3;
scratch[4] = 1;
pvd::shared_vector<const pvd::int16> expected(pvd::freeze(scratch));
dbCommon *prec = testdbRecordPtr("TEST");
dbScanLock(prec);
pvd::BitSet changed;
pvif->put(changed, DBE_VALUE, fl.pfl);
dbScanUnlock(prec);
testFieldEqual<pvd::PVShortArray>(root, "dut.value", expected);
#endif // >= 7.0
}
} // namespace
MAIN(testpvif)
{
testPlan(75
testPlan(80
#ifdef USE_INT64
+13
#endif
@@ -562,5 +624,6 @@ MAIN(testpvif)
#endif
testScalar();
testPlain();
testFilters();
return testDone();
}