Re: [PATCH v3 08/18] objtool: add kunit_try_catch_throw to the noreturn list

2019-05-13 Thread Peter Zijlstra
On Mon, May 13, 2019 at 10:42:42PM -0700, Brendan Higgins wrote: > This fixes the following warning seen on GCC 7.3: > kunit/test-test.o: warning: objtool: kunit_test_unsuccessful_try() falls > through to next function kunit_test_catch() > What is that file and function; no kernel tree near me

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-13 Thread Brendan Higgins
On Sat, May 11, 2019 at 08:17:47AM +0200, Knut Omang wrote: > On Fri, 2019-05-10 at 15:18 -0700, Frank Rowand wrote: > > On 5/10/19 1:54 PM, Brendan Higgins wrote: > > > On Fri, May 10, 2019 at 5:13 AM Knut Omang wrote: > > >> On Fri, 2019-05-10 at 03:23 -0700, Brendan Higgins wrote: > > On F

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-13 Thread Brendan Higgins
On Mon, May 13, 2019 at 04:44:51PM +0200, Daniel Vetter wrote: > On Sat, May 11, 2019 at 01:33:44PM -0400, Theodore Ts'o wrote: > > On Fri, May 10, 2019 at 02:12:40PM -0700, Frank Rowand wrote: > > > However, the reply is incorrect. Kselftest in-kernel tests (which > > > is the context here) can b

[PATCH v3 15/18] Documentation: kunit: add documentation for KUnit

2019-05-13 Thread Brendan Higgins
Add documentation for KUnit, the Linux kernel unit testing framework. - Add intro and usage guide for KUnit - Add API reference Signed-off-by: Felix Guo Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Addressed ref

[PATCH v3 10/18] kunit: test: add tests for kunit test abort

2019-05-13 Thread Brendan Higgins
Add KUnit tests for the KUnit test abort mechanism (see preceding commit). Add tests both for general try catch mechanism as well as non-architecture specific mechanism. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- kunit/Makefile| 3 +-

[PATCH v3 13/18] kunit: tool: add Python wrappers for running KUnit tests

2019-05-13 Thread Brendan Higgins
From: Felix Guo The ultimate goal is to create minimal isolated test binaries; in the meantime we are using UML to provide the infrastructure to run tests, so define an abstract way to configure and run tests that allow us to change the context in which tests are built without affecting the user.

[PATCH v3 16/18] MAINTAINERS: add entry for KUnit the unit testing framework

2019-05-13 Thread Brendan Higgins
Add myself as maintainer of KUnit, the Linux kernel's unit testing framework. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Added linux-kselftest@ as a mailing list entry for KUnit as requested by Shuah. --- M

[PATCH v3 14/18] kunit: defconfig: add defconfigs for building KUnit tests

2019-05-13 Thread Brendan Higgins
Add defconfig for UML and a fragment that can be used to configure other architectures for building KUnit tests. Add option to kunit_tool to use a defconfig to create the kunitconfig. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- arch/um/config

[PATCH v3 18/18] MAINTAINERS: add proc sysctl KUnit test to PROC SYSCTL section

2019-05-13 Thread Brendan Higgins
Add entry for the new proc sysctl KUnit test to the PROC SYSCTL section. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8a91887c8d541..2e539647589fd

[PATCH v3 17/18] kernel/sysctl-test: Add null pointer test for sysctl.c:proc_dointvec()

2019-05-13 Thread Brendan Higgins
From: Iurii Zaikin KUnit tests for initialized data behavior of proc_dointvec that is explicitly checked in the code. Includes basic parsing tests including int min/max overflow. Signed-off-by: Iurii Zaikin Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunt

[PATCH v3 09/18] kunit: test: add support for test abort

2019-05-13 Thread Brendan Higgins
Add support for aborting/bailing out of test cases, which is needed for implementing assertions. An assertion is like an expectation, but bails out of the test case early if the assertion is not met. The idea with assertions is that you use them to state all the preconditions for your test. Logica

[PATCH v3 12/18] kunit: test: add tests for KUnit managed resources

2019-05-13 Thread Brendan Higgins
From: Avinash Kondareddy Add unit tests for KUnit managed resources. KUnit managed resources (struct kunit_resource) are resources that are automatically cleaned up at the end of a KUnit test, similar to the concept of devm_* managed resources. Signed-off-by: Avinash Kondareddy Signed-off-by: B

[PATCH v3 11/18] kunit: test: add the concept of assertions

2019-05-13 Thread Brendan Higgins
Add support for assertions which are like expectations except the test terminates if the assertion is not satisfied. The idea with assertions is that you use them to state all the preconditions for your test. Logically speaking, these are the premises of the test case, so if a premise isn't true,

[PATCH v3 08/18] objtool: add kunit_try_catch_throw to the noreturn list

2019-05-13 Thread Brendan Higgins
This fixes the following warning seen on GCC 7.3: kunit/test-test.o: warning: objtool: kunit_test_unsuccessful_try() falls through to next function kunit_test_catch() Reported-by: kbuild test robot To: Josh Poimboeuf To: Peter Zijlstra Signed-off-by: Brendan Higgins Link: https://www.spinic

[PATCH v3 07/18] kunit: test: add initial tests

2019-05-13 Thread Brendan Higgins
Add a test for string stream along with a simpler example. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Added more Kconfig help text for KUNIT_TEST and KUNIT_EXAMPLE_TEST as per Shuah's comments. --- kunit/Kc

[PATCH v3 04/18] kunit: test: add kunit_stream a std::stream like logger

2019-05-13 Thread Brendan Higgins
A lot of the expectation and assertion infrastructure prints out fairly complicated test failure messages, so add a C++ style log library for for logging test results. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: -

[PATCH v3 02/18] kunit: test: add test resource management API

2019-05-13 Thread Brendan Higgins
Create a common API for test managed resources like memory and test objects. A lot of times a test will want to set up infrastructure to be used in test cases; this could be anything from just wanting to allocate some memory to setting up a driver stack; this defines facilities for creating "test r

[PATCH v3 05/18] kunit: test: add the concept of expectations

2019-05-13 Thread Brendan Higgins
Add support for expectations, which allow properties to be specified and then verified in tests. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Added EXPECT macros for pointer comparison to address issue pointed

[PATCH v3 03/18] kunit: test: add string_stream a std::stream like string builder

2019-05-13 Thread Brendan Higgins
A number of test features need to do pretty complicated string printing where it may not be possible to rely on a single preallocated string with parameters. So provide a library for constructing the string as you go similar to C++'s std::string. Signed-off-by: Brendan Higgins Reviewed-by: Greg

[PATCH v3 06/18] kbuild: enable building KUnit

2019-05-13 Thread Brendan Higgins
Add KUnit to root Kconfig and Makefile allowing it to actually be built. Signed-off-by: Brendan Higgins Reviewed-by: Greg Kroah-Hartman Reviewed-by: Logan Gunthorpe --- Changes Since Last Revision: - Masahiro reported a number of issues here on the previous revision; however, all of the cha

[PATCH v3 01/18] kunit: test: add KUnit test runner core

2019-05-13 Thread Brendan Higgins
Add core facilities for defining unit tests; this provides a common way to define test cases, functions that execute code which is under test and determine whether the code under test behaves as expected; this also provides a way to group together related test cases in test suites (here we call the

[PATCH v3 00/18] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-13 Thread Brendan Higgins
## TLDR I mostly wanted to incorporate feedback I got over the last week and a half. Biggest things to look out for: - KUnit core now outputs results in TAP14. - Heavily reworked tools/testing/kunit/kunit.py - Changed how parsing works. - Added testing. - Greg, Logan, you might want to re-

Re: [EXT] Re: [PATCH v9 00/24] ILP32 for ARM64

2019-05-13 Thread Yuri Norov
+ l...@lists.linux.it > There is a problem with the stack size accounting during execve when > there is no stack limit: > > $ ulimit -s > 8192 > $ ./hello.ilp32 > Hello World! > $ ulimit -s unlimited > $ ./hello.ilp32 > Segmentation fault > $ strace ./hello.ilp32 > execve("./hello.ilp32", ["./h

[PATCH 03/19] cpu topology: Export die_id

2019-05-13 Thread Len Brown
From: Len Brown Export die_id in cpu topology, for the benefit of hardware that has multiple-die/package. Signed-off-by: Len Brown Cc: linux-doc@vger.kernel.org --- Documentation/cputopology.txt | 15 --- drivers/base/topology.c | 4 include/linux/topology.h | 3 +

[PATCH 01/19] x86 topology: Add CPUID.1F multi-die/package support

2019-05-13 Thread Len Brown
From: Len Brown Some new systems have multiple software-visible die within each package. Update Linux parsing of the Intel CPUID "Extended Topology Leaf" to handle either CPUID.B, or the new CPUID.1F. Add cpuinfo_x86.die_id and cpuinfo_x86.max_dies to store the result. die_id will be non-zero

Re: [PATCH v5 11/12] Documentation: PCI: convert endpoint/pci-test-function.txt to reST

2019-05-13 Thread Mauro Carvalho Chehab
Em Mon, 13 May 2019 22:19:59 +0800 Changbin Du escreveu: > This converts the plain text documentation to reStructuredText format and > add it to Sphinx TOC tree. No essential content change. > > Signed-off-by: Changbin Du > Acked-by: Bjorn Helgaas > --- > Documentation/PCI/endpoint/index.rst

Re: [PATCH v5 09/12] Documentation: PCI: convert endpoint/pci-endpoint.txt to reST

2019-05-13 Thread Mauro Carvalho Chehab
Em Mon, 13 May 2019 22:19:57 +0800 Changbin Du escreveu: > This converts the plain text documentation to reStructuredText format and > add it to Sphinx TOC tree. No essential content change. > > Signed-off-by: Changbin Du > Acked-by: Bjorn Helgaas > --- > Documentation/PCI/endpoint/index.rst

Re: [PATCH v5 08/12] Documentation: PCI: convert pcieaer-howto.txt to reST

2019-05-13 Thread Mauro Carvalho Chehab
Em Mon, 13 May 2019 22:19:56 +0800 Changbin Du escreveu: > This converts the plain text documentation to reStructuredText format and > add it to Sphinx TOC tree. No essential content change. > > Signed-off-by: Changbin Du > Acked-by: Bjorn Helgaas > Cc: Mauro Carvalho Chehab Reviewed-by: Mau

Re: [PATCH v5 07/12] Documentation: PCI: convert pci-error-recovery.txt to reST

2019-05-13 Thread Mauro Carvalho Chehab
Em Mon, 13 May 2019 22:19:55 +0800 Changbin Du escreveu: > This converts the plain text documentation to reStructuredText format and > add it to Sphinx TOC tree. No essential content change. > > Signed-off-by: Changbin Du > Acked-by: Bjorn Helgaas > Cc: Mauro Carvalho Chehab Reviewed-by: Mau

Re: [PATCH v5 02/12] Documentation: PCI: convert pci.txt to reST

2019-05-13 Thread Mauro Carvalho Chehab
Em Mon, 13 May 2019 22:19:50 +0800 Changbin Du escreveu: > This converts the plain text documentation to reStructuredText format and > add it to Sphinx TOC tree. No essential content change. > > The description about struct pci_driver and struct pci_device_id are moved > into in-source comments.

Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework

2019-05-13 Thread Daniel Vetter
On Sat, May 11, 2019 at 01:33:44PM -0400, Theodore Ts'o wrote: > On Fri, May 10, 2019 at 02:12:40PM -0700, Frank Rowand wrote: > > However, the reply is incorrect. Kselftest in-kernel tests (which > > is the context here) can be configured as built in instead of as > > a module, and built in a UML

[PATCH v5 11/12] Documentation: PCI: convert endpoint/pci-test-function.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas --- Documentation/PCI/endpoint/index.rst | 1 + ...est-function.txt => pci-test-function.rst} | 34 +

[PATCH v5 12/12] Documentation: PCI: convert endpoint/pci-test-howto.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab --- Documentation/PCI/endpoint/index.rst | 1 + ...{pci-test-howto.t

[PATCH v5 10/12] Documentation: PCI: convert endpoint/pci-endpoint-cfs.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab --- Documentation/PCI/endpoint/index.rst | 1 + ...-endpoint-cfs.txt

[PATCH v5 09/12] Documentation: PCI: convert endpoint/pci-endpoint.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas --- Documentation/PCI/endpoint/index.rst | 10 ++ .../{pci-endpoint.txt => pci-endpoint.rst}| 96

[PATCH v5 08/12] Documentation: PCI: convert pcieaer-howto.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Cc: Mauro Carvalho Chehab --- Documentation/PCI/index.rst | 1 + .../{pcieaer-howto.txt => pc

[PATCH v5 07/12] Documentation: PCI: convert pci-error-recovery.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Cc: Mauro Carvalho Chehab --- Documentation/PCI/index.rst | 1 + ...or-recovery.txt => pci-er

[PATCH v5 05/12] Documentation: PCI: convert MSI-HOWTO.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab --- v2: o drop numbering. o simplify author list --- Documentation/PCI/ind

[PATCH v5 06/12] Documentation: PCI: convert acpi-info.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Cc: Mauro Carvalho Chehab --- .../PCI/{acpi-info.txt => acpi-info.rst} | 15 ++- Documentati

[PATCH v5 04/12] Documentation: PCI: convert pci-iov-howto.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab --- Documentation/PCI/index.rst | 1 + .../{pci-iov-howto.

[PATCH v5 03/12] Documentation: PCI: convert PCIEBUS-HOWTO.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Reviewed-by: Mauro Carvalho Chehab --- Documentation/PCI/index.rst | 1 + .../{PCIEBUS-HOWTO.

[PATCH v5 02/12] Documentation: PCI: convert pci.txt to reST

2019-05-13 Thread Changbin Du
This converts the plain text documentation to reStructuredText format and add it to Sphinx TOC tree. No essential content change. The description about struct pci_driver and struct pci_device_id are moved into in-source comments. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas Cc: Mauro Carv

[PATCH v5 01/12] Documentation: add Linux PCI to Sphinx TOC tree

2019-05-13 Thread Changbin Du
Add a index.rst for PCI subsystem. More docs will be added later. Signed-off-by: Changbin Du Acked-by: Bjorn Helgaas --- Documentation/PCI/index.rst | 9 + Documentation/index.rst | 1 + 2 files changed, 10 insertions(+) create mode 100644 Documentation/PCI/index.rst diff --git a/

[PATCH v5 00/12] Include linux PCI docs into Sphinx TOC tree

2019-05-13 Thread Changbin Du
Hi all, The kernel now uses Sphinx to generate intelligent and beautiful documentation from reStructuredText files. I converted most of the Linux PCI docs to rst format in this serias. For you to preview, please visit below url: http://www.bytemem.com:8080/kernel-doc/PCI/index.html Thank you! v

Re: [PATCH v4 07/12] Documentation: PCI: convert pci-error-recovery.txt to reST

2019-05-13 Thread Changbin Du
On Sun, May 12, 2019 at 07:22:13AM -0700, Joe Perches wrote: > On Sun, 2019-05-12 at 20:50 +0800, Changbin Du wrote: > > This converts the plain text documentation to reStructuredText format and > > add it to Sphinx TOC tree. No essential content change. > [] > > diff --git a/MAINTAINERS b/MAINTAIN

Re: [PATCH v6 1/1] iommu: enhance IOMMU dma mode build options

2019-05-13 Thread Leizhen (ThunderTown)
On 2019/5/8 17:42, John Garry wrote: > On 18/04/2019 14:57, Zhen Lei wrote: >> First, add build option IOMMU_DEFAULT_{LAZY|STRICT}, so that we have the >> opportunity to set {lazy|strict} mode as default at build time. Then put >> the three config options in an choice, make people can only choos

Re: [RFC PATCH V2] kvm: arm64: export memory error recovery capability to user space

2019-05-13 Thread gengdongjiu
On 2019/5/13 17:44, Peter Maydell wrote: > On Mon, 13 May 2019 at 07:32, Dongjiu Geng wrote: >> >> When user space do memory recovery, it will check whether KVM and >> guest support the error recovery, only when both of them support, >> user space will do the error recovery. This patch exports thi

Re: [RFC PATCH V2] kvm: arm64: export memory error recovery capability to user space

2019-05-13 Thread Peter Maydell
On Mon, 13 May 2019 at 07:32, Dongjiu Geng wrote: > > When user space do memory recovery, it will check whether KVM and > guest support the error recovery, only when both of them support, > user space will do the error recovery. This patch exports this > capability of KVM to user space. > > Cc: Pe

Re: [PATCH v2 0/6] hwspinlock: allow sharing of hwspinlocks

2019-05-13 Thread Fabien DESSENNE
Hi I Got Rob's Reviewed-by. Any further comments? Fabien On 25/04/2019 11:17 AM, Fabien Dessenne wrote: > The current implementation does not allow two different devices to use > a common hwspinlock. This patch set proposes to have, as an option, some > hwspinlocks shared between several user

Re: [PATCH 0/2] hwspinlock: add the 'in_atomic' API

2019-05-13 Thread Fabien DESSENNE
Hi Gentle reminder Fabien On 07/03/2019 4:58 PM, Fabien Dessenne wrote: > In its current implementation, the hwspinlock framework relies on jiffies > to handle the timeout of the hwspin_lock_timeout_xxx() API. > In an atomic context (or more precisely when irq are disabled) jiffies does > not

Re: [PATCH v9 00/24] ILP32 for ARM64

2019-05-13 Thread Andreas Schwab
There is a problem with the stack size accounting during execve when there is no stack limit: $ ulimit -s 8192 $ ./hello.ilp32 Hello World! $ ulimit -s unlimited $ ./hello.ilp32 Segmentation fault $ strace ./hello.ilp32 execve("./hello.ilp32", ["./hello.ilp32"], 0xf10548f0 /* 77 vars */) =