* [GIT PULL] KUnit fixes update for Linux 6.1-rc3
@ 2022-10-24 16:49 Shuah Khan
2022-10-24 20:06 ` pr-tracker-bot
0 siblings, 1 reply; 2+ messages in thread
From: Shuah Khan @ 2022-10-24 16:49 UTC (permalink / raw)
To: Linus Torvalds
Cc: Brendan Higgins, David Gow, Shuah Khan, linux-kselftest, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1457 bytes --]
Hi Linus,
Please pull the following KUnit fixes update for Linux 6.1-rc3.
This KUnit fixes update for Linux 6.1-rc3 consists of one single fix
to update alloc_string_stream() callers to check for IS_ERR() instead
of NULL to be in sync with alloc_string_stream() returning IS_ERR().
diff for this pull request is attached.
thanks,
-- Shuah
----------------------------------------------------------------
The following changes since commit 9abf2313adc1ca1b6180c508c25f22f9395cc780:
Linux 6.1-rc1 (2022-10-16 15:36:24 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-fixes-6.1-rc3
for you to fetch changes up to 618887768bb71f0a475334fa5a4fba7dc98d7ab5:
kunit: update NULL vs IS_ERR() tests (2022-10-18 15:08:42 -0600)
----------------------------------------------------------------
linux-kselftest-kunit-fixes-6.1-rc3
This KUnit fixes update for Linux 6.1-rc3 consists of one single fix
to update alloc_string_stream() callers to check for IS_ERR() instead
of NULL to be in sync with alloc_string_stream() returning IS_ERR().
----------------------------------------------------------------
Dan Carpenter (1):
kunit: update NULL vs IS_ERR() tests
lib/kunit/string-stream.c | 4 ++--
lib/kunit/test.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------
[-- Attachment #2: linux-kselftest-kunit-fixes-6.1-rc3.diff --]
[-- Type: text/x-patch, Size: 1001 bytes --]
diff --git a/lib/kunit/string-stream.c b/lib/kunit/string-stream.c
index f5ae79c37400..a608746020a9 100644
--- a/lib/kunit/string-stream.c
+++ b/lib/kunit/string-stream.c
@@ -56,8 +56,8 @@ int string_stream_vadd(struct string_stream *stream,
frag_container = alloc_string_stream_fragment(stream->test,
len,
stream->gfp);
- if (!frag_container)
- return -ENOMEM;
+ if (IS_ERR(frag_container))
+ return PTR_ERR(frag_container);
len = vsnprintf(frag_container->fragment, len, fmt, args);
spin_lock(&stream->lock);
diff --git a/lib/kunit/test.c b/lib/kunit/test.c
index 90640a43cf62..2a6992fe7c3e 100644
--- a/lib/kunit/test.c
+++ b/lib/kunit/test.c
@@ -265,7 +265,7 @@ static void kunit_fail(struct kunit *test, const struct kunit_loc *loc,
kunit_set_failure(test);
stream = alloc_string_stream(test, GFP_KERNEL);
- if (!stream) {
+ if (IS_ERR(stream)) {
WARN(true,
"Could not allocate stream to print failed assertion in %s:%d\n",
loc->file,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-10-24 23:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-24 16:49 [GIT PULL] KUnit fixes update for Linux 6.1-rc3 Shuah Khan
2022-10-24 20:06 ` pr-tracker-bot
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®