mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
net: test: Fix printf format specifier in skb_segment kunit test
[ Upstream commitff3b96f2c9
] KUNIT_FAIL() accepts a printf-style format string, but previously did not let gcc validate it with the __printf() attribute. The use of %lld for the result of PTR_ERR() is not correct. Instead, use %pe and pass the actual error pointer. printk() will format it correctly (and give a symbolic name rather than a number if available, which should make the output more readable, too). Fixes:b3098d32ed
("net: add skb_segment kunit test") Signed-off-by: David Gow <davidgow@google.com> Tested-by: Guenter Roeck <linux@roeck-us.net> Reviewed-by: Justin Stitt <justinstitt@google.com> Signed-off-by: Shuah Khan <skhan@linuxfoundation.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
cd36414115
commit
be63556e8c
1 changed files with 1 additions and 1 deletions
|
@ -225,7 +225,7 @@ static void gso_test_func(struct kunit *test)
|
|||
|
||||
segs = skb_segment(skb, features);
|
||||
if (IS_ERR(segs)) {
|
||||
KUNIT_FAIL(test, "segs error %lld", PTR_ERR(segs));
|
||||
KUNIT_FAIL(test, "segs error %pe", segs);
|
||||
goto free_gso_skb;
|
||||
} else if (!segs) {
|
||||
KUNIT_FAIL(test, "no segments");
|
||||
|
|
Loading…
Reference in a new issue