Commit Graph

267 Commits

Author SHA1 Message Date
Michael Davidsaver 7e6463c200 codespell 2023-11-21 12:20:34 -08:00
Michael Davidsaver eddc687021 ioc: combine registrars and detect QSRV1
also consolidates initHook and epicsAtExit() hooks
into a single sequence.
2023-11-20 10:59:44 -08:00
Michael Davidsaver 6d1216daad pvalink: porting part 3
add pvalink json schema
avoid JSON5 in testpvalink for portability.
fixup build with pvalink
trap bad_weak_ptr open during dtor
  Not sure why this is happening, but need not be CRIT.
c++11, cleanup, and notes
fix pvalink test sync
fix test cleanup on exit
pvalink disconnected link is always INVALID
pvalink logging
pvalink capture Disconnect time
pvalink eliminate providerName
  restrict local to dbChannelTest()
  aka. no qsrv groups
pvalink onTypeChange when attaching link to existing channel
pvalink eliminate unused Connecting state
pvalink add InstCounter
pvalink AfterPut can be const
pvalink add atomic jlif flag
include epicsStdio.h later
  avoid #define printf troubles
assert cleanup state on exit
pvalink add newer lset functions
test link disconnect
testpvalink redo testPutAsync()
pvalink fill out meta-data fetch
pvalink fix FLNK
pvalink cache putReq
pvalink test atomic monitor
pvalink test enum handling
pvalink handle scalar read of empty array
  make it well defined anyway...
pvalink test array of strings
handle db_add_event() failure
handle record._options.DBE
2023-11-20 10:59:44 -08:00
Simon Rose 5f48325890 pvalink: porting part 2
Fix pvaGetValue for string scalars
Remove pvaLink* variables
Move close() call to pvaGlobal_t from worker queue
Removed latch state
Update .gitignore to ignore VS code configuration
Add lset(pva) support for base 7.x
Remove pvalink support for base 3.x
Update cached value object in pvaLinkChannel::run
Removing queued state from pvaLikeChannel
Add debug functionality
Rename internal fields to match json spec
prepare for puts
Fix array response size
Add tests for pvalink properties
2023-11-20 10:59:44 -08:00
Michael Davidsaver 382dd29452 qsrv: avoid sending 0 precision w/ integer value 2023-11-20 10:59:44 -08:00
Michael Davidsaver 17464a117a disallow "null" size by default
pvDataCPP only explicitly checks for "null" size (-1)
for Union, where it indicates the implicit "null" arm.
Also string, where "null" is equivalent to zero length string.
2023-11-08 16:18:20 -08:00
Michael Davidsaver 90a1221904 testmon, more details on failure 2023-10-23 16:31:44 -07:00
Michael Davidsaver a9eea922b5 Relax when assigning struct[] or union[] of similar
Attempt copy with partial assignment.
2023-10-03 20:45:28 -07:00
Michael Davidsaver d8f7de8c8c client: GET yield complete 2023-09-25 18:50:26 -07:00
Michael Davidsaver 0b0dfde5c9 ioc: group put w/o effect is an error. 2023-09-19 18:31:29 -07:00
Michael Davidsaver c06d4bb69a ioc: actually require +putorder to PUT 2023-09-19 18:31:29 -07:00
Michael Davidsaver 9ccd7b50ab ioc: fix block=true to DBF_ENUM 2023-09-19 12:16:02 -07:00
Michael Davidsaver 59c7fde958 ioc: fix group put over-process
only dbProcess() mapped records after dbPut
or for Proc mapping
2023-09-16 15:25:43 +02:00
Michael Davidsaver d8ed97e713 ioc: add logging for group ops 2023-09-16 15:25:43 +02:00
Michael Davidsaver d7e49605cc threadOnce further reduce boilerplate
also latch failure
2023-09-04 16:17:25 +02:00
Michael Davidsaver 59164a63f7 pvxs::ioc::testPrepare() 2023-09-04 16:17:25 +02:00
Michael Davidsaver a79eab92e8 improve message when request2mask() would select nothing 2023-09-02 11:14:07 +02:00
Michael Davidsaver 13d02530cf Add NTTable helper 2023-08-31 10:46:43 +02:00
Michael Davidsaver b0c7c8fcd0 ioc: fill in display.precision 2023-08-22 15:09:42 +02:00
Michael Davidsaver 82286a5ae5 fix testnamesrv
ensure nameserver actually used
2023-08-12 15:57:44 -07:00
Michael Davidsaver a2d2721385 test SockEndpoint parsing 2023-08-02 17:20:13 -07:00
Michael Davidsaver 88f09659e4 Workaround apparent g++12 spurious error
In file included from ../testshared.cpp:12:
In constructor ‘pvxs::shared_array<E, Enable>::shared_array(size_t, V) [with V = std::nullptr_t; E = std::unique_ptr<unsigned int>; Enable = void]’,
    inlined from ‘void {anonymous}::testComplex()’ at ../testshared.cpp:225:57:
../../src/pvxs/sharedArray.h:288:17: error: pointer used after ‘void operator delete [](void*, std::size_t)’ [-Werror=use-after-free]
  288 |         :base_t(new _E_non_const[c], c)
      |                 ^~~~~~~~~~~~~~~~~~~
In member function ‘void pvxs::detail::sa_default_delete<E>::operator()(E*) const [with E = std::unique_ptr<unsigned int>]’,
    inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter, _Alloc) [with _Ptr = std::unique_ptr<unsigned int>*; _Deleter = pvxs::detail::sa_default_delete<std::unique_ptr<unsigned int> >; _Alloc = std::allocator<void>; <template-parameter-2-4> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/12/bits/shared_ptr_base.h:958:11,
    inlined from ‘std::__shared_count<_Lp>::__shared_count(_Ptr, _Deleter) [with _Ptr = std::unique_ptr<unsigned int>*; _Deleter = pvxs::detail::sa_default_delete<std::unique_ptr<unsigned int> >; <template-parameter-2-3> = void; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/12/bits/shared_ptr_base.h:939:57,
    inlined from ‘std::__shared_ptr<_Tp, _Lp>::__shared_ptr(_Yp*, _Deleter) [with _Yp = std::unique_ptr<unsigned int>; _Deleter = pvxs::detail::sa_default_delete<std::unique_ptr<unsigned int> >; <template-parameter-2-3> = void; _Tp = std::unique_ptr<unsigned int>; __gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_atomic]’ at /usr/include/c++/12/bits/shared_ptr_base.h:1478:17,
    inlined from ‘std::shared_ptr<_Tp>::shared_ptr(_Yp*, _Deleter) [with _Yp = std::unique_ptr<unsigned int>; _Deleter = pvxs::detail::sa_default_delete<std::unique_ptr<unsigned int> >; <template-parameter-2-3> = void; _Tp = std::unique_ptr<unsigned int>]’ at /usr/include/c++/12/bits/shared_ptr.h:232:48,
    inlined from ‘pvxs::detail::sa_base<E>::sa_base(A*, size_t) [with A = std::unique_ptr<unsigned int>; E = std::unique_ptr<unsigned int>]’ at ../../src/pvxs/sharedArray.h:136:10,
    inlined from ‘pvxs::shared_array<E, Enable>::shared_array(size_t, V) [with V = std::nullptr_t; E = std::unique_ptr<unsigned int>; Enable = void]’ at ../../src/pvxs/sharedArray.h:288:39,
    inlined from ‘void {anonymous}::testComplex()’ at ../testshared.cpp:225:57:
../../src/pvxs/sharedArray.h:92:35: note: call to ‘void operator delete [](void*, std::size_t)’ here
   92 |     void operator()(E* e) const { delete[] e; }
      |                                   ^~~~~~~~~~
2023-07-17 09:30:37 -07:00
Michael Davidsaver a02b6e9730 ioc: improve long string detection
Partially replicate the '$' handling logic of dbChannelCreate()
in the case where no '$' was provided.
2023-06-18 10:07:16 -07:00
Michael Davidsaver f260fa2774 fix shared_array output limit off by one 2023-06-18 10:07:16 -07:00
Michael Davidsaver 2a83e49ae7 redo tree formatting 2023-06-18 10:07:16 -07:00
Michael Davidsaver 90dcfa138a fix spam test 2023-05-16 20:58:01 -07:00
Michael Davidsaver 997f0758e1 fix testqgroup 2023-05-12 13:05:11 -07:00
Michael Davidsaver 7aae179fae client: test discover() 2023-05-12 09:29:25 -07:00
Michael Davidsaver 2518420706 client: test reconnection and reExecGet() 2023-05-12 09:29:25 -07:00
Michael Davidsaver f25c3b41ec test name server 2023-05-12 09:29:25 -07:00
Michael Davidsaver 08bc533c09 test serversrc 2023-05-12 09:29:25 -07:00
Michael Davidsaver a36dd2a9cc fix monitor pipeline and finish() 2023-05-12 09:29:25 -07:00
Michael Davidsaver af3c870b7a Value::copyIn() add Array -> Array w/ implied alloc+convert 2023-05-11 10:50:08 -07:00
Michael Davidsaver 4029f5ac3c prevent simple Any self-assignment 2023-05-11 10:50:08 -07:00
Michael Davidsaver afafa09547 ioc: revise qsrv 2 prototype
ioc: check for mis-matched onStartSubscription()/onDisableSubscription()

ioc: fix subscription lifetime

ioc: catch exceptions in dbEvent callbacks

ioc: avoid unnecessary virtual

ioc: minor

ioc: fix qsrv -S

ioc: qsrvGroupSourceInit() catch+log

ioc: runOnServer avoid std::function

ioc: cleanup and simplifications.

Avoid some redundant std::map lookups.
Make Group partially const to prevent implicit ctor.

ioc: avoid typedefs only used once

ioc: overhaul Group::show().  shows triggers

ioc: MappingType

ioc: pvxsgl -> pvxgl

ioc: separate group config singleton from server singleton

ioc: remove unnecessary forward declarations

ioc: restructure pvxsInitHook

ioc: qsrv runtime disable by default

ioc: compat w/ older Base

ioc: link pvxsIoc w/ DB libs

ioc: Channel proper detection of invalid PV

ioc: no need to keep vector<dbCommon*> around

ioc: fix initial group update for mappings w/o dbChannel

ioc: redo testing

split out group tests, only run with Base >= 7.0

ioc: minor

ioc: loc_bad_alloc

ioc: avoid symbol/DTYP clash with pva2pva

ioc: test record alias in group json

ioc: test put failure when SPC_NOMOD and DISP=1

ioc: test channel filters

ioc: unnecessary capture

ioc: avoid sharing Value between multiple subscriptions

It is possible to create two subscriptions through the same channel.

ioc: group subscription include queueSize

ioc: eliminate unused atomicMonitor

ioc: consolidate GroupSource::get()

avoid some indirection

ioc: pvRequest override of atomicPutGet

ioc: fix group non-atomic put

ioc: test asTrap hooks

ioc: test putOrder also sets field order

ioc: simplify GroupConfigProcessor::loadConfigFiles()

Also ensure that groupMapMutex is held

ioc: testqgroup cover JSON def.

ioc: dbLoadGroup() use macros

ioc: pvxsl() take integer argument

ioc: display.form and info(Q:form

ioc: "NO_ALARM" -> ""

ioc: use dbServer

at least for informational callbacks.

ioc: consolidate createRequestAndSubscriptionHandlers()

ioc: eliminate ChannelAndLock

properties dbChannel doesn't need a separate DBManyLock

ioc: test that putOrder also controls field order

ioc: MappingType -> MappingInfo

Handle info(Q:time:tag
Add +type:"const"

ioc: cleanup includes

ioc: test dbNotifyCancel()

ioc: inline checkForTrailingCommentsAtEnd()
2023-05-09 22:24:05 -07:00
george-mcintyre 832c76d6e4 ioc: Add long long tests 2023-05-09 10:17:32 -07:00
george-mcintyre 26dbe50f83 ioc: Clear link field before doing group put test 2023-05-09 10:17:32 -07:00
george-mcintyre 019784bd3a ioc: Update group and single subscriptions to bind contexts to subscription not client connection 2023-05-09 10:17:32 -07:00
Michael Davidsaver d2dcad708c ioc: update testioc.cpp 2023-05-09 10:17:32 -07:00
George McIntyre 93e4d3eef3 ioc: qsrv 2 prototype 2023-05-09 10:17:32 -07:00
Michael Davidsaver 5897fe273e fix intermittent of testsock
Switch to blocking socket, with poll()ing for expected RX failures.
2023-04-14 10:14:30 -07:00
Michael Davidsaver 0fdfeb72d1 Add testudpfwd 2023-04-10 08:47:15 -07:00
Michael Davidsaver a012b9ffe0 testStrEq() better diff 2023-03-28 15:21:39 -07:00
Michael Davidsaver 303bc61079 apply loc_bad_alloc to owned_ptr
Distinguish location of owned_ptr failure
2023-03-28 15:21:39 -07:00
Michael Davidsaver abeb78a9cd fix TypeDef(const Value& val) for Union/UnionA/StructA 2023-03-20 09:41:41 -07:00
Michael Davidsaver 36e537e479 appease -Wnoexcept 2023-03-20 09:41:41 -07:00
Michael Davidsaver f4069ef596 expand testing of shared_array::convertTo 2023-02-13 07:42:54 -08:00
Michael Davidsaver e93909cf7e fix shared_array::convertTo() 2023-02-12 08:26:50 -08:00
Michael Davidsaver 274133bcfc ~fix magic union autoselect
Stop of after first successful conversion
2023-02-12 08:26:50 -08:00
Michael Davidsaver a613778471 expand test coverage 2023-02-12 08:26:50 -08:00