Open
Conversation
|
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
…n test log; move the message to before the tested library method Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
… help with console logs on WIN32 test runs Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…_device is safe to use Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
…ALID_REQUEST_LENGTH is initialized correctly with constexpr Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
dae2dc6 to
670d4e0
Compare
|
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
…est_title[] Signed-off-by: Jim Klimov <jimklimov@gmail.com>
|
We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, please fill https://forms.gle/5635zjphDo5JEJQSA to get added. Your document will be manually checked by the maintainer. Be patient... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Another part of work, done in NUT fork of libmodbus as a subset of networkupstools#3, ripe for up-streaming to minimize context differences for eventual RTU USB contribution as such.
This PR focuses on usability of the libmodbus test suite to investigate problems seen by
make checkin diverse platform builds (including FreeBSD, OpenBSD, a couple of illumos/Solaris distros, MacOS+HomeBrew, Linux, Linux+MinGW and MSYS2 for Windows target).This selection of commits does not include any major attempts to fix the issues seen on those workers, but rather a large mostly cosmetic change set to represent the test progress:
tests/unit-test-client.c, aTEST_TITLE()macro was introduced to report the beginning of a test case, so that subsequent error messages issued by the library methods called byunit-test-clientcan be attributed to this test case and aid in troubleshooting. The title string is remembered aslast_test_title[]and reported in subsequent success or failure ofASSERT_TRUE()message(s). Program text was reshuffled to begin the test cases with the title, and adapt the wording where needed, but there should not be any functional changes in the test cases just yet.tests/unit-test.h.inandtests/unit-test-client.c, aFLUSHOUT()macro was introduced to facilitate debugging in Windows (GitBASH) console which tends to fluctuate between flushing out every character (so messing up reports from test server and client writing to same console) to buffering and only flushing every 4KB or so.cat's seems to have helped the situation a lot more than peppering the code with flushing or even configuring the behavior withsetvbuf, as explored in the fork's original PR.tests/unit-test-server.c, added clearer logging about reasons of test set-up failure, if it happens.tests/unit-test-server.candtests/unit-test-client.c(withip_or_device) and intests/unit-test.h.in(withUT_BITS_ADDRESS_VAL), a few C fixes landed to help with some compilers and their view on standards and static analysis.FYI: PR #792 seems like a useful addition to the test suite as well, although that case did not pop out in my experiments.
NOTE: CLA form posted a few weeks ago, ignored so far.