On Mon, Apr 10, 2023 at 08:40:34PM +0200, Greg Kroah-Hartman wrote:Would it be possible to switch to in-kernel tests, such as KUnit? If it's
On Mon, Apr 10, 2023 at 08:00:33AM -0400, Michael S. Tsirkin wrote:
On Mon, Apr 10, 2023 at 08:28:45PM +0900, Shunsuke Mie wrote:container_of_const() is in 6.2.
Fix the build dependency for virtio_test. The virtio_ring that is used fromThis is only for next right? That's where container_of_const
the test requires container_of_const(). Change to use container_of.h kernel
header directly and adapt related codes.
Signed-off-by: Shunsuke Mie <mie@xxxxxxxxxx>
things are I think ...
Absolutely but the patch switching virtio to that is not there.
Because it's doing a very weird hack: building some kernelWhy is this needed?---
tools/include/linux/types.h | 1 -
tools/virtio/linux/compiler.h | 2 ++
tools/virtio/linux/kernel.h | 5 +----
tools/virtio/linux/module.h | 1 -
tools/virtio/linux/uaccess.h | 11 ++---------
5 files changed, 5 insertions(+), 15 deletions(-)
diff --git a/tools/include/linux/types.h b/tools/include/linux/types.h
index 051fdeaf2670..f1896b70a8e5 100644
--- a/tools/include/linux/types.h
+++ b/tools/include/linux/types.h
@@ -49,7 +49,6 @@ typedef __s8 s8;
#endif
#define __force
-#define __user
While I understand your need to not want to duplicate code, what in the#define __must_check
#define __cold
diff --git a/tools/virtio/linux/compiler.h b/tools/virtio/linux/compiler.h
index 2c51bccb97bb..1f3a15b954b9 100644
--- a/tools/virtio/linux/compiler.h
+++ b/tools/virtio/linux/compiler.h
@@ -2,6 +2,8 @@
#ifndef LINUX_COMPILER_H
#define LINUX_COMPILER_H
+#include "../../../include/linux/compiler_types.h"
world is this doing? Why not use the in-kernel compiler.h instead? Why
are you copying loads of .h files into tools/virtio/? What is this for
and why not just use the real files so you don't have to even attempt to
try to keep things in sync (hint, they will always be out of sync.)
code into a userspace binary, used for just for testing.
This is all not part of kernel build intentionally, no
one is supposed to use this binary in production, but
it was helpful in finding bugs in virtio core in the past
so I keep it around.