* [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf
@ 2014-09-04 15:07 Shuah Khan
2014-09-04 15:16 ` Pranith Kumar
0 siblings, 1 reply; 3+ messages in thread
From: Shuah Khan @ 2014-09-04 15:07 UTC (permalink / raw)
To: dh.herrmann, akpm, bobby.prani, hughd; +Cc: Shuah Khan, linux-api, linux-kernel
mfd_fail_open() doesn't pass in the buffer to printf resulting
in the following warning:
memfd_test.c: In function ‘mfd_fail_open’:
memfd_test.c:208:3: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
printf("open(%s) didn't fail as expected\n");
^
This change fixes the problem.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
---
tools/testing/selftests/memfd/memfd_test.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/memfd/memfd_test.c b/tools/testing/selftests/memfd/memfd_test.c
index cb5001b..0b9eafb 100644
--- a/tools/testing/selftests/memfd/memfd_test.c
+++ b/tools/testing/selftests/memfd/memfd_test.c
@@ -203,7 +203,7 @@ static void mfd_fail_open(int fd, int flags, mode_t mode)
sprintf(buf, "/proc/self/fd/%d", fd);
r = open(buf, flags, mode);
if (r >= 0) {
- printf("open(%s) didn't fail as expected\n");
+ printf("open(%s) didn't fail as expected\n", buf);
abort();
}
}
--
1.9.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf
2014-09-04 15:07 [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf Shuah Khan
@ 2014-09-04 15:16 ` Pranith Kumar
2014-09-04 15:21 ` Shuah Khan
0 siblings, 1 reply; 3+ messages in thread
From: Pranith Kumar @ 2014-09-04 15:16 UTC (permalink / raw)
To: Shuah Khan
Cc: David Herrmann, Andrew Morton, Hugh Dickins,
open list:KERNEL SELFTEST F...,
LKML
On Thu, Sep 4, 2014 at 11:07 AM, Shuah Khan <shuahkh@osg.samsung.com> wrote:
> mfd_fail_open() doesn't pass in the buffer to printf resulting
> in the following warning:
>
> memfd_test.c: In function ‘mfd_fail_open’:
> memfd_test.c:208:3: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
> printf("open(%s) didn't fail as expected\n");
> ^
>
> This change fixes the problem.
>
> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Hi Shuah,
I already sent in a patch to fix this:
https://lkml.org/lkml/2014/8/31/85
Can you please pick that up?
Thanks!
--
Pranith
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf
2014-09-04 15:16 ` Pranith Kumar
@ 2014-09-04 15:21 ` Shuah Khan
0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2014-09-04 15:21 UTC (permalink / raw)
To: Pranith Kumar
Cc: David Herrmann, Andrew Morton, Hugh Dickins,
open list:KERNEL SELFTEST F...,
LKML
On 09/04/2014 09:16 AM, Pranith Kumar wrote:
> On Thu, Sep 4, 2014 at 11:07 AM, Shuah Khan <shuahkh@osg.samsung.com> wrote:
>> mfd_fail_open() doesn't pass in the buffer to printf resulting
>> in the following warning:
>>
>> memfd_test.c: In function ‘mfd_fail_open’:
>> memfd_test.c:208:3: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=]
>> printf("open(%s) didn't fail as expected\n");
>> ^
>>
>> This change fixes the problem.
>>
>> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
>
> Hi Shuah,
>
> I already sent in a patch to fix this:
>
> https://lkml.org/lkml/2014/8/31/85
>
> Can you please pick that up?
Hi Pranith,
Great. Could you please resend it to me cc'ing linux-api as well.
thanks,
-- Shuah
--
Shuah Khan
Sr. Linux Kernel Developer
Samsung Research America (Silicon Valley)
shuahkh@osg.samsung.com | (970) 217-8978
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-09-04 15:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-04 15:07 [PATCH] selftests/memfd: fix mfd_fail_open() to pass in buf to printf Shuah Khan
2014-09-04 15:16 ` Pranith Kumar
2014-09-04 15:21 ` Shuah Khan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®