Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue. Enable CONFIG_XDP_SOCKETS for
selftests/drivers/net tests, as well.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
ect));
\
if (got != *expect) {
\
- KUNIT_FAIL(test,
\
- "%s:%d: vsscanf(\"%s\", \"%s\", ...)
expect
Convert the scanf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Reviewed-by: David Gow
Signed-off-by: Tamir Duberstein
---
M
This improves the failure output by pointing to the failing line at the
top level of the test.
Signed-off-by: Tamir Duberstein
---
lib/test_scanf.c | 66
1 file changed, 33 insertions(+), 33 deletions(-)
diff --git a/lib/test_scanf.c b
This is one of just 3 remaining "Test Module" kselftests (the others
being bitmap and printf), the rest having been converted to KUnit. In
addition to the enclosed patch, please consider this an RFC on the
removal of the "Test Module" kselftest machinery.
I tested this usi
> > > tests)?
> > > > If the latter, how are we supposed to answer to the question if the
> > > > failed test
> > > > is from new bunch of cases I hypothetically added or regression of the
> > > > existing
> > > > ones? Witho
On Fri, Feb 14, 2025 at 2:42 AM David Gow wrote:
>
> From: José Expósito
>
> In some cases, we need to call test-only code from outside the test
> case, for example, to mock a function or a module.
>
> In order to check whether we are in a test or not, we need to test if
&g
to the question if the
> > > failed test
> > > is from new bunch of cases I hypothetically added or regression of the
> > > existing
> > > ones? Without this it seems like I need to go through all failures. OTOH
> > > it may
> > > be needed anyw
On 2/13/25 12:58, Michal Luczaj wrote:
> ...
> This does not test datagram vsocks. Even though it hardly matters. VMCI is
> the only transport that features VSOCK_TRANSPORT_F_DGRAM, but it has an
> unimplemented vsock_transport::readskb() callback, making it un
On Fri, Feb 14, 2025 at 4:48 AM Peter Zijlstra wrote:
>
> On Thu, Feb 13, 2025 at 10:42:24AM -0500, Tamir Duberstein wrote:
> > On Thu, Feb 13, 2025 at 6:59 AM Peter Zijlstra wrote:
> > >
> > > On Thu, Feb 13, 2025 at 06:40:20AM -0500, Tamir Duberstein wrote:
>
On Thu, Feb 13, 2025 at 10:42:24AM -0500, Tamir Duberstein wrote:
> On Thu, Feb 13, 2025 at 6:59 AM Peter Zijlstra wrote:
> >
> > On Thu, Feb 13, 2025 at 06:40:20AM -0500, Tamir Duberstein wrote:
> > > Convert this unit test to a KUnit test. This allows the test to bene
From: José Expósito
In some cases, we need to call test-only code from outside the test
case, for example, to mock a function or a module.
In order to check whether we are in a test or not, we need to test if
`CONFIG_KUNIT` is set.
Unfortunately, we cannot rely only on this condition because
On Thu, 13 Feb 2025 19:23:13 + Joe Damato wrote:
> +TEST_GEN_PROGS := xdp_helper
TEST_GET_PROGS is for self-contained tests
TEST_GEN_FILES is the right variable for building helpers
--
pw-bot: cr
Hi Antonio,
kernel test robot noticed the following build errors:
[auto build test ERROR on 39f54262ba499d862420a97719d2f0eea0cbd394]
url:
https://github.com/intel-lab-lkp/linux/commits/Antonio-Quartulli/net-introduce-OpenVPN-Data-Channel-Offload-ovpn/20250211-091029
base
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue. Enable CONFIG_XDP_SOCKETS for
selftests/drivers/net tests, as well.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
On Thu, Feb 13, 2025 at 6:59 AM Peter Zijlstra wrote:
>
> On Thu, Feb 13, 2025 at 06:40:20AM -0500, Tamir Duberstein wrote:
> > Convert this unit test to a KUnit test. This allows the test to benefit
> > from the KUnit tooling. Note that care is taken to avoid test-ending
> &
On Thu, Feb 13, 2025 at 06:40:20AM -0500, Tamir Duberstein wrote:
> Convert this unit test to a KUnit test. This allows the test to benefit
> from the KUnit tooling. Note that care is taken to avoid test-ending
> assertions in worker threads, which is unsafe in KUnit (and wasn't done
Verify that for a connectible AF_VSOCK socket, merely having a transport
assigned is insufficient; socket must be connected for the sockmap to
accept.
This does not test datagram vsocks. Even though it hardly matters. VMCI is
the only transport that features VSOCK_TRANSPORT_F_DGRAM, but it has an
Convert this unit test to a KUnit test. This allows the test to benefit
from the KUnit tooling. Note that care is taken to avoid test-ending
assertions in worker threads, which is unsafe in KUnit (and wasn't done
before this change either).
Signed-off-by: Tamir Duberstein
---
I tested this
Hi Antonio,
kernel test robot noticed the following build errors:
[auto build test ERROR on 39f54262ba499d862420a97719d2f0eea0cbd394]
url:
https://github.com/intel-lab-lkp/linux/commits/Antonio-Quartulli/net-introduce-OpenVPN-Data-Channel-Offload-ovpn/20250211-091029
base
On Tue, Feb 11, 2025 at 12:26 PM Tamir Duberstein wrote:
>
> > Is it me who cut something or the above missing this information (total
> > tests)?
> > If the latter, how are we supposed to answer to the question if the failed
> > test
> > is from new bunch o
On Wed, Feb 12, 2025 at 09:33:46AM -0500, Tamir Duberstein wrote:
> >
>
> As an aside, how can I compile with the warning settings used by
> kernel test robot?
>
This is a Smatch warning.
https://github.com/error27/smatch
https://github.com/error27/smatch/blob/master/Docume
Hi Dan,
On Wed, Feb 12, 2025 at 6:53 AM Dan Carpenter wrote:
>
> Hi Tamir,
>
> kernel test robot noticed the following build warnings:
>
> url:
> https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/ww_mutex-convert-self-test-to-KUnit/2
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue. Enable CONFIG_XDP_SOCKETS for
selftests/drivers/net tests, as well.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
gt; +1 this we need for sure
OK will do.
> > > I wonder if that's a separate issue though?
> > >
> > > In other words: maybe writing the test as I've mentioned above so it
> > > works regardless of whether CONFIG_XDP_SOCKETS is set or not is a
> > &
Create a test for the robust list mechanism. Test the following uAPI
operations:
- Creating a robust mutex where the lock waiter is wake by the kernel
when the lock owner died
- Setting a robust list to the current task
- Getting a robust list from the current task
- Getting a robust list from
Hi Tamir,
kernel test robot noticed the following build warnings:
url:
https://github.com/intel-lab-lkp/linux/commits/Tamir-Duberstein/ww_mutex-convert-self-test-to-KUnit/20250211-000245
base: a64dcfb451e254085a7daee5fe51bf22959d52d3
patch link:
https://lore.kernel.org/r/20250210
XDP programs loaded on egress is tested by test_xdp_redirect_multi.sh
but not by the test_progs framework.
Add a test case in test_xdp_veth.c to test the XDP program on egress.
Use the same BPF program than test_xdp_redirect_multi.sh that replaces
the source MAC address by one provided through a
On Wed, 12 Feb 2025 at 06:43, Tamir Duberstein wrote:
>
> On Tue, Feb 11, 2025 at 5:38 PM Boqun Feng wrote:
> >
> > Hi Tamir,
>
> Hi Boqun, thanks for taking a look.
>
> > On Mon, Feb 10, 2025 at 10:59:12AM -0500, Tamir Duberstein wrote:
> > &
reading
> >> >> code using those KUNIT macros quite hard, because I'm not familiar with
> >> >> those macros and when I try to look up what they do they turn out to be
> >> >> defined in terms of other KUNIT macros 10 levels deep.
> >> >&
ore clear. My suggestion is to add
> CONFIG_XDP_SOCKETS to tools/testing/selftests/drivers/net/config
> to make your new testcase run in a proper environment with XSKs enabled.
+1 this we need for sure
> > I wonder if that's a separate issue though?
> >
> > In ot
Hello:
This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski :
On Sat, 08 Feb 2025 14:26:43 -0500 you wrote:
> Convert this very simple smoke test to a KUnit test.
>
> Add a missing `htons` call that was spotted[0] by kernel test robot
> after initial convers
; > > > > On 2/10/25 8:38 PM, Joe Damato wrote:
>
> [...]
>
> > > > >
> > > > > This causes self-test failures:
> > > > >
> > > > > https://netdev-3.bots.linux.dev/vmksft-net-drv/results/987742/4-queues-py/stdout
On Tue, Feb 11, 2025 at 5:38 PM Boqun Feng wrote:
>
> Hi Tamir,
Hi Boqun, thanks for taking a look.
> On Mon, Feb 10, 2025 at 10:59:12AM -0500, Tamir Duberstein wrote:
> > Convert this unit test to a KUnit test.
> >
>
> I would like to know the pros and cons between k
Hi Tamir,
On Mon, Feb 10, 2025 at 10:59:12AM -0500, Tamir Duberstein wrote:
> Convert this unit test to a KUnit test.
>
I would like to know the pros and cons between kunit tests and
kselftests, maybe someone Cced can answer that? It'll be good to put
these in the commit log as wel
0/25 8:38 PM, Joe Damato wrote:
[...]
> > > >
> > > > This causes self-test failures:
> > > >
> > > > https://netdev-3.bots.linux.dev/vmksft-net-drv/results/987742/4-queues-py/stdout
> > > >
> > > > but I really haven't done any real inve
in queues:
> > > > +if q['id'] == 0:
> > > > +if q['type'] == 'rx':
> > > > +rx = True
> > > > + if q['type'] == 'tx':
> > > > +tx = Tr
> > +rx = True
> > > +if q['type'] == 'tx':
> > > +tx = True
> > > +
> > > +ksft_eq(q['xsk'], {})
> > > +else:
> > > +if 'xsk
Add doorbell test case.
Signed-off-by: Frank Li
---
change from v14 to v15
- none
change from v13 to v14
- merge to selftests framework
---
.../selftests/pci_endpoint/pci_endpoint_test.c | 25 ++
1 file changed, 25 insertions(+)
diff --git a/tools/testing/selftests
AR_5,
+ NO_BAR = -1,
};
struct pci_endpoint_test {
@@ -829,6 +842,71 @@ static int pci_endpoint_test_set_irq(struct
pci_endpoint_test *test,
return 0;
}
+static int pci_endpoint_test_doorbell(struct pci_endpoint_test *test)
+{
+ struct pci_dev *pdev = test->pdev;
+ s
ci_epc_get_next_free_bar(epf_test->epc_features,
epf_test->test_reg_bar + 1);
+ if (bar < BAR_0 || bar == epf_test->test_reg_bar || !epf->db_msg) {
+ reg->status |= STATUS_DOORBELL_ENABLE_FAIL;
+ return;
+ }
+
+ ret = request_irq(e
On Tue, Feb 11, 2025 at 6:34 AM Tamir Duberstein wrote:
>
> https://lore.kernel.org/all/20250210-printf-kunit-convert-v3-1-ee6ac5500...@gmail.com/
>
> Weirdly the cover letter seems to be missing on lore, should I resend?
It's there now.
https://lore.kernel.org/all/20250210-printf-kunit-convert-v
+for q in queues:
> > +if q['id'] == 0:
> > +if q['type'] == 'rx':
> > +rx = True
> > +if q['type'] == 'tx':
> > +tx = True
> > +
> > +
t; > > On Tue, Feb 11, 2025 at 10:40 AM Andy Shevchenko
> > > > wrote:
> > > > > On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote:
>
> ...
>
> > > > > > - Use original test assertions as KUNIT_*_EQ_MSG produces
> &
gt; > > > On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote:
...
> > > > > - Use original test assertions as KUNIT_*_EQ_MSG produces
> > > > > hard-to-parse
> > > > > messages. The new failure output is:
> > > &
On Tue, Feb 11, 2025 at 11:38 AM Kees Cook wrote:
>
> On Tue, Feb 11, 2025 at 06:51:09AM -0500, Tamir Duberstein wrote:
> > Kees, it looks like the private header didn't make it to your tree.
> > This bit is missing:
>
> Whoops! Thanks. I've added it (and fixed the comment style).
>
> I really nee
On Tue, Feb 11, 2025 at 06:51:09AM -0500, Tamir Duberstein wrote:
> Kees, it looks like the private header didn't make it to your tree.
> This bit is missing:
Whoops! Thanks. I've added it (and fixed the comment style).
I really need to do my build/run testing from a fresh checkout instead
of in
On Tue, Feb 11, 2025 at 11:06 AM Petr Mladek wrote:
>
> On Tue 2025-02-11 06:45:07, Tamir Duberstein wrote:
> > On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek wrote:
> > >
> > > On Mon 2025-02-10 13:13:48, Tamir Duberstein wrote:
> > > > Con
On Tue 2025-02-11 06:45:07, Tamir Duberstein wrote:
> On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek wrote:
> >
> > On Mon 2025-02-10 13:13:48, Tamir Duberstein wrote:
> > > Convert the scanf() self-test to a KUnit test.
> > >
> > > In the interest of keepi
> ...
>
> > > > - Use original test assertions as KUNIT_*_EQ_MSG produces hard-to-parse
> > > > messages. The new failure output is:
> > >
> > > It would be good if you put into cover letter, or even in the respectful
> > > patch
>
On Tue, Feb 11, 2025 at 10:47:03AM -0500, Tamir Duberstein wrote:
> On Tue, Feb 11, 2025 at 10:40 AM Andy Shevchenko
> wrote:
> > On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote:
...
> > > - Use original test assertions as KUNIT_*_EQ_MSG produces hard-to-p
On Tue, Feb 11, 2025 at 10:40 AM Andy Shevchenko
wrote:
>
> On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote:
> > This is one of just 3 remaining "Test Module" kselftests (the others
> > being bitmap and printf), the rest having been converted to K
On Tue, Feb 11, 2025 at 10:13:36AM -0500, Tamir Duberstein wrote:
> This is one of just 3 remaining "Test Module" kselftests (the others
> being bitmap and printf), the rest having been converted to KUnit. In
> addition to the enclosed patch, please consider this an RFC on t
On Tue, Feb 11, 2025 at 9:47 AM Simon Horman wrote:
>
> On Fri, Feb 07, 2025 at 06:38:41PM -0500, Tamir Duberstein wrote:
> > Convert this very simple smoke test to a KUnit test.
>
> Hi Tamir,
>
> I think some text explaining why this change is being made is
> warrant
Convert the scanf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Reviewed-by: David Gow
Signed-off-by: Tamir Duberstein
---
M
if (got != *expect) {
\
- KUNIT_FAIL(test,
\
- "vsscanf(\"%s\", \"%s\", ...) expected "
arg_fmt " got " arg_fmt, \
-
This is one of just 3 remaining "Test Module" kselftests (the others
being bitmap and printf), the rest having been converted to KUnit. In
addition to the enclosed patch, please consider this an RFC on the
removal of the "Test Module" kselftest machinery.
I tested this usi
On Tue, Feb 11, 2025 at 6:54 AM Petr Mladek wrote:
>
> On Mon 2025-02-10 13:13:49, Tamir Duberstein wrote:
> > Use `suite_init` and move some tests into `scanf_test_cases`. This
> > gives us nicer output in the event of a failure.
>
> Hmm, simulate the following fail
On Tue, Feb 11, 2025 at 7:15 AM Andy Shevchenko
wrote:
>
> On Tue, Feb 11, 2025 at 06:45:07AM -0500, Tamir Duberstein wrote:
> > On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek wrote:
> > > On Mon 2025-02-10 13:13:48, Tamir Duberstein wrote:
>
> > > > +
On Fri, Feb 07, 2025 at 06:38:41PM -0500, Tamir Duberstein wrote:
> Convert this very simple smoke test to a KUnit test.
Hi Tamir,
I think some text explaining why this change is being made is
warranted here.
>
> Signed-off-by: Tamir Duberstein
> ---
> I tested this usin
On Tue, Feb 11, 2025 at 06:45:07AM -0500, Tamir Duberstein wrote:
> On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek wrote:
> > On Mon 2025-02-10 13:13:48, Tamir Duberstein wrote:
> > > + kunit_printk(KERN_DEBUG, test, "\"%s\", \"%s\" ->",
On Mon 2025-02-10 13:13:49, Tamir Duberstein wrote:
> Use `suite_init` and move some tests into `scanf_test_cases`. This
> gives us nicer output in the event of a failure.
Hmm, simulate the following failure in the original test module:
diff --git a/lib/test_scanf.c b/lib/test_scanf.c
t; >
> > On Mon, Feb 10, 2025 at 9:37 PM Kees Cook wrote:
> > >
> > > On Sat, Feb 08, 2025 at 09:44:39PM -0500, Tamir Duberstein wrote:
> > > > Extract a private header and convert the prime_numbers self-test to a
> > > > KUnit test. I consider
On Tue, Feb 11, 2025 at 6:37 AM Petr Mladek wrote:
>
> On Mon 2025-02-10 13:13:48, Tamir Duberstein wrote:
> > Convert the scanf() self-test to a KUnit test.
> >
> > In the interest of keeping the patch reasonably-sized this doesn't
> > refactor the tests int
On Mon 2025-02-10 13:13:48, Tamir Duberstein wrote:
> Convert the scanf() self-test to a KUnit test.
>
> In the interest of keeping the patch reasonably-sized this doesn't
> refactor the tests into proper parameterized tests - it's all one big
> test case.
>
>
find reading
> >> >> code using those KUNIT macros quite hard, because I'm not familiar with
> >> >> those macros and when I try to look up what they do they turn out to be
> >> >> defined in terms of other KUNIT macros 10 levels deep.
> >> >
e
> +if q['type'] == 'tx':
> +tx = True
> +
> +ksft_eq(q['xsk'], {})
> +else:
> +if 'xsk' in q:
> +_fail("Check failed: xsk attribute set.")
> +
> +
> those macros and when I try to look up what they do they turn out to be
>> >> defined in terms of other KUNIT macros 10 levels deep.
>> >>
>> >> But that still leaves a few points. First, I really like that "388 test
>> >> cases passed" tally or som
th the fragment "at boot". I think
> > >
> > > IMO, "at boot" is a misnomer, as most tests can be either builtin
> > > or modular.
> >
> > Right.
> >
> > >
> > > > KUNIT is disabled in defconfig, at least on x86_64.
f other KUNIT macros 10 levels deep.
> >>
> >> But that still leaves a few points. First, I really like that "388 test
> >> cases passed" tally or some other free-form summary (so that I can see
> >> that I properly hooked up, compiled, and ran a new testc
t; > On Sat, Feb 08, 2025 at 09:44:39PM -0500, Tamir Duberstein wrote:
> > > Extract a private header and convert the prime_numbers self-test to a
> > > KUnit test. I considered parameterizing the test using
> > > `KUNIT_CASE_PARAM` but didn't see how it was possible
On Mon, Feb 10, 2025 at 9:37 PM Kees Cook wrote:
>
> On Sat, Feb 08, 2025 at 09:44:39PM -0500, Tamir Duberstein wrote:
> > Extract a private header and convert the prime_numbers self-test to a
> > KUnit test. I considered parameterizing the test using
> > `KUNIT_CASE_PARA
On Sat, Feb 08, 2025 at 09:44:39PM -0500, Tamir Duberstein wrote:
> Extract a private header and convert the prime_numbers self-test to a
> KUnit test. I considered parameterizing the test using
> `KUNIT_CASE_PARAM` but didn't see how it was possible since the test
> logic is e
|5 +
tools/testing/selftests/net/ovpn/ovpn-cli.c| 2377
tools/testing/selftests/net/ovpn/tcp_peers.txt |5 +
.../testing/selftests/net/ovpn/test-chachapoly.sh |9 +
tools/testing/selftests/net/ovpn/test-float.sh |9 +
tools/testing/selftests/net
ilable in the kernel-modules-internal package.
To test this you can follow this to install rawhide-vm:
https://developer.fedoraproject.org/tools/virt-builder/about.html
then inside the vm:
yum install kernel-modules-internal
add the kunit.enable=1 to the cmdline
reboot vm
mo
t;>
> >> IMO, "at boot" is a misnomer, as most tests can be either builtin
> >> or modular.
> >
> > Right.
> >
> >>
> >>> KUNIT is disabled in defconfig, at least on x86_64. It is also disabled
> >>> on my Ubuntu 24.04 m
th the fragment "at boot". I think
> > >
> > > IMO, "at boot" is a misnomer, as most tests can be either builtin
> > > or modular.
> >
> > Right.
> >
> > >
> > > > KUNIT is disabled in defconfig, at least on x86_64.
be either builtin
> > or modular.
>
> Right.
>
> >
> > > KUNIT is disabled in defconfig, at least on x86_64. It is also disabled
> > > on my Ubuntu 24.04 machine. If I take your patches, I'll be unable to
>
> OK so I just bought a shiny new test mac
4 machine. If I take your patches, I'll be unable to
OK so I just bought a shiny new test machine, and installed one of the
big name distros on it, hoping they've moved ahead and bought into the kunit
story...
$ grep KUNIT /boot/config-6.8.0-52-generic
# CONFIG_KUNIT is not set
...
Test that queues which are used for AF_XDP have the xsk nest attribute.
The attribute is currently empty, but its existence means the AF_XDP is
being used for the queue.
Signed-off-by: Joe Damato
Suggested-by: Jakub Kicinski
---
v3:
- Change comment style of helper C program to avoid kdoc
#x27;ll be unable to
OK so I just bought a shiny new test machine, and installed one of the
big name distros on it, hoping they've moved ahead and bought into the kunit
story...
$ grep KUNIT /boot/config-6.8.0-52-generic
# CONFIG_KUNIT is not set
...gagghh! No such luck. One more data po
BUF_SIZE 1024
@@ -428,8 +424,11 @@ static void numbers_list_hh(struct kunit *test, const char
*delim)
numbers_list_8(signed char,"0x%hhx", delim, "hhi", check_char);
}
-static void numbers_list(struct kunit *test, const char *delim)
+static void numbers_lis
Convert the scanf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Acked-by: Petr Mladek
Reviewed-by: David Gow
Signed-off-by: Tamir Duberstein
---
M
This is one of just 3 remaining "Test Module" kselftests (the others
being bitmap and printf), the rest having been converted to KUnit. In
addition to the enclosed patch, please consider this an RFC on the
removal of the "Test Module" kselftest machinery.
I tested this usi
On Mon, Feb 10, 2025 at 11:27 AM Geert Uytterhoeven
wrote:
>
> > [...]
> >
> > -static char *test_buffer;
> > -static char *fmt_buffer;
> > +static char test_buffer[BUF_SIZE];
> > +static char fmt_buffer[BUF_SIZE];
>
> Why? This wastes 2 KiB of memo
har *test_buffer;
> -static char *fmt_buffer;
> +static char test_buffer[BUF_SIZE];
> +static char fmt_buffer[BUF_SIZE];
Why? This wastes 2 KiB of memory when the test is not running.
> static struct rnd_state rnd_state;
>
> typedef void (*check_fn)(struct kunit *test, const v
Convert this unit test to a KUnit test.
Signed-off-by: Tamir Duberstein
---
I tested this using:
$ tools/testing/kunit/kunit.py run --arch arm64 --make_options LLVM=1 ww_mutex
On success:
; [12:48:16] == ww_mutex (5 subtests) ===
; [12:48:16
On Sat, Feb 8, 2025 at 2:26 PM Tamir Duberstein wrote:
>
> Convert this very simple smoke test to a KUnit test.
>
> Add a missing `htons` call that was spotted[0] by kernel test robot
> after initial conversion to KUnit.
>
> Link:
> https://lore.kernel.org/oe-kbuild-a
On Mon, Feb 10, 2025 at 10:00 AM Tamir Duberstein wrote:
>
> Convert the scanf() self-test to a KUnit test.
>
> In the interest of keeping the patch reasonably-sized this doesn't
> refactor the tests into proper parameterized tests - it's all one big
> test cas
A task in the kernel (task_mm_cid_work) runs somewhat periodically to
compact the mm_cid for each process. Add a test to validate that it runs
correctly and timely.
The test spawns 1 thread pinned to each CPU, then each thread, including
the main one, runs in short bursts for some time. During
On Mon, 2025-02-10 at 15:53 +0100, Mathieu Desnoyers wrote:
> On 2025-02-10 08:57, Gabriele Monaco wrote:
> > A task in the kernel (task_mm_cid_work) runs somewhat periodically
> > to
> > compact the mm_cid for each process. Add a test to validate that it
> > ru
On Mon, Feb 10, 2025 at 9:52 AM Geert Uytterhoeven wrote:
>
> Hi Tamir,
>
> On Mon, 10 Feb 2025 at 15:37, Tamir Duberstein wrote:
> > On Mon, Feb 10, 2025 at 8:01 AM Rasmus Villemoes
> > wrote:
> > >
> > > On Fri, Feb 07 2025, Tamir Duberstein wrote:
> > >
> > > [...]
> > >
> > > If/when you do
BUF_SIZE 1024
-static char *test_buffer;
-static char *fmt_buffer;
+static char test_buffer[BUF_SIZE];
+static char fmt_buffer[BUF_SIZE];
static struct rnd_state rnd_state;
typedef void (*check_fn)(struct kunit *test, const void *check_data, const
char *string,
@@ -428,8 +423,11 @@ static void
Convert the scanf() self-test to a KUnit test.
In the interest of keeping the patch reasonably-sized this doesn't
refactor the tests into proper parameterized tests - it's all one big
test case.
Acked-by: Petr Mladek
Reviewed-by: David Gow
Signed-off-by: Tamir Duberstein
---
M
This is one of just 3 remaining "Test Module" kselftests (the others
being bitmap and printf), the rest having been converted to KUnit. In
addition to the enclosed patch, please consider this an RFC on the
removal of the "Test Module" kselftest machinery.
I tested this usi
On 2025-02-10 08:57, Gabriele Monaco wrote:
A task in the kernel (task_mm_cid_work) runs somewhat periodically to
compact the mm_cid for each process. Add a test to validate that it runs
correctly and timely.
The test spawns 1 thread pinned to each CPU, then each thread, including
the main one
Hi Tamir,
On Mon, 10 Feb 2025 at 15:37, Tamir Duberstein wrote:
> On Mon, Feb 10, 2025 at 8:01 AM Rasmus Villemoes
> wrote:
> >
> > On Fri, Feb 07 2025, Tamir Duberstein wrote:
> >
> > [...]
> >
> > If/when you do re-roll a v3, can you split the defconfig changes off to
> > a separate patch? It
> --- a/lib/Kconfig.debug
> > +++ b/lib/Kconfig.debug
> > @@ -2427,6 +2427,23 @@ config ASYNC_RAID6_TEST
> > config TEST_HEXDUMP
> > tristate "Test functions located in the hexdump module at runtime"
> >
> > +config PRINTF_KUNIT_TEST
> > +
On Fri, Feb 07 2025, Tamir Duberstein wrote:
> Convert the printf() self-test to a KUnit test.
>
> In the interest of keeping the patch reasonably-sized this doesn't
> refactor the tests into proper parameterized tests - it's all one big
> test case.
>
> Acked
sing those KUNIT macros quite hard, because I'm not familiar with
>> those macros and when I try to look up what they do they turn out to be
>> defined in terms of other KUNIT macros 10 levels deep.
>>
>> But that still leaves a few points. First, I really like that &qu
1 - 100 of 4483 matches
Mail list logo