Re: [PATCH RFC] tools/nolibc: add support for constructors and destructors

2023-10-07 Thread Thomas Weißschuh
Hi Willy, On 2023-10-07 08:50:25+0200, Willy Tarreau wrote: > On Thu, Oct 05, 2023 at 06:45:07PM +0200, Thomas Weißschuh wrote: > > With the startup code moved to C, implementing support for > > constructors and deconstructors is fairly easy to implement. > [..] > > diff --git a/tools/testing/se

Re: [PATCH v4 09/17] iommufd/device: Add helpers to enforce/remove device reserved regions

2023-10-07 Thread Yan Zhao
> @@ -444,10 +465,9 @@ iommufd_device_do_replace(struct iommufd_device *idev, > } > > old_hwpt = igroup->hwpt; > - if (hwpt->ioas != old_hwpt->ioas) { > + if (iommufd_hw_pagetable_compare_ioas(old_hwpt, hwpt)) { > list_for_each_entry(cur, &igroup->device_list, gr

Re: [PATCH RFC] tools/nolibc: add support for constructors and destructors

2023-10-07 Thread Willy Tarreau
On Sat, Oct 07, 2023 at 09:28:45AM +0200, Thomas Weißschuh wrote: > > In the past I learned the hard way that you can never trust the execution > > order of constructors, so if you're unlucky above you could very well end > > up with 1 and that would be correct. I suggest that instead you do someth

Re: [PATCH RFC] tools/nolibc: add support for constructors and destructors

2023-10-07 Thread Thomas Weißschuh
On 2023-10-07 10:30:35+0200, Willy Tarreau wrote: > On Sat, Oct 07, 2023 at 09:28:45AM +0200, Thomas Weißschuh wrote: > > > In the past I learned the hard way that you can never trust the execution > > > order of constructors, so if you're unlucky above you could very well end > > > up with 1 and t

Re: [PATCH] kunit: Reset suite counter right before running tests

2023-10-07 Thread David Gow
On Thu, 5 Oct 2023 at 04:57, Michal Wajdeczko wrote: > > Today we reset the suite counter as part of the suite cleanup, > called from the module exit callback, but it might not work that > well as one can try to collect results without unloading a previous > test (either unintentionally or due to

Re: [PATCH 4/4] kunit: Prepare test plan for parameterized subtests

2023-10-07 Thread David Gow
On Mon, 2 Oct 2023 at 21:55, Michal Wajdeczko wrote: > > > > On 28.09.2023 22:54, Rae Moar wrote: > > On Mon, Sep 25, 2023 at 1:58 PM Michal Wajdeczko > > wrote: > >> > >> In case of parameterized tests we are not providing a test plan > >> so we can't detect if any result is missing. > >> > >> C

Re: [PATCH 1/4] kunit: Drop redundant text from suite init failure message

2023-10-07 Thread David Gow
On Tue, 26 Sept 2023 at 01:58, Michal Wajdeczko wrote: > > If a suite initialization fails, then our diagnostic message > will include redundant indent and hash sign as all this was > already added by the kunit_printk() used by kunit_err() macro. > > This could be easily seen if we force some erro

Re: [PATCH 2/4] kunit: Fix indentation level of suite messages

2023-10-07 Thread David Gow
On Tue, 26 Sept 2023 at 01:58, Michal Wajdeczko wrote: > > A kunit suite is a top level test from the KTAP point of view but > all suite diagnostic messages are printed at the subtest level: > > $ ./tools/testing/kunit/kunit.py run --raw_output \ > --kunitconfig ./lib/kunit/.kunitconfi

Re: [PATCH v4 09/17] iommufd/device: Add helpers to enforce/remove device reserved regions

2023-10-07 Thread Nicolin Chen
On Sat, Oct 07, 2023 at 03:20:41PM +0800, Yan Zhao wrote: > > @@ -444,10 +465,9 @@ iommufd_device_do_replace(struct iommufd_device *idev, > > } > > > > old_hwpt = igroup->hwpt; > > - if (hwpt->ioas != old_hwpt->ioas) { > > + if (iommufd_hw_pagetable_compare_ioas(old_hwpt, hwpt))

Re: [PATCH v4 01/17] iommu: Add hwpt_type with user_data for domain_alloc_user op

2023-10-07 Thread Yi Liu
On 2023/9/27 09:08, Tian, Kevin wrote: From: Jason Gunthorpe Sent: Wednesday, September 27, 2023 12:29 AM On Tue, Sep 26, 2023 at 06:37:55AM +, Tian, Kevin wrote: From: Robin Murphy Sent: Friday, September 22, 2023 5:48 PM I could go on enjoying myself, but basically yeah, "default" can'

[PATCH v2] tools/nolibc: add support for constructors and destructors

2023-10-07 Thread Thomas Weißschuh
With the startup code moved to C, implementing support for constructors and deconstructors is fairly easy to implement. Examples for code size impact: textdata bss dec hex filename 21837 104 88 22029560d nolibc-test.before 22135 120 88 22343574

[PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ)

2023-10-07 Thread Thomas Weißschuh
PAGESZ); EXPECT_GE(1, getauxval(AT_PAGESZ), 4096); break; case __LINE__: return ret; /* must be last */ /* note: do not set any defaults so as to permit holes above */ --- base-commit: ab663cc32912914258bc8a2fbd0e753f552ee9d8 change-id: 20

Re: [PATCH v4 03/17] iommufd: Unite all kernel-managed members into a struct

2023-10-07 Thread Yan Zhao
On Thu, Sep 21, 2023 at 12:51:24AM -0700, Yi Liu wrote: > From: Nicolin Chen > > The struct iommufd_hw_pagetable has been representing a kernel-managed > HWPT, yet soon will be reused to represent a user-managed HWPT. These > two types of HWPTs has the same IOMMUFD object type and an iommu_domain

Re: [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ)

2023-10-07 Thread Willy Tarreau
On Sat, Oct 07, 2023 at 12:18:55PM +0200, Thomas Weißschuh wrote: > The test will not work for systems with pagesize != 4096 like aarch64 > and some others. > > Other testcases are already testing the same functionality: > * auxv_AT_UID tests getauxval() in general. > * test_getpagesize() tests pa

Re: [PATCH v2] tools/nolibc: add support for constructors and destructors

2023-10-07 Thread Willy Tarreau
On Sat, Oct 07, 2023 at 12:01:39PM +0200, Thomas Weißschuh wrote: > With the startup code moved to C, implementing support for > constructors and deconstructors is fairly easy to implement. > > Examples for code size impact: > >text data bss dec hex filename > 21837

Re: [PATCH] tools/nolibc: drop test for getauxval(AT_PAGESZ)

2023-10-07 Thread Thomas Weißschuh
On 2023-10-07 12:36:20+0200, Willy Tarreau wrote: > On Sat, Oct 07, 2023 at 12:18:55PM +0200, Thomas Weißschuh wrote: > > The test will not work for systems with pagesize != 4096 like aarch64 > > and some others. > > > > Other testcases are already testing the same functionality: > > * auxv_AT_UID

[PATCH] Re: tools/nolibc: drop test for getauxval(AT_PAGESZ)

2023-10-07 Thread Zhangjin Wu
XPECT_GE(1, getauxval(AT_PAGESZ), > 4096); break; > case __LINE__: > return ret; /* must be last */ > /* note: do not set any defaults so as to permit holes above */ > > --- > base-commit: ab663cc32912914258bc8a2fbd0e753f552ee9d8 > change-id: 20231007-nolibc-auxval-pagesz-05f5ff79c4c4 > > Best regards, > -- > Thomas Weißschuh

Re: [PATCH] Re: tools/nolibc: drop test for getauxval(AT_PAGESZ)

2023-10-07 Thread Thomas Weißschuh
Hi Zhangjin, On 2023-10-07 21:42:02+0800, Zhangjin Wu wrote: > > The test will not work for systems with pagesize != 4096 like aarch64 > > and some others. > > > > We have used EXPECT_GE() instead of EXPECT_EQ(), so this should not > fail, do I miss something ?;-) Indeed, I missed that, sorry fo

Re: [PATCH v6] selftests: rtc: Fixes rtctest error handling.

2023-10-07 Thread Atul Kumar Pant
On Sat, Sep 23, 2023 at 11:06:58PM +0530, Atul Kumar Pant wrote: > On Thu, Aug 17, 2023 at 02:44:01PM +0530, Atul Kumar Pant wrote: > > Adds a check to verify if the rtc device file is valid or not > > and prints a useful error message if the file is not accessible. > > > > Signed-off-by: Atul Kum

Re: [PATCH v3 2/9] KVM: selftests: Unify the makefile rule for split targets

2023-10-07 Thread Haibo Xu
On Tue, Oct 3, 2023 at 6:28 PM Andrew Jones wrote: > > On Thu, Sep 14, 2023 at 09:36:56AM +0800, Haibo Xu wrote: > > A separate makefile rule was used for split targets which was added > > in patch(KVM: arm64: selftests: Split get-reg-list test code). This > > could be avoided by minor changes to

selftests: cgroup: test_core - Unable to handle kernel NULL pointer dereference at virtual address

2023-10-07 Thread Naresh Kamboju
While running selftests: cgroup: test_kmem on FVP following kernel crash noticed on Linux next 6.6.0-rc4-next-20231006. Reported-by: Linux Kernel Functional Testing Boot log: [0.00] Booting Linux on physical CPU 0x00 [0x410fd0f0] [0.00] Linux version 6.6.0-rc4-next-202310