ot;unknown feature");
> - else if (KNOWN_FEATURES & (1u << i))
> + else if (KNOWN_FEATURES & BIT_ULL(u))
^
Should be i. How does this build? :P
regards,
dan carpenter
__ret;
> > > })
> >
> > Sounds good to me, but I'd call them test_malloc, test_calloc, etc. and
> > put them in include/test_util.h
>
> Possibly terrible idea: what if we used kmalloc() and kcalloc()? K is for
> KVM :-)
That's a legit terrible idea... It probably would trigger more static
checker warnings because the general policy is kmalloc() is kernel code
and we *have* to test for errors.
To be honest, I would have just rejected the first patch. You
obviously know this and have said this earlier in the thread but just
for the other people, this is a userspace test that runs for a short
time and then exits. If it gets killed because we don't have enough
memory that's fine. It would be better to just fix the static checker
to not print pointless warnings or educate people to ignore warnings
like this.
Creating the test_malloc() to silence the warning also seems like an
okay idea as well.
regards,
dan carpenter
Thanks!
Acked-by: Dan Carpenter
regards,
dan carpenter
-...@intel.com/config)
compiler: m68k-linux-gcc (GCC) 13.2.0
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot
| Reported-by: Dan Carpenter
| Closes: https://lore.kernel.org/r
On Fri, Jan 12, 2024 at 07:39:14AM +0800, David Gow wrote:
> On Thu, 11 Jan 2024 at 02:55, Dan Carpenter wrote:
> >
> > The kunit_device_register() function doesn't return NULL, it returns
> > error pointers. Change the KUNIT_ASSERT_NOT_NULL() to check for
> > E
The kunit_device_register() function doesn't return NULL, it returns
error pointers. Change the KUNIT_ASSERT_NOT_NULL() to check for
ERR_OR_NULL().
Fixes: d03c720e03bd ("kunit: Add APIs for managing devices")
Signed-off-by: Dan Carpenter
---
It's a pity that t
The root_device_register() function does not return NULL, it returns
error pointers. Fix the check to match.
Fixes: d03c720e03bd ("kunit: Add APIs for managing devices")
Signed-off-by: Dan Carpenter
---
lib/kunit/device.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Life hack: Don't put RFC in the subject. Especially if it's a v2 or
higher. No one reads RFC patches.
This patchset seems like a low risk patch to apply.
regards,
dan carpenter
thing. There are between 2-5 places which do this in the kernel.
2) If it's a API that used to return NULL and it's changed to returning
error pointers. I've never seen anyone do this, but I've proposed it as
a solution to make backporting easier.
regards,
dan carpenter
an
be probed?
I feel like you're not valuing your stuff at the right level. This
shouldn't be in debugfs. It should be a first class citizen in sysfs.
The exact format for this information is slightly tricky and people will
probably debate that. But I think most people will agree that it's
super useful.
regards,
dan carpenter
Your talk was interesting at Linux Plumbers.
https://www.youtube.com/watch?v=oE73eVSyFXQ [time +2:35]
This is probably a stupid question, but why not just add something to
call_driver_probe() which creates a sysfs directory tree with all the
driver information?
regards,
dan carpenter
On Tue, Nov 21, 2023 at 01:32:38AM -0800, Zhu Jun wrote:
> From: zhujun2
>
> The opened file should be closed in main(), otherwise resource
> leak will occur that this problem was discovered by code reading
>
> Signed-off-by: zhujun2
> ---
>
> Hi Dan Carpenter
ort
running programs. It's different for an operating system or a web
server which is expected to have a long uptime. But these programs are
going to run quickly and then exit so resource leaks are not an issue.
regards,
dan carpenter
know
to look for WARN(), lockdep, and KASAN. What other bugs formats do we
have? Probably someone like the syzbot devs have already has written a
script like this?
regards,
dan carpenter
Let me add Richard to the CC list. See lore for more details.
https://lore.kernel.org/all/CA+G9fYuA643RHHpPnz9Ww7rr3zV5a0y=7_uFcybBSL=qp_s...@mail.gmail.com/
On Tue, Oct 31, 2023 at 09:57:48PM +0530, Naresh Kamboju wrote:
> On Mon, 30 Oct 2023 at 14:33, Dan Carpenter wrote:
> >
&g
t; message at the end.
I haven't actually tested this patch... Daniel, do you have a
list of intentional stack traces we could annotate?
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm/tests/drm_rect_test.c | 2 ++
include/kunit/test.h | 3 +++
2 files changed, 5 insertions(+)
_add_action(test, free_suite_set, (void *)free);
279 }
regards,
dan carpenter
te_suite() error: 'test_case->log'
> dereferencing possible ERR_PTR()
>
> Signed-off-by: Richard Fitzgerald
> Reported-by: Dan Carpenter
> Fixes: 05e2006ce493 ("kunit: Use string_stream for test log")
> ---
> lib/kunit/debugfs.c | 29 -
On Tue, Sep 19, 2023 at 02:49:43PM -0400, Rae Moar wrote:
> On Fri, Sep 15, 2023 at 8:58 AM Dan Carpenter
> wrote:
> >
> > Smatch complains that the missing error checks would lead to a crash:
> >
> > lib/kunit/executor_test.c:40 parse_filter_tes
Smatch complains that the missing error checks would lead to a crash:
lib/kunit/executor_test.c:40 parse_filter_test()
error: double free of 'filter.test_glob'
We may as well do it right...
Fixes: a127b154a8f2 ("kunit: tool: allow filtering test cases via glob")
Signed-o
20 matches
Mail list logo