Received: by 10.223.164.221 with SMTP id h29csp2337092wrb; Thu, 2 Nov 2017 09:20:24 -0700 (PDT) X-Google-Smtp-Source: ABhQp+TV1iuInu/tQ8h6Sd3g4ZMS/aN7bxWMyeq+OXh8AJWfpGsmdOB9UUqyk/+MznGQJ/pp1lWr X-Received: by 10.98.62.142 with SMTP id y14mr4406080pfj.83.1509639624022; Thu, 02 Nov 2017 09:20:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1509639623; cv=none; d=google.com; s=arc-20160816; b=OX6qLqqfTYgWURb0KQ/hMjdJfa+pMTakkFW42foiLr2FSrkSgyotGNzcFksodGGCan 6d2yntMIuQfuff1HaddLMzlfmgD7TbkOWrR5/IaLpwzqBHC89Is2pPOZk4QWocwTljhk 0CdPzNFN7V2LETysyDvyLjVrMuQ5sfQHoEDeTXIe+pXjUFzwPSLLBubJBACjp59Hj6Es ISJFDfy0wl6vLVKta8OrVBazgABXvNYG991WJHKYZiMhWs6tEnVcK+wuq9pQVXiHWrdH WqSKTYtSDWxW0cH2xSloMV4z03pzQ1nAlWdDNqSJKz836D14iXRqZbc8j5Ev/Uvvz59l +yIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=AoyTAjqMqXP8YlDinT3VeWpi4yyL3/pzZ5q9L8JM5Eg=; b=WnP688xU57HXRXqKIjth+aGLPQ833yH2DUL4gCTEH0Dh7hijB+SV2iBbx5rEaJl4Rm eaarSq+pfFfjI5w27vw3X2fyD/6TUbiP+eHRtN0lxPfJZxDjhYSaQzx22+6WhfQu4jL5 KZ6fMz0/Rbs8Vers32X+nz2YtN852fwu71UbP02mVVDJvLr9kZzpInadcgW1GebGBA63 1vC7MXyO2PZzNMwv/NDhtCEJLu6f1WtWoasPVkEnGHaWjWqQpG1x0QLgfBbg8uVe0nJw hUjt28njQnUuzDi3lk/EjUm+vVW5ZjWd0PFePRQO+nA4FTdylpMkAjVfN7xPgfFbMR3Y tUqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k184si3899013pgk.79.2017.11.02.09.20.09; Thu, 02 Nov 2017 09:20:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934116AbdKBQTW (ORCPT + 97 others); Thu, 2 Nov 2017 12:19:22 -0400 Received: from osg.samsung.com ([64.30.133.232]:49035 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933933AbdKBQTU (ORCPT ); Thu, 2 Nov 2017 12:19:20 -0400 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 53A80162C1; Thu, 2 Nov 2017 09:19:19 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nwZp6L_5XRtK; Thu, 2 Nov 2017 09:19:11 -0700 (PDT) Received: from [192.168.1.87] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) by osg.samsung.com (Postfix) with ESMTPSA id 70E88162B7; Thu, 2 Nov 2017 09:19:10 -0700 (PDT) Subject: Re: [PATCHv5 1/1] [tools/selftests]: android/ion: userspace test utility for ion buffer sharing To: Pintu Kumar , shuah@kernel.org Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Laura Abbott , Greg Kroah-Hartman , dvhart@infradead.org, Bamvor Zhang Jian , Pintu Kumar , Shuah Khan , Shuah Khan References: <1508801195-5369-1-git-send-email-pintu.ping@gmail.com> <1509555639-26128-1-git-send-email-pintu.ping@gmail.com> <014ae05d-0404-10de-bcc8-7d18f441566a@kernel.org> From: Shuah Khan Message-ID: <3304c07d-b578-2fd5-1937-22a7869021bf@osg.samsung.com> Date: Thu, 2 Nov 2017 10:19:09 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11/02/2017 10:15 AM, Pintu Kumar wrote: > On Thu, Nov 2, 2017 at 8:37 PM, Shuah Khan wrote: >> Hi Pintu, >> >> On 11/01/2017 11:00 AM, Pintu Agarwal wrote: >>> This is a test utility to verify ION buffer sharing in user space >>> between 2 independent processes. >>> It uses unix domain socket (with SCM_RIGHTS) as IPC to transfer an FD to >>> another process to share the same buffer. >>> This utility demonstrates how ION buffer sharing can be implemented between >>> two user space processes, using various heap types. >>> >>> This utility is made to be run as part of kselftest framework in kernel. >>> The utility is verified on Ubuntu-32 bit system with Linux Kernel 4.14, >>> using ION system heap. >>> >>> For more information about the utility please check the README file. >>> >>> Signed-off-by: Pintu Agarwal >>> --- >>> tools/testing/selftests/Makefile | 3 +- >>> tools/testing/selftests/android/Makefile | 46 ++++ >>> tools/testing/selftests/android/ion/.gitignore | 2 + >>> tools/testing/selftests/android/ion/Makefile | 16 ++ >>> tools/testing/selftests/android/ion/README | 101 ++++++++ >>> tools/testing/selftests/android/ion/config | 4 + >>> tools/testing/selftests/android/ion/ion.h | 143 ++++++++++++ >>> tools/testing/selftests/android/ion/ion_test.sh | 55 +++++ >>> .../testing/selftests/android/ion/ionapp_export.c | 135 +++++++++++ >>> .../testing/selftests/android/ion/ionapp_import.c | 88 +++++++ >>> tools/testing/selftests/android/ion/ionutils.c | 259 +++++++++++++++++++++ >>> tools/testing/selftests/android/ion/ionutils.h | 55 +++++ >>> tools/testing/selftests/android/ion/ipcsocket.c | 227 ++++++++++++++++++ >>> tools/testing/selftests/android/ion/ipcsocket.h | 35 +++ >>> tools/testing/selftests/android/run.sh | 3 + >>> 15 files changed, 1171 insertions(+), 1 deletion(-) >>> create mode 100644 tools/testing/selftests/android/Makefile >>> create mode 100644 tools/testing/selftests/android/ion/.gitignore >>> create mode 100644 tools/testing/selftests/android/ion/Makefile >>> create mode 100644 tools/testing/selftests/android/ion/README >>> create mode 100644 tools/testing/selftests/android/ion/config >>> create mode 100644 tools/testing/selftests/android/ion/ion.h >>> create mode 100755 tools/testing/selftests/android/ion/ion_test.sh >>> create mode 100644 tools/testing/selftests/android/ion/ionapp_export.c >>> create mode 100644 tools/testing/selftests/android/ion/ionapp_import.c >>> create mode 100644 tools/testing/selftests/android/ion/ionutils.c >>> create mode 100644 tools/testing/selftests/android/ion/ionutils.h >>> create mode 100644 tools/testing/selftests/android/ion/ipcsocket.c >>> create mode 100644 tools/testing/selftests/android/ion/ipcsocket.h >>> create mode 100755 tools/testing/selftests/android/run.sh >>> >>> diff --git a/tools/testing/selftests/Makefile b/tools/testing/selftests/Makefile >>> index ff80564..61bc77b 100644 >>> --- a/tools/testing/selftests/Makefile >>> +++ b/tools/testing/selftests/Makefile >>> @@ -1,4 +1,5 @@ >>> -TARGETS = bpf >>> +TARGETS = android >> >> Based on our discussion on dependency on staging headers, let's not add >> this test to kselftest run. Remove it from here and users can run it >> as needed. >> >>> +TARGETS += bpf >>> TARGETS += breakpoints >>> TARGETS += capabilities >>> TARGETS += cpufreq >>> diff --git a/tools/testing/selftests/android/Makefile b/tools/testing/selftests/android/Makefil> new file mode 100644 >>> index 0000000..1a74922 >>> --- /dev/null >>> +++ b/tools/testing/selftests/android/Makefile >>> @@ -0,0 +1,46 @@ >>> +SUBDIRS := ion >>> + >>> +TEST_PROGS := run.sh >>> + >>> +.PHONY: all clean >>> + >>> +include ../lib.mk >>> + >>> +all: >>> + @for DIR in $(SUBDIRS); do \ >>> + BUILD_TARGET=$(OUTPUT)/$$DIR; \ >>> + mkdir $$BUILD_TARGET -p; \ >>> + make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ >>> + #SUBDIR test prog name should be in the form: SUBDIR_test.sh >>> + TEST=$$DIR"_test.sh"; \ >>> + if [ -e $$DIR/$$TEST ]; then >>> + rsync -a $$DIR/$$TEST $$BUILD_TARGET/; >>> + fi >>> + done >>> + >>> +override define RUN_TESTS >>> + @cd $(OUTPUT); ./run.sh >>> +endef >>> + >>> +override define INSTALL_RULE >>> + mkdir -p $(INSTALL_PATH) >>> + install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES) >>> + >>> + @for SUBDIR in $(SUBDIRS); do \ >>> + BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \ >>> + mkdir $$BUILD_TARGET -p; \ >>> + $(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \ >>> + done; >>> +endef >>> + >>> +override define EMIT_TESTS >>> + echo "./run.sh" >>> +endef >>> + >>> +override define CLEAN >>> + @for DIR in $(SUBDIRS); do \ >>> + BUILD_TARGET=$(OUTPUT)/$$DIR; \ >>> + mkdir $$BUILD_TARGET -p; \ >>> + make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\ >>> + done >>> +endef >> >> This Makefile is fine, you still want to leverage common run_tests target >> in lib.mk Install and emit tests should be fine, because these are built >> in the source tree. I am looking to avoid attempts to build this test >> outside kernel tree. > > Ok, I understood what you mean. > You want to remove ion test from kselftest build, but still maintain > the test code inside selftest. > Yes, I agree with this, kselftest will succeed (outside of kernel > source tree), and still somebody can build and run it locally. Right. > > But, my concern is, whole this recent patches were made to include it > into kselftest framework. > Otherwise in my previous patch, I included it under: > tools/testing/android (outside of selftest). I do want this test under kselftest framework. It doesn't make sense to add this under tools/testing/adroid. At some point we could add it to the selftest/Makefile TARGETS list for it to be run very easily if it resides under selftests. > > If, removing the android/ion from kselftest is fine (as of now), I can > push the new changes by tomorrow. > Just waiting for Greg and Laura to confirm... > > Thanks, > Pintu > thanks, -- Shuah From 1582971610424772548@xxx Thu Nov 02 16:16:08 +0000 2017 X-GM-THRID: 1579656416160844925 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread