aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/android/ion (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282Thomas Gleixner3-30/+3
Based on 1 normalized pattern(s): this software is licensed under the terms of the gnu general public license version 2 as published by the free software foundation and may be copied distributed and modified under those terms this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 285 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Reviewed-by: Allison Randal <allison@lohutok.net> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141900.642774971@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-21treewide: Add SPDX license identifier - Makefile/KconfigThomas Gleixner1-0/+1
Add SPDX license identifiers to all Make/Kconfig files which: - Have no license information of any form These files fall under the project license, GPL v2 only. The resulting SPDX license identifier is: GPL-2.0-only Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-09-05selftests: add headers_install to lib.mkAnders Roxell1-0/+2
If the kernel headers aren't installed we can't build all the tests. Add a new make target rule 'khdr' in the file lib.mk to generate the kernel headers and that gets include for every test-dir Makefile that includes lib.mk If the testdir in turn have its own sub-dirs the top_srcdir needs to be set to the linux-rootdir to be able to generate the kernel headers. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Reviewed-by: Fathi Boudra <fathi.boudra@linaro.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-08-27selftests: android: move config up a levelAnders Roxell1-5/+0
'make kselftest-merge' assumes that the config files for the tests are located under the 'main' test dir, like tools/testing/selftests/android/ and not in a subdir to android. Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-07-11selftests/android: initialize heap_type to avoid compiling warningLi Zhijian1-0/+1
Initialize heap_type to ION_HEAP_TYPE_SYSTEM to avoid "used uninitialized" compiler warning. heap_type gets used after initialization, this change is to just keep the compiler happy. root@vm-lkp-nex04-8G-7 ~/linux-v4.18-rc2/tools/testing/selftests/android# make make[1]: warning: jobserver unavailable: using -j1. Add '+' to parent make rule. make[1]: Entering directory '/root/linux-v4.18-rc2/tools/testing/selftests/android/ion' gcc -I. -I../../../../../drivers/staging/android/uapi/ -I../../../../../usr/include/ -Wall -O2 -g ionapp_export.c ipcsocket.c ionutils.c -o ionapp_export ionapp_export.c: In function 'main': ionapp_export.c:91:2: warning: 'heap_type' may be used uninitialized in this function [-Wmaybe-uninitialized] printf("heap_type: %ld, heap_size: %ld\n", heap_type, heap_size); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CC: Shuah Khan <shuah@kernel.org> CC: Pintu Agarwal <pintu.ping@gmail.com> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-05-30selftests: android: ion: return Kselftest Skip code for skipped testsShuah Khan (Samsung OSG)1-2/+5
When ion test is skipped because of unmet dependencies and/or unsupported configuration, it returns 0 which is treated as a pass by the Kselftest framework. This leads to false positive result even when the test could not be run. Change it to return kselftest skip code when a test gets skipped to clearly report that the test could not be run. Kselftest framework SKIP code is 4 and the framework prints appropriate messages to indicate that the test is skipped. Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org> Acked-by: Pintu Agarwal <pintu.ping@gmail.com> Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-03-21selftests/android/ion: Makefile: fix build errorAnders Roxell2-1/+2
Fails to build iomap_test.c due to missing include gcc -I. -I../../../../../drivers/staging/android/uapi/ -Wall -O2 -g ionmap_test.c ipcsocket.c ionutils.c -o ionmap_test ionmap_test.c:12:27: fatal error: linux/dma-buf.h: No such file or directory #include <linux/dma-buf.h> ^ compilation terminated. <builtin>: recipe for target 'ionmap_test' failed make[2]: *** [ionmap_test] Error 1 In the current code, we add a new -I ../../../../../usr/include/ to the INCLUDEDIR variable. Also add ionmap_test to the .gitignore file. Fixes: ac93f7046a53 ("selftests: ion: Add simple test with the vgem driver") Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Acked-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2018-03-05selftests: ion: Add simple test with the vgem driverLaura Abbott3-1/+139
Ion is designed to be a framework used by other clients who perform operations on the buffer. Use the DRM vgem client as a simple consumer. In conjunction with the dma-buf sync ioctls, this tests the full attach/map path for the system heap. Signed-off-by: Laura Abbott <labbott@redhat.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2018-03-05selftests: ion: Remove some printsLaura Abbott1-6/+0
There's no need to print messages each time we alloc and free. Remove them. Signed-off-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
2017-11-15android/ion: userspace test utility for ion buffer sharingPintu Agarwal12-0/+1120
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 <pintu.ping@gmail.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>