* [PATCH] multipath-tools test: add missing include for stdint.h
@ 2025-07-21 17:28 Funda Wang
2025-07-21 20:39 ` Benjamin Marzinski
0 siblings, 1 reply; 2+ messages in thread
From: Funda Wang @ 2025-07-21 17:28 UTC (permalink / raw)
To: dm-devel; +Cc: bmarzins, mwilck
[-- Attachment #1.1: Type: text/plain, Size: 1425 bytes --]
When building multipath-tools with cmocka 1.1.8. it produces following
error when make test:
In file included from test-log.c:6:
test-log.c: In function '__wrap_dlog':
test-log.c:24:20: error: 'uintptr_t' undeclared (first use in this function)
24 | expected = mock_ptr_type(char *);
| ^~~~~~~~~~~~~
test-log.c:10:1: note: 'uintptr_t' is defined in header '<stdint.h>'; did
you forget to '#include <stdint.h>'?
9 | #include "debug.h"
+++ |+#include <stdint.h>
10 |
test-log.c:24:20: note: each undeclared identifier is reported only once
for each function it appears in
24 | expected = mock_ptr_type(char *);
| ^~~~~~~~~~~~~
test-log.c:24:20: error: expected ')' before '_mock'
24 | expected = mock_ptr_type(char *);
| ^~~~~~~~~~~~~
test-log.c:24:20: note: to match this '('
24 | expected = mock_ptr_type(char *);
| ^~~~~~~~~~~~~
make[1]: *** [Makefile:74: test-log.o] Error 1
rm parser.o.wrap dmevents.o.wrap hwtable.o.wrap uevent.o.wrap
blacklist.o.wrap util.o.wrap
make[1]: Leaving directory
'/home/lkp/rpmbuild/BUILD/multipath-tools-0.9.5/tests'
make: *** [Makefile:121: test] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.7qc9Bd (%check)
The attached patch solved this issue. Thanks.
GitHub pull request: https://github.com/opensvc/multipath-tools/pull/117
[-- Attachment #1.2: Type: text/html, Size: 1834 bytes --]
[-- Attachment #2: multipath-tools-add-missing-include-for-cmocka.patch --]
[-- Type: application/octet-stream, Size: 569 bytes --]
From 10e1010bfc7f683ddac6680f33491c6b59a1841f Mon Sep 17 00:00:00 2001
From: Funda Wang <fundawang@yeah.net>
Date: Mon, 21 Jul 2025 11:26:08 +0800
Subject: [PATCH] multipath-tools test: add missing include for stdint.h
---
tests/test-log.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/test-log.c b/tests/test-log.c
index 635169994..4f6699568 100644
--- a/tests/test-log.c
+++ b/tests/test-log.c
@@ -2,6 +2,7 @@
#include <stddef.h>
#include <stdarg.h>
#include <stdio.h>
+#include <stdint.h>
#include <string.h>
#include <cmocka.h>
#include "log.h"
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] multipath-tools test: add missing include for stdint.h
2025-07-21 17:28 [PATCH] multipath-tools test: add missing include for stdint.h Funda Wang
@ 2025-07-21 20:39 ` Benjamin Marzinski
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Marzinski @ 2025-07-21 20:39 UTC (permalink / raw)
To: Funda Wang; +Cc: dm-devel, mwilck
On Tue, Jul 22, 2025 at 01:28:33AM +0800, Funda Wang wrote:
> When building multipath-tools with cmocka 1.1.8. it produces following
> error when make test:
>
> In file included from test-log.c:6:
> test-log.c: In function '__wrap_dlog':
> test-log.c:24:20: error: 'uintptr_t' undeclared (first use in this function)
> 24 | expected = mock_ptr_type(char *);
> | ^~~~~~~~~~~~~
> test-log.c:10:1: note: 'uintptr_t' is defined in header '<stdint.h>'; did
> you forget to '#include <stdint.h>'?
> 9 | #include "debug.h"
> +++ |+#include <stdint.h>
> 10 |
> test-log.c:24:20: note: each undeclared identifier is reported only once
> for each function it appears in
> 24 | expected = mock_ptr_type(char *);
> | ^~~~~~~~~~~~~
> test-log.c:24:20: error: expected ')' before '_mock'
> 24 | expected = mock_ptr_type(char *);
> | ^~~~~~~~~~~~~
> test-log.c:24:20: note: to match this '('
> 24 | expected = mock_ptr_type(char *);
> | ^~~~~~~~~~~~~
> make[1]: *** [Makefile:74: test-log.o] Error 1
> rm parser.o.wrap dmevents.o.wrap hwtable.o.wrap uevent.o.wrap
> blacklist.o.wrap util.o.wrap
> make[1]: Leaving directory
> '/home/lkp/rpmbuild/BUILD/multipath-tools-0.9.5/tests'
> make: *** [Makefile:121: test] Error 2
> error: Bad exit status from /var/tmp/rpm-tmp.7qc9Bd (%check)
>
> The attached patch solved this issue. Thanks.
>
> GitHub pull request: https://github.com/opensvc/multipath-tools/pull/117
Looks good, but for future reference, it's easier to apply if the patch
is inline ("git format-patch" and "git send-email" will make sure it's
in the proper form. We use the same email workflow as the linux kernel,
so you can look at linux kernel patch submission instructions for
how to use git to submit patches). But thanks for the fix.
Reviewed-by: Benjamin Marzinski <bmarzins@redhat.com>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-21 20:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21 17:28 [PATCH] multipath-tools test: add missing include for stdint.h Funda Wang
2025-07-21 20:39 ` Benjamin Marzinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).