Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
ApplicationCore
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ChimeraTK Mirror
ApplicationCore
Commits
465cd69d
Commit
465cd69d
authored
5 years ago
by
Martin Killenberg
Browse files
Options
Downloads
Patches
Plain Diff
improved testPropagateDataFlag::testDataValidPropagationOnException
parent
256a39db
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/executables_src/testPropagateDataFaultFlag.cc
+37
-1
37 additions, 1 deletion
tests/executables_src/testPropagateDataFaultFlag.cc
with
37 additions
and
1 deletion
tests/executables_src/testPropagateDataFaultFlag.cc
+
37
−
1
View file @
465cd69d
...
...
@@ -936,10 +936,46 @@ BOOST_AUTO_TEST_CASE(testDataValidPropagationOnException) {
device2DummyBackend
->
throwExceptionRead
=
true
;
pushInput
.
write
();
// Output should be rewritten and the data valditity should be propagated
// Output should be rewritten
exactly once
and the data valditity should be propagated
CHECK_EQUAL_TIMEOUT
((
deviceStatus
.
readLatest
(),
deviceStatus
),
1
,
10000
);
result
.
read
();
BOOST_CHECK
(
result
.
readLatest
()
==
false
);
// FIXME: This is olde behaviour:
BOOST_CHECK_EQUAL
(
result
,
11
);
// According to the new spec the new value for the push input should have been propagated already:
//BOOST_CHECK_EQUAL(result, 21);
BOOST_CHECK
(
result
.
dataValidity
()
==
ctk
::
DataValidity
::
faulty
);
// triggering once more does not produce any output until the device has recovered
pushInput
=
30
;
pushInput
.
setDataValidity
(
ctk
::
DataValidity
::
ok
);
pushInput
.
write
();
// just a short sleep, waiting for nothing. We will test below that there was nothing when the device recovers
sleep
(
1
);
BOOST_CHECK
(
result
.
readLatest
()
==
false
);
pollRegister
=
3
;
device2DummyBackend
->
throwExceptionRead
=
false
;
// let the device recover
// the 2 from the poll register is never seen...
// /////////////////////////// FIXME: old behaviour. This will go away with the new spec
// The original data is written again, still with faulty as the push input was faulty as well
result
.
read
();
BOOST_CHECK_EQUAL
(
result
,
11
);
BOOST_CHECK
(
result
.
dataValidity
()
==
ctk
::
DataValidity
::
faulty
);
// The 20 at the push input is propagated (together with its faulty flag). It already sees the new value from the poll type
// It's good that this goes away. This combination was never at the souces at the same time.
result
.
read
();
BOOST_CHECK_EQUAL
(
result
,
23
);
BOOST_CHECK
(
result
.
dataValidity
()
==
ctk
::
DataValidity
::
faulty
);
// /////////////////////////// END OF FIXME: old behaviour
// The new, good value arrives
result
.
read
();
BOOST_CHECK_EQUAL
(
result
,
33
);
BOOST_CHECK
(
result
.
dataValidity
()
==
ctk
::
DataValidity
::
ok
);
// nothing more in the queue
BOOST_CHECK
(
result
.
readLatest
()
==
false
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment