-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge Fixes for physical test #45
base: master
Are you sure you want to change the base?
Conversation
…tate for physical test for swtbahn-full
testsuite_stopBidib(); | ||
printf("testsuite: SIGINT - stopping libbidib \n"); | ||
printf("testsuite: SIG %d - libbidib stopped.\n", signum); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of printing the signal code, you could use strsignal
or sys_signame
to print the signal name: https://stackoverflow.com/a/16509837
point_check &= testsuite_check_point_aspect("point12", "normal"); | ||
point_check &= testsuite_check_point_aspect("point10", "reverse"); | ||
point_check &= testsuite_check_point_aspect("point9", "reverse"); | ||
point_check &= testsuite_check_point_aspect("point11", "reverse"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a helper function should be defined that does the switching and checking of points: it takes a list of points and a corresponding list of aspects, it calls testsuite_switch_point
on each pair of point-aspect, it sleeps for POINT_WAITING_TIME_S
seconds, and then it calls testsuite_check_point_aspect
on each pair of point-aspect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely. I've done something like that when I implemented the physical tests in libbidib-cpp.
The reason I haven't done it here is that I don't really want to malloc all that stuff; and whilst it is technically possible to do it just statically (as the strings are all known already), I don't remember how to do that correctly when arrays of strings are involved, from a syntax standpoint 😅 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh. It's much easier than I expected! Good news. As there are only 2 aspects, that part doesnt even need to be a parameter.
I know that this is just a draft, but I left a few comments |
…evel of waiting for space in queue.
I finally found something wrt. the temporary lockups. And that is: the systemd journald Based on the configuration options described in here, I'll test some optimizations while keeping the sync interval to 20s.
Regarding the experimental observer I added, it is working well (with no noticable overhead). However, now that the freezes are pretty much gone, its unclear if its really needed anymore. I'll probably keep it and add the observing to the other parts of the physical test. |
Nice find! |
Closes #44
Currently a draft as we have to actually run these improved physical tests still.
Note: there's a fix contained in that branch for historical reasons, which is about a compiler warning wrt. a potentially uninitialized var.