-
Notifications
You must be signed in to change notification settings - Fork 1.2k
[collectd 6] Use real collectd metric functions in gpu_sysman plugin tests #4223
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
Conversation
@octo CI fails to unrelated error on "debian10" (although "debian11" passes):
|
git.savannah.gnu.org had transient errors all day. The "Actions" tab has a "re-run failed workflows" button that is quite useful in that situation. |
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.
LGTM
31c67d1
to
8529469
Compare
212ba71
to
3a73d74
Compare
Rebased to to latest (Sorry for the extra pushes, annoyingly my local and CI @octo I had to downgrade one warning in my own tests due to this:
I do not see what GCC could be complaining about |
6b55c5b
to
b8483f3
Compare
I hadn't understood how collectd code handles system includes (= nearly all code relies on them being included from collectd.h, but that happens only when HAVE_CONFIG_H is defined, i.e. configure has generated config.h etc). => Reverted my include addition commits, cleaned up those from test-code, and documented how tests should be run manually. |
b8483f3
to
9459fc0
Compare
Current version is failing because
=> Trying to include real I guess I'll next need to try how badly testing breaks if tester is instead linked with Looking at |
That is was libplugin_mock.la needs to become IMHO – a drop-in replacement for the daemon to test plugins. That's for example why I recently threw out the mocked/faked "cache" implementation and linked with the real one instead. By linking with the "real" implementation tests can now cover plugins that require the cache to function. |
8b1412b
to
58f81de
Compare
@octo This works OK again, and your feedback should be handled. As to my removal of (apparently redundant) EDIT: if you'll prefer, I can also squash the other commits to a single one before merging. |
584ca69
to
8a36918
Compare
Drop most mocked functions and use real ones by linking libcommon.la. This required mocking few other functions that it refers (but does not link). Support for a build including relevant C-files directly, e.g. for whole program analysis, is added behind BUILD_STANDALONE define. (It's also a fallback in case libcommon.la later changes to include functionality that tester must override to be able to check correct plugin functionality.) Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
8a36918
to
896eaa3
Compare
Dropped the extra |
ChangeLog: gpu_sysman plugin: Use real collectd metric functions unit tests.
There have been lot of changes in metric handling code, so it's better to use real metric functions rather than mocked ones.
This allows removing the mock functions, but makes it much easier for unrelated changes to break
gpu_sysman_test.c
compilation (e.g .utf-8 support already broke earlier version of this).