Re: [PATCH] drm/amd/display: replace use of msleep(<20) with usleep_range for better accuracy

2025-04-04 Thread Shuah Khan
(10); + usleep_range(1, 10200); } // read rc result thanks, -- Shuah

Re: [PATCH v4 00/14] Add support for suppressing warning backtraces

2025-03-28 Thread Shuah Khan
l put them into mm.git, to advance things a bit. I haven't heard from kunit maintainers yet. This thread got lost in inbox due to travel. David/Brendan/Rae, Okay to take this series? Andrew, Okay to take this through your tree - this needs merging. thanks, -- Shuah

Re: [PATCH] Documentation/CoC: spell out enforcement for unacceptable behaviors

2024-11-12 Thread Shuah Khan
On 11/12/24 07:43, Mark Brown wrote: On Mon, Nov 11, 2024 at 02:50:45PM -0700, Shuah Khan wrote: On 11/11/24 13:07, Simona Vetter wrote: Personal take, but I think a forced public apology as the primary or at least initial coc enforcement approach is one of the worst. ... This document

Re: [PATCH] Documentation/CoC: spell out enforcement for unacceptable behaviors

2024-11-12 Thread Shuah Khan
On 11/11/24 22:18, Laurent Pinchart wrote: On Mon, Nov 11, 2024 at 05:35:11PM -0700, Shuah Khan wrote: On 11/11/24 15:35, Laurent Pinchart wrote: On Mon, Nov 11, 2024 at 02:50:45PM -0700, Shuah Khan wrote: On 11/11/24 13:07, Simona Vetter wrote: On Fri, Nov 08, 2024 at 09:18:53AM -0700

Re: [PATCH] Documentation/CoC: spell out enforcement for unacceptable behaviors

2024-11-11 Thread Shuah Khan
On 11/11/24 15:35, Laurent Pinchart wrote: Hi Shuah, On Mon, Nov 11, 2024 at 02:50:45PM -0700, Shuah Khan wrote: On 11/11/24 13:07, Simona Vetter wrote: On Fri, Nov 08, 2024 at 09:18:53AM -0700, Shuah Khan wrote: The Code of Conduct committee's goal first and foremost is to bring

Re: [PATCH] Documentation/CoC: spell out enforcement for unacceptable behaviors

2024-11-11 Thread Shuah Khan
On 11/11/24 13:07, Simona Vetter wrote: On Fri, Nov 08, 2024 at 09:18:53AM -0700, Shuah Khan wrote: The Code of Conduct committee's goal first and foremost is to bring about change to ensure our community continues to foster respectful discussions. In the interest of transparency, th

Re: [PATCH] drm/atmel_hlcdc: Fix uninitialized variable

2024-10-04 Thread Shuah Khan
for this value? thanks, -- Shuah

Re: [PATCH-next] Fix unintentional integer overflow

2024-10-04 Thread Shuah Khan
) + j); + mask |= (u64)1 << ((i * adev->jpeg.num_jpeg_rings) + j); } } *val = mask; thanks, -- Shuah

Re: [PATCH] include: uapi: drm: drm_mode: fix documentation and coding style issue

2024-08-21 Thread Shuah Khan
__u16 width; + /** @height: Height of the plane in pixels. */ __u16 height; }; Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH v2] gpu: ipu-v3: Add cleanup attribute for prg_node for auto cleanup

2024-08-13 Thread Shuah Khan
On 8/12/24 13:37, Abhinav Jain wrote: Hello, Can this be kindly reviewed? Thanks. You removed all the relevant information for people to be able to review the patch :) thanks, -- Shuah

Re: [PATCH v2] kerneldoc: Fix two missing newlines in drm_connector.c

2024-08-09 Thread Shuah Khan
BT709_YCC: *XVYCC_601: @@ -2378,6 +2381,7 @@ EXPORT_SYMBOL(drm_mode_create_aspect_ratio_property); *DCI-P3_RGB_Theater: *RGB_WIDE_FIXED: *RGB_WIDE_FLOAT: + * *BT601_YCC: *The behavior is undefined. * Reviewed-by: Shuah Khan thanks, -- Shuah

Re: [PATCH] kerneldoc: Fix two missing newlines in drm_connector.c

2024-08-08 Thread Shuah Khan
XVYCC_601: @@ -2378,6 +2381,7 @@ EXPORT_SYMBOL(drm_mode_create_aspect_ratio_property); *DCI-P3_RGB_Theater: *RGB_WIDE_FIXED: *RGB_WIDE_FLOAT: + * *BT601_YCC: *The behavior is undefined. * thanks, -- Shuah

Re: [PATCH] Documentation/accel/qaic: Fix typo 'phsyical'

2024-05-31 Thread Shuah Khan
accel device exists +QAIC creates an accel device per physical PCIe device. This accel device exists for as long as the PCIe device is known to Linux. The PCIe device may not be in the state to accept requests from userspace at thanks, -- Shuah

Re: [PATCH v13 8/8] selftests/udmabuf: Add tests to verify data after page migration

2024-04-04 Thread Shuah Khan
tests comes from a patch by Mike Kravetz. Add Suggested-by for Mike Kravetz Cc: Shuah Khan Cc: David Hildenbrand Cc: Daniel Vetter Cc: Mike Kravetz Cc: Hugh Dickins Cc: Peter Xu Cc: Jason Gunthorpe Cc: Gerd Hoffmann Cc: Dongwon Kim Cc: Junxiao Chang Signed-off-by: Vivek Kasireddy

Re: linux-next: build failure after merge of the kunit-next tree

2024-03-06 Thread Shuah Khan
Hi Stephen, On 3/1/24 15:30, Shuah Khan wrote: Hi Stephen, On 3/1/24 13:46, Stephen Rothwell wrote: Hi Shuah, On Fri, 1 Mar 2024 09:05:57 -0700 Shuah Khan wrote: On 3/1/24 03:43, Stephen Rothwell wrote: Hi all, On Fri, 1 Mar 2024 15:15:02 +0800 David Gow wrote: On Thu, 29 Feb 2024 at

Re: linux-next: build failure after merge of the kunit-next tree

2024-03-01 Thread Shuah Khan
Hi Stephen, On 3/1/24 13:46, Stephen Rothwell wrote: Hi Shuah, On Fri, 1 Mar 2024 09:05:57 -0700 Shuah Khan wrote: On 3/1/24 03:43, Stephen Rothwell wrote: Hi all, On Fri, 1 Mar 2024 15:15:02 +0800 David Gow wrote: On Thu, 29 Feb 2024 at 23:07, Shuah Khan wrote: I can carry the fix

Re: linux-next: build failure after merge of the kunit-next tree

2024-03-01 Thread Shuah Khan
On 3/1/24 03:43, Stephen Rothwell wrote: Hi all, On Fri, 1 Mar 2024 15:15:02 +0800 David Gow wrote: On Thu, 29 Feb 2024 at 23:07, Shuah Khan wrote: I can carry the fix through kselftest kunit if it works for all. I'm happy for this to go in with the KUnit changes if that's th

Re: linux-next: build failure after merge of the kunit-next tree

2024-02-29 Thread Shuah Khan
"buddy_alloc failed with bias(%x-%x), size=%u, ps=%u\n", + "buddy_alloc failed with bias(%x-%x), size=%u\n", bias_start, bias_end, size); bias_rem -= size; thanks, -- Shuah

Re: [PATCH 0/9] kunit: Fix printf format specifier issues in KUnit assertions

2024-02-27 Thread Shuah Khan
hanks, -- Shuah

Re: [PATCH 7/9] drm: tests: Fix invalid printf format specifiers in KUnit tests

2024-02-27 Thread Shuah Khan
ne doesn't apply as is due to conflict between this one and fca7526b7d89 I think if we can fix this here - we won't problems during pull request merge. thanks, -- Shuah

Re: [PATCH 5/9] rtc: test: Fix invalid format specifier.

2024-02-27 Thread Shuah Khan
a8b18 ("rtc: Improve performance of rtc_time64_to_tm(). Add tests.") Signed-off-by: David Gow Who do you expect to take this patch? I am going to be applying this series to linux-kselftest kunit next in just a bit. Would you like to ack the pacth? thanks, -- Shuah

Re: [PATCH 0/9] kunit: Fix printf format specifier issues in KUnit assertions

2024-02-22 Thread Shuah Khan
Thank you for a quick response David. I will apply the series to kunit next for Linux 6.9 as soon as the reviews are complete. thanks, -- Shuah

Re: [PATCH 02/10] drm: selftest: refactor drm_cmdline_parser

2022-06-17 Thread Shuah Khan
FAIL_ON(mode.tv_margins.left != 24); - FAIL_ON(mode.tv_margins.bottom != 36); - FAIL_ON(mode.tv_margins.top != 42); - - FAIL_ON(mode.rb); - FAIL_ON(mode.cvt); - FAIL_ON(mode.interlace); - FAIL_ON(mode.margins); - FAIL_ON(mode.force != DRM_FORCE_ON); + drm_cmdline_test_properties(ignored, &mode, DRM_FORCE_ON); return 0; } @@ -1107,20 +843,17 @@ static int drm_cmdline_test_panel_orientation(void *ignored) { struct drm_cmdline_mode mode = { }; - FAIL_ON(!drm_mode_parse_command_line_for_connector("panel_orientation=upside_down", - &no_connector, - &mode)); + FAIL_ON(!drm_mode_parse_command_line_for_connector( + "panel_orientation=upside_down", &no_connector, &mode)); Same here about changing the format. + FAIL_ON(mode.specified); FAIL_ON(mode.refresh_specified); FAIL_ON(mode.bpp_specified); + FAIL_ON(mode.panel_orientation != DRM_MODE_PANEL_ORIENTATION_BOTTOM_UP); - FAIL_ON(mode.rb); - FAIL_ON(mode.cvt); - FAIL_ON(mode.interlace); - FAIL_ON(mode.margins); - FAIL_ON(mode.force != DRM_FORCE_UNSPECIFIED); + drm_cmdline_test_properties(ignored, &mode, DRM_FORCE_UNSPECIFIED); return 0; } thanks, -- Shuah

Re: [RFC v3 8/8] selftests: Add binder cgroup gpu memory transfer test

2022-03-09 Thread Shuah Khan
goto err_child; + } + fbo = (struct flat_binder_object *)tr->data.ptr.buffer; + ASSERT_EQ(fbo->hdr.type, BINDER_TYPE_PTR) { + TH_LOG("Did not receive a buffer object from child"); + goto err_child; + } + bbo = (struct binder_buffer_object *)fbo; + ASSERT_EQ(bbo->length, 0) { + TH_LOG("Did not receive an empty buffer object from child"); + goto err_child; + } + + TH_LOG("Received transaction from child"); + send_dmabuf_reply(b_ctx.fd, tr, dmabuf_fd); + + ASSERT_EQ(cg_read_key_long(cg_ctx.dest, GPUMEM_FILENAME, "system"), ONE_MiB) { + TH_LOG("Destination cgroup does not have system charge!"); + goto err_child; + } + ASSERT_EQ(cg_read_key_long(cg_ctx.source, GPUMEM_FILENAME, "system"), 0) { + TH_LOG("Source cgroup still has system charge!"); + goto err_child; + } + TH_LOG("Charge transfer succeeded!"); + +err_child: + waitpid(child_pid, &ret, 0); + if (WIFEXITED(ret)) + TH_LOG("Child %d terminated with %d", child_pid, WEXITSTATUS(ret)); + else + TH_LOG("Child terminated abnormally"); What does this mean? What are the conditions that could cause this? Pls include more info. in the message. +err_binder: + close_binder(&b_ctx); +err_dmabuf: + close(dmabuf_fd); +err_cg: + destroy_cgroups(_metadata, &cg_ctx); + destroy_binderfs(&bfs_ctx); +} + +TEST_HARNESS_MAIN thanks, -- Shuah

Re: [PATCH 00/20] Manual replacement of all strlcpy in favor of strscpy

2021-02-22 Thread Shuah Khan
thing that is in the plan to address as part of this work? thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 1/5] kselftests: dmabuf-heaps: Fix Makefile's inclusion of the kernel's usr/include dir

2021-02-09 Thread Shuah Khan
which then causes the _IOCW macros to give the wrong ioctl numbers, specifically for DMA_BUF_IOCTL_SYNC. This patch simply removes the extra include from the Makefile Cc: Shuah Khan Cc: Brian Starkey Cc: Sumit Semwal Cc: Laura Abbott Cc: Hridya Valsaraju Cc: Suren Baghdasaryan Cc: Sandeep

Re: [PATCH] staging: ion: remove from the tree

2020-08-28 Thread Shuah Khan
Laura Abbott Cc: Martijn Coenen Cc: Shuah Khan Cc: Sumit Semwal Cc: Suren Baghdasaryan Cc: Todd Kjos Cc: de...@driverdev.osuosl.org Cc: dri-devel@lists.freedesktop.org Cc: linaro-mm-...@lists.linaro.org Signed-off-by: Greg Kroah-Hartman --- MAINTAINERS

Re: [v2] dma-buf: heaps: bugfix for selftest failure

2020-03-13 Thread shuah
. Initializing ret to 0 is a better way to go. thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH] dma-buf: heaps: bugfix for selftest failure

2020-03-13 Thread shuah
; While you are at it, why not change strcmp() to strncmp()? thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-10-07 Thread shuah
n't already in the mainline. In any case, repeating myself Let's work on top of - it is rebased to 5.4-rc1 and ready for use. https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=test Let's use that for kunit work for 5.5. I won't add any kselftest

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

2019-10-07 Thread shuah
timing. That is probably the initial thought. However, it makes perfect sense to add a couple of tests in. We have a few weeks anyway and it gives us more confidence on kunit. I already have a branch that is in linux-next and it just has kunit in it and I will rebase it to 5.4-rc1. https://git.kerne

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

2019-10-04 Thread shuah
On 10/4/19 6:33 PM, Brendan Higgins wrote: On Fri, Oct 4, 2019 at 4:57 PM shuah wrote: On 10/4/19 5:52 PM, Brendan Higgins wrote: On Fri, Oct 4, 2019 at 4:30 PM Theodore Y. Ts'o wrote: On Fri, Oct 04, 2019 at 04:47:09PM -0600, shuah wrote: However, if I encourage arbitrary

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

2019-10-04 Thread shuah
On 10/4/19 5:52 PM, Brendan Higgins wrote: On Fri, Oct 4, 2019 at 4:30 PM Theodore Y. Ts'o wrote: On Fri, Oct 04, 2019 at 04:47:09PM -0600, shuah wrote: However, if I encourage arbitrary tests/improvements into my KUnit branch, it further diverges away from torvalds/master, and is

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

2019-10-04 Thread shuah
On 10/4/19 5:10 PM, Brendan Higgins wrote: On Fri, Oct 4, 2019 at 3:47 PM shuah wrote: On 10/4/19 4:27 PM, Brendan Higgins wrote: On Fri, Oct 04, 2019 at 03:59:10PM -0600, shuah wrote: On 10/4/19 3:42 PM, Linus Torvalds wrote: On Fri, Oct 4, 2019 at 2:39 PM Theodore Y. Ts'o wrote:

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

2019-10-04 Thread shuah
On 10/4/19 4:27 PM, Brendan Higgins wrote: On Fri, Oct 04, 2019 at 03:59:10PM -0600, shuah wrote: On 10/4/19 3:42 PM, Linus Torvalds wrote: On Fri, Oct 4, 2019 at 2:39 PM Theodore Y. Ts'o wrote: This question is primarily directed at Shuah and Linus What's the current sta

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

2019-10-04 Thread shuah
On 10/4/19 3:42 PM, Linus Torvalds wrote: On Fri, Oct 4, 2019 at 2:39 PM Theodore Y. Ts'o wrote: This question is primarily directed at Shuah and Linus What's the current status of the kunit series now that Brendan has moved it out of the top-level kunit directory as Linus has

Re: [PATCH v18 15/19] Documentation: kunit: add documentation for KUnit

2019-09-23 Thread shuah
apply. Hope you are okay with that Randy! thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-08-24 Thread shuah
On 8/23/19 7:34 PM, Brendan Higgins wrote: ## TL;DR This revision addresses comments from Shuah by fixing a couple checkpatch warnings and fixing some comment readability issues. No API or major structual changes have been made since v13. ## Background This patch set proposes KUnit, a

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

2019-08-23 Thread shuah
On 8/23/19 1:20 PM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 12:04 PM shuah wrote: On 8/23/19 12:56 PM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 11:32 AM shuah wrote: On 8/23/19 11:54 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 10:34 AM shuah wrote: On 8/23/19 11:27

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

2019-08-23 Thread shuah
On 8/23/19 12:56 PM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 11:32 AM shuah wrote: On 8/23/19 11:54 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 10:34 AM shuah wrote: On 8/23/19 11:27 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 10:05 AM shuah wrote: On 8/23/19 10

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

2019-08-23 Thread shuah
On 8/23/19 11:54 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 10:34 AM shuah wrote: On 8/23/19 11:27 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 10:05 AM shuah wrote: On 8/23/19 10:48 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 8:33 AM shuah wrote: Hi Brendan, On

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

2019-08-23 Thread shuah
On 8/23/19 11:27 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 10:05 AM shuah wrote: On 8/23/19 10:48 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 8:33 AM shuah wrote: Hi Brendan, On 8/20/19 5:20 PM, Brendan Higgins wrote: Add core facilities for defining unit tests; this

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

2019-08-23 Thread shuah
On 8/23/19 10:56 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 8:36 AM shuah wrote: Hi Brendan, On 8/20/19 5:20 PM, Brendan Higgins wrote: Add support for aborting/bailing out of test cases, which is needed for implementing assertions. An assertion is like an expectation, but bails

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

2019-08-23 Thread shuah
On 8/23/19 10:48 AM, Brendan Higgins wrote: On Fri, Aug 23, 2019 at 8:33 AM shuah wrote: Hi Brendan, On 8/20/19 5:20 PM, Brendan Higgins wrote: 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

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

2019-08-23 Thread shuah
BUG(); I recall discussion on this. What's the point in keeping thie BUG() around when it doesn't even reach? It can even be a WARN_ON() in that case right? thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://l

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

2019-08-23 Thread shuah
h an + * empty test case. + * + * Example: Can you fix these line continuations. It makes it very hard to read. Sorry for this late comment. These comments lines are longer than 80 and wrap. There are several comment lines in the file that are way too long. th

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

2019-08-20 Thread shuah
On 8/20/19 5:23 PM, Brendan Higgins wrote: On Tue, Aug 20, 2019 at 2:26 PM Brendan Higgins wrote: On Tue, Aug 20, 2019 at 12:08 PM shuah wrote: On 8/20/19 12:24 PM, Brendan Higgins wrote: On Tue, Aug 20, 2019 at 11:24:45AM -0600, shuah wrote: On 8/13/19 11:50 PM, Brendan Higgins wrote

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

2019-08-20 Thread shuah
On 8/20/19 12:24 PM, Brendan Higgins wrote: On Tue, Aug 20, 2019 at 11:24:45AM -0600, shuah wrote: On 8/13/19 11:50 PM, Brendan Higgins wrote: ## TL;DR This revision addresses comments from Stephen and Bjorn Helgaas. Most changes are pretty minor stuff that doesn't affect the API in a

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

2019-08-20 Thread shuah
ignificant changes from here on out. Hi Brendan, I found checkpatch errors in one or two patches. Can you fix those and send v14. thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

2019-07-09 Thread shuah
R M:Luis Chamberlain L:linux-ker...@vger.kernel.org Thanks Brendan. I am good with this. I can take KUnit patches through kselftest with your Ack. thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org

Re: [Linux-kernel-mentees][PATCH v2] drm/amdkfd: Fix undefined behavior in bit shift

2019-06-26 Thread Shuah Khan
;< 31) +#define KFD_IOC_ALLOC_MEM_FLAGS_WRITABLE (1U << 31) #define KFD_IOC_ALLOC_MEM_FLAGS_EXECUTABLE(1 << 30) #define KFD_IOC_ALLOC_MEM_FLAGS_PUBLIC(1 << 29) #define KFD_IOC_ALLOC_MEM_FLAGS_NO_SUBSTITUTE (1 << 28) thanks, -- Shuah

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

2019-06-21 Thread shuah
On 6/21/19 12:13 PM, Theodore Ts'o wrote: On Fri, Jun 21, 2019 at 08:59:48AM -0600, shuah wrote: ### But wait! Doesn't kselftest support in kernel testing?! I think I commented on this before. I agree with the statement that there is no overlap between Kselftest and KUnit. I

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

2019-06-21 Thread shuah
st and development alone. I wouldn't hesitate loading a Kselftest test module on my laptop and running tests, but I wouldn't use KUnit the same way. Again, this is not a competition between which is better. Kselftest and KUnit serve different needs and problem spaces. Please redo this documentation to reflect that. thanks, -- Shuah

Re: [PATCH v16 16/16] selftests, arm64: add a selftest for passing tagged pointers to kernel

2019-06-10 Thread shuah
adds a simple test, that calls the uname syscall with a tagged user pointer as an argument. Without the kernel accepting tagged user pointers the test fails with EFAULT. Signed-off-by: Andrey Konovalov I'm adding Shuah to CC in case she has some suggestions about the new selftest. Thanks

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

2019-05-07 Thread shuah
On 5/7/19 2:01 AM, Greg KH wrote: On Mon, May 06, 2019 at 08:14:12PM -0700, Frank Rowand wrote: On 5/1/19 4:01 PM, Brendan Higgins wrote: ## TLDR I rebased the last patchset on 5.1-rc7 in hopes that we can get this in 5.2. Shuah, I think you, Greg KH, and myself talked off thread, and we

Re: [PATCH v2 15/17] MAINTAINERS: add entry for KUnit the unit testing framework

2019-05-03 Thread shuah
ub.io/kunit-docs/third_party/kernel/docs/ +S: Maintained +F: Documentation/kunit/ +F: include/kunit/ +F: kunit/ +F: tools/testing/kunit/ + Please add kselftest mailing list to this entry, based on our conversation on taking these patches through kselftest tree. thanks, --

Re: [PATCH v2 11/17] kunit: test: add test managed resource tests

2019-05-03 Thread shuah
. thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2 04/17] kunit: test: add kunit_stream a std::stream like logger

2019-05-02 Thread shuah
tream, KERN_ERR); + kunit_stream_commit(stream); +} + int kunit_init_test(struct kunit *test, const char *name) { spin_lock_init(&test->lock); INIT_LIST_HEAD(&test->resources); test->name = name; test->vprintk = kunit_vprintk; + test->fail = kunit_fail; return 0; } thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v2 07/17] kunit: test: add initial tests

2019-05-02 Thread shuah
On 5/1/19 5:01 PM, Brendan Higgins wrote: Add a test for string stream along with a simpler example. Signed-off-by: Brendan Higgins --- kunit/Kconfig | 12 ++ kunit/Makefile | 4 ++ kunit/example-test.c | 88 ++ kunit/

Re: [PATCH v2 03/17] kunit: test: add string_stream a std::stream like string builder

2019-05-02 Thread shuah
if (!stream) + return NULL; + + INIT_LIST_HEAD(&stream->fragments); + spin_lock_init(&stream->lock); + kref_init(&stream->refcount); + return stream; +} + +void string_stream_get(struct string_stream *stream) +{ + kref_get(&stream->refcount)

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

2019-05-02 Thread shuah
Sunday. Shuah, I think you, Greg KH, and myself talked off thread, and we agreed we would merge through your tree when the time came? Am I remembering correctly? No objection from me. Yes. I can take these through kselftest tree when the time comes. Agree with Greg that 5.2 might be rushing it

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

2018-11-28 Thread shuah
they evolve quicker as kernel developers contribute tests as part of their kernel work-flow. Maintaining tests and framework separately will make it harder to maintain them and keep them updated for us the kernel community. thanks, -- Shuah ___ dr

Re: [RFC v2 01/14] kunit: test: add KUnit test runner core

2018-11-07 Thread Shuah Khan
On 11/06/2018 06:28 PM, Brendan Higgins wrote: > On Fri, Nov 2, 2018 at 11:44 AM Shuah Khan wrote: >> >> On 10/23/2018 05:57 PM, Brendan Higgins wrote: > >>> + * Example: >>> + * >>> + * .. code-block:: c >>&g

Re: [RFC v2 01/14] kunit: test: add KUnit test runner core

2018-11-02 Thread Shuah Khan
Q(test, -1, add(INT_MAX, INT_MIN)); > + * } > + * > + * static struct test_case example_test_cases[] = { > + * TEST_CASE(add_test_basic), > + * {}, > + * }; > + * > + */ > +struct test_case { > + void (*run_case)(st

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

2018-11-02 Thread Shuah Khan
and ran into problems: ./tools/testing/kunit/kunit.py usage: kunit.py [-h] {run,new} ... Helps writing and running KUnit tests. positional arguments: {run,new} run Runs KUnit tests. new Prints out boilerplate for writing new tests. optional arguments: -h, --help sho

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

2018-10-25 Thread Shuah Khan
here: https://kunit-review.googlesource.com/c/linux/+/1132), >as suggested by Rob. > - Cleaned up some of the commit messages and tweaked commit order a > bit based on suggestions. > I am a bit behind on reviewing this patch series. Just a quick note that I will start looking at thes

Re: [PATCH 2/2] selftests: ion: Add simple test with the vgem driver

2018-02-28 Thread Shuah Khan
On 02/26/2018 06:48 PM, Laura Abbott wrote: > On 02/26/2018 09:07 AM, Shuah Khan wrote: >> On 02/19/2018 11:33 AM, Daniel Vetter wrote: >>> On Mon, Feb 19, 2018 at 10:18:21AM -0800, Laura Abbott wrote: >>>> On 02/19/2018 07:31 AM, Daniel Vetter wrote: >>>>

Re: [PATCH 2/2] selftests: ion: Add simple test with the vgem driver

2018-02-26 Thread Shuah Khan
vgem_fd, info.buffd, &handle); >>>> + >>>> + if (ret < 0) { >>>> + printf("Failed to import buffer\n"); >>>> + goto out_vgem; >>>> + } >>>> + >>>> + sync.flags = DMA_BUF_SYNC_START | DMA_BUF_SYNC_RW; >>>> + ret = ioctl(info.buffd, DMA_BUF_IOCTL_SYNC, &sync); >>>> + if (ret) >>>> + printf("sync start failed %d\n", errno); >>>> + >>>> + memset(info.buffer, 0xff, 4096); >>>> + >>>> + sync.flags = DMA_BUF_SYNC_END | DMA_BUF_SYNC_RW; >>>> + ret = ioctl(info.buffd, DMA_BUF_IOCTL_SYNC, &sync); >>>> + if (ret) >>>> + printf("sync end failed %d\n", errno); >>> >>> At least in drm we require that userspace auto-restarts all ioctls when >>> they get interrupt. See >>> >>> https://cgit.freedesktop.org/drm/libdrm/tree/xf86drm.c#n186 >>> >>> not really an issue with vgem (which can't wait for hw or anything else). >>> But good to make sure we don't spread bad copypastas. >>> >>> Actual use of the ioctls looks all good. With the drmIoctl wrapper added >>> and used this is: >>> >>> Reviewed-by: Daniel Vetter >> >> Thanks for the review. The reason I didn't use the standard drmIoctl was >> because I didn't want to introduce a dependency on libdrm. I don't see >> an example of another selftest having a dependency on an external >> library. >> >> Is adding a dependencies on fairly standard but still external userspace >> libraries okay for kernel self tests? We have cases where external libraries are used. fuse test probably is one example. > > Yeah adding a dependency isn't good, I'd just copypaste a local static > version into the test file. That's good enough, the point isn't to use the > libdrm one, but a wrapper that automatically restarts (every other > userspace for gfx has their own copy of it since it's so trivial). Let's go ahead and use libdrm - It is important to keep them in sync. Maybe we can check dependency in the ion Makefile and not compile the test. As long as the rest of the tests run even when libdrm dependency isn't met, we should be good. thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 1/2] selftests: ion: Remove some prints

2018-02-26 Thread Shuah Khan
if (ion_info->ionfd > 0) > close(ion_info->ionfd); > - printf("<%s>: buffer release successfully\n", __func__); > } > } > > Thanks Laura. I will queue this up for 4.17-rc1. thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH 3/3] selftests: sync: add test that closes the fd before fence signal

2017-08-02 Thread Shuah Khan
On 07/31/2017 01:43 PM, Gustavo Padovan wrote: > 2017-07-30 Chris Wilson : > >> Quoting Gustavo Padovan (2017-07-29 16:22:17) >>> From: Gustavo Padovan >>> >>> We found this bug in the sw_sync so adding a test case to prevent it to >>> happen in t

[PATCH] drm: exynos: dsi: release DSI_PORT_OUT node right after of_drm_find_bridge()

2017-06-25 Thread Shuah Khan
Fix to call of_node_put() right after of_drm_find_bridge() instead of holding on to it until exynos_dsi_remove(). Suggested-by: Inki Dae Signed-off-by: Shuah Khan --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm

Re: [PATCH] drm/exynos: dsi: do not try to find bridge

2017-06-19 Thread Shuah Khan
Hi Inki, On Sun, Jun 18, 2017 at 8:12 PM, Inki Dae wrote: > Hi Shuah, > > 2017년 06월 17일 05:16에 Shuah Khan 이(가) 쓴 글: >> On 06/16/2017 08:16 AM, Shuah Khan wrote: >>> Hi Inki, >>> >>> On Fri, Jun 16, 2017 at 1:50 AM, Inki Dae wrote: >>>>

Re: [PATCH] drm/exynos: dsi: do not try to find bridge

2017-06-18 Thread Shuah Khan
return mipi_dsi_host_register(&dsi->dsi_host); > } > -- > 1.9.1 Looks good to me. Reviewed-by: Shuah Khan thanks, -- Shuah ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PATCH] drm: exynos: dsi: fix to return -ENODEV when DSI_PORT_OUT is not found

2017-06-18 Thread Shuah Khan
Fix exynos_dsi_parse_dt() to return -ENODEV when of_graph_get_remote_node() doesn't find DSI_PORT_OUT. -ENODEV is the correct error code to return and this change makes exynos behavior consistent with rest of the drm drivers. Signed-off-by: Shuah Khan --- drivers/gpu/drm/exynos/exynos_drm_

Re: [PATCH] drm/exynos: dsi: do not try to find bridge

2017-06-18 Thread Shuah Khan
On 06/16/2017 08:16 AM, Shuah Khan wrote: > Hi Inki, > > On Fri, Jun 16, 2017 at 1:50 AM, Inki Dae wrote: >> It doesn't need to try to find a bridge if bridge node doesn't exist. >> >> Signed-off-by: Inki Dae >> --- >> drivers/gpu/drm/exynos/ex

Re: [RFC v2 05/11] v4l2-core: Don't sync cache for a buffer if so requested

2017-03-27 Thread Shuah Khan
e_prepare_buf() all have access to v4l2_buf - void *pb Would it make it easeir and avoid adding a new parameter all these routines if we add a vl42-common routine to return the true if V4L2_BUF_FLAG_NO_CACHE_SYNC is set? Something along the lines of v4l2_is_no_cache_sync_set()? thanks, -- Shuah &

Re: [RFC v2 03/11] vb2: Move cache synchronisation from buffer done to dqbuf handler

2017-03-27 Thread Shuah Khan
_REQUEUEING) { > @@ -1571,6 +1566,10 @@ static void __vb2_dqbuf(struct vb2_buffer *vb) > > vb->state = VB2_BUF_STATE_DEQUEUED; > > + /* sync buffers */ > + for (i = 0; i < vb->num_planes; ++i) > + call_void_memop(vb, finish, vb->plan

Re: [RFC v2 07/11] vb2: dma-contig: Remove redundant sgt_base field

2017-03-27 Thread Shuah Khan
>vec) > return; With the unification dma_sgt is valid for MMAP buffers after vb2_dma_sg_alloc() if dma_sgt is not null, sync happens - the patch description doesn't seem to be in sync with the change. I might be missing something. I think it would help if these two changes ar

Re: [PATCH] drm: change connector disconnected debug message to an error

2017-02-12 Thread Shuah Khan
On 02/03/2017 01:06 AM, Daniel Vetter wrote: > On Thu, Feb 02, 2017 at 10:25:44AM -0700, Shuah Khan wrote: >> On 02/02/2017 01:32 AM, Jani Nikula wrote: >>> On Thu, 02 Feb 2017, Shuah Khan wrote: >>>> Change drm_helper_probe_single_connector_modes() to print an

Re: [PATCH] drm: change connector disconnected debug message to an error

2017-02-02 Thread Shuah Khan
On 02/02/2017 01:32 AM, Jani Nikula wrote: > On Thu, 02 Feb 2017, Shuah Khan wrote: >> Change drm_helper_probe_single_connector_modes() to print an error to >> report connector disconnected status instead of a debug message. >> >> When this condition occurs, applic

[PATCH] drm: change connector disconnected debug message to an error

2017-02-02 Thread Shuah Khan
ke it easier to debug. Signed-off-by: Shuah Khan --- drivers/gpu/drm/drm_probe_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c index ac953f0..6472b7f 100644 --- a/drivers/gpu/drm/drm_probe_hel

[PATCH v2 1/7] selftest: sync: basic tests for sw_sync framework

2016-12-13 Thread Shuah Khan
> > fds.fd = fd; > > fds.events = POLLIN; > > > > do { > > ret = poll(&fds, 1, timeout); > > if (ret > 0) { > > if (fds.revents & (POLLERR | POLLNVAL)) { > >errno = EINVAL; > >return -1; > > } > > return 0; > > } else if (ret == 0) { > > errno = ETIME; > > return -1; > > } > > } while (ret == -1 && (errno == EINTR || errno == EAGAIN)); > > > > return ret; > > } > > > Gustavo > thanks, -- Shuah

[PATCH v2 0/7] Tests for sync infrastructure

2016-12-02 Thread Shuah Khan
On 12/01/2016 06:17 PM, Shuah Khan wrote: > On 10/19/2016 06:49 AM, Emilio López wrote: >> Hello everyone, >> >> This is a series of tests to exercise the sync kernel infrastructure. It is >> meant to be a test suite for the work Gustavo has been doing to destage

[PATCH v2 0/7] Tests for sync infrastructure

2016-12-01 Thread Shuah Khan
he last test will > currently fail due to a regression[0]. Hi Emilio, Thanks. I will apply these to linux-kselftest next for 4.10-rc1 -- Shuah > > As usual, all comments are welcome. > > Cheers! > Emilio > > [0] https://patchwork.kernel.org/patch/9343347/ > > E

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-10-25 Thread Shuah Khan
On 10/25/2016 11:57 AM, Tobias Jakobi wrote: > Hello Shuah, > > > Shuah Khan wrote: >> On 10/19/2016 04:27 PM, Shuah Khan wrote: >>> On 10/19/2016 08:16 AM, Inki Dae wrote: >>>> Hi Shuah, >>>> >>>> 2016-10-13 8:11 GMT+09:00 Shuah Kha

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-10-25 Thread Shuah Khan
On 10/19/2016 04:27 PM, Shuah Khan wrote: > On 10/19/2016 08:16 AM, Inki Dae wrote: >> Hi Shuah, >> >> 2016-10-13 8:11 GMT+09:00 Shuah Khan : >>> Hi Inki, >>> >>> On 08/15/2016 10:40 PM, Inki Dae wrote: >>> >>>>> >>>

exynos-drm: display manager fails to start without IOMMU problem

2016-10-19 Thread Shuah Khan
On 10/19/2016 10:23 AM, Tobias Jakobi wrote: > Hello Shuah, > > just a short note that more misleading comments about default allocation > flags can be found in libdrm. > > https://cgit.freedesktop.org/mesa/drm/tree/exynos/exynos_drm.c > > See e.g. the comment for exynos

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-10-19 Thread Shuah Khan
On 10/19/2016 08:16 AM, Inki Dae wrote: > Hi Shuah, > > 2016-10-13 8:11 GMT+09:00 Shuah Khan : >> Hi Inki, >> >> On 08/15/2016 10:40 PM, Inki Dae wrote: >> >>>> >>>> okay the very first commit that added IOMMU support >>>> int

exynos-drm: display manager fails to start without IOMMU problem

2016-10-17 Thread Shuah Khan
an avoid such breaks in the future by keeping kernel and xf86-video-armsoc in sync. thanks, -- Shuah

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-10-12 Thread Shuah Khan
On 10/12/2016 05:11 PM, Shuah Khan wrote: + Fixing Krzysztof Kozlowski address. > Hi Inki, > > On 08/15/2016 10:40 PM, Inki Dae wrote: > >>> >>> okay the very first commit that added IOMMU support >>> introduced the code that rejects non-contig gem memory

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-10-12 Thread Shuah Khan
lan? I can submit a patch to xf86-video-armsoc. I am also looking ahead to see if we can avoid such breaks in the future by keeping kernel and xf86-video-armsoc in sync. thanks, -- Shuah

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-08-12 Thread Shuah Khan
On 08/12/2016 11:28 AM, Shuah Khan wrote: > On 08/10/2016 05:05 PM, Shuah Khan wrote: >> On 08/10/2016 04:59 PM, Inki Dae wrote: >>> Hi Shuah, >>> >>> 2016년 08월 11일 02:30에 Shuah Khan 이(가) 쓴 글: >>>> Fix exynos_drm_gem_create

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-08-12 Thread Shuah Khan
On 08/10/2016 05:05 PM, Shuah Khan wrote: > On 08/10/2016 04:59 PM, Inki Dae wrote: >> Hi Shuah, >> >> 2016년 08월 11일 02:30에 Shuah Khan 이(가) 쓴 글: >>> Fix exynos_drm_gem_create_ioctl() attempts to allocate non-contiguous GEM >>> memory without

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-08-10 Thread Shuah Khan
On 08/10/2016 04:59 PM, Inki Dae wrote: > Hi Shuah, > > 2016년 08월 11일 02:30에 Shuah Khan 이(가) 쓴 글: >> Fix exynos_drm_gem_create_ioctl() attempts to allocate non-contiguous GEM >> memory without IOMMU. In this case, there is no point in attempting to > >

[PATCH] exynos-drm: Fix display manager failing to start without IOMMU problem

2016-08-10 Thread Shuah Khan
start. Check if non-contiguous GEM memory is requested without IOMMU. If so, allocate contiguous GEM memory to help display manager start. Signed-off-by: Shuah Khan --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/gpu/drm

[PATCH] exynos-drm: Fix error messages to print flags and size

2016-08-10 Thread Shuah Khan
Fix exynos_drm_gem_create() error messages to include flags and size when flags and size are invalid. Signed-off-by: Shuah Khan --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers

[PATCH v2] exynos-drm: Fix unsupported GEM memory type error message to be clear

2016-08-08 Thread Shuah Khan
Fix unsupported GEM memory type error message to include the memory type information. Signed-off-by: Shuah Khan --- Changes since v1: -- Comment changed to read clearly drivers/gpu/drm/exynos/exynos_drm_fb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu

[PATCH] exynos-drm: Fix unsupported GEM memory type error message to be clear

2016-08-08 Thread Shuah Khan
On 08/08/2016 10:56 AM, Krzysztof Kozlowski wrote: > On Fri, Aug 05, 2016 at 07:50:06PM -0600, Shuah Khan wrote: >> Fix unsupported GEM memory type error message to include the memory type >> information. >> >> Signed-off-by: Shuah Khan >> --- >> dri

[PATCH] exynos-drm: Fix unsupported GEM memory type error message to be clear

2016-08-05 Thread Shuah Khan
Fix unsupported GEM memory type error message to include the memory type information. Signed-off-by: Shuah Khan --- drivers/gpu/drm/exynos/exynos_drm_fb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_fb.c b/drivers/gpu/drm/exynos

[RFC PATCH v1 9/9] selftest: sync: disable tests that rely on not yet defined behaviour

2016-03-09 Thread Shuah Khan
> err += RUN_TEST(test_fence_wait_on_destroyed_timeline); > +#endif It would be useful to have a real define here that can be enabled later easily instead of if 0. thanks, -- Shuah > err += RUN_TEST(test_stress_two_threads_shared_timeline); > err

  1   2   >