<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests/android, branch v5.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v5.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2018-12-13T23:51:30Z</updated>
<entry>
<title>selftests: Fix test errors related to lib.mk khdr target</title>
<updated>2018-12-13T23:51:30Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuah@kernel.org</email>
</author>
<published>2018-12-13T03:25:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=211929fd3f7c8de4d541b1cc243b82830e5ea1e8'/>
<id>urn:sha1:211929fd3f7c8de4d541b1cc243b82830e5ea1e8</id>
<content type='text'>
Commit b2d35fa5fc80 ("selftests: add headers_install to lib.mk") added
khdr target to run headers_install target from the main Makefile. The
logic uses KSFT_KHDR_INSTALL and top_srcdir as controls to initialize
variables and include files to run headers_install from the top level
Makefile. There are a few problems with this logic.

1. Exposes top_srcdir to all tests
2. Common logic impacts all tests
3. Uses KSFT_KHDR_INSTALL, top_srcdir, and khdr in an adhoc way. Tests
   add "khdr" dependency in their Makefiles to TEST_PROGS_EXTENDED in
   some cases, and STATIC_LIBS in other cases. This makes this framework
   confusing to use.

The common logic that runs for all tests even when KSFT_KHDR_INSTALL
isn't defined by the test. top_srcdir is initialized to a default value
when test doesn't initialize it. It works for all tests without a sub-dir
structure and tests with sub-dir structure fail to build.

e.g: make -C sparc64/drivers/ or make -C drivers/dma-buf

../../lib.mk:20: ../../../../scripts/subarch.include: No such file or directory
make: *** No rule to make target '../../../../scripts/subarch.include'.  Stop.

There is no reason to require all tests to define top_srcdir and there is
no need to require tests to add khdr dependency using adhoc changes to
TEST_* and other variables.

Fix it with a consistent use of KSFT_KHDR_INSTALL and top_srcdir from tests
that have the dependency on headers_install.

Change common logic to include khdr target define and "all" target with
dependency on khdr when KSFT_KHDR_INSTALL is defined.

Only tests that have dependency on headers_install have to define just
the KSFT_KHDR_INSTALL, and top_srcdir variables and there is no need to
specify khdr dependency in the test Makefiles.

Fixes: b2d35fa5fc80 ("selftests: add headers_install to lib.mk")
Cc: stable@vger.kernel.org
Signed-off-by: Shuah Khan &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: add headers_install to lib.mk</title>
<updated>2018-09-05T14:12:09Z</updated>
<author>
<name>Anders Roxell</name>
<email>anders.roxell@linaro.org</email>
</author>
<published>2018-09-04T10:47:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b2d35fa5fc80c27e868e393dcab4c94a0d71737f'/>
<id>urn:sha1:b2d35fa5fc80c27e868e393dcab4c94a0d71737f</id>
<content type='text'>
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 &lt;anders.roxell@linaro.org&gt;
Reviewed-by: Fathi Boudra &lt;fathi.boudra@linaro.org&gt;
Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: android: move config up a level</title>
<updated>2018-08-27T19:35:57Z</updated>
<author>
<name>Anders Roxell</name>
<email>anders.roxell@linaro.org</email>
</author>
<published>2018-08-24T12:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=88bc243a3f22b9938c0b53c577dee28025cdb920'/>
<id>urn:sha1:88bc243a3f22b9938c0b53c577dee28025cdb920</id>
<content type='text'>
'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 &lt;anders.roxell@linaro.org&gt;
Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/android: initialize heap_type to avoid compiling warning</title>
<updated>2018-07-11T16:13:17Z</updated>
<author>
<name>Li Zhijian</name>
<email>lizhijian@cn.fujitsu.com</email>
</author>
<published>2018-07-11T02:08:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=cc7c673032fc7427087e74b75f732b43db38a256'/>
<id>urn:sha1:cc7c673032fc7427087e74b75f732b43db38a256</id>
<content type='text'>
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 &lt;shuah@kernel.org&gt;
CC: Pintu Agarwal &lt;pintu.ping@gmail.com&gt;
Signed-off-by: Li Zhijian &lt;lizhijian@cn.fujitsu.com&gt;
Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: android: ion: return Kselftest Skip code for skipped tests</title>
<updated>2018-05-30T21:21:52Z</updated>
<author>
<name>Shuah Khan (Samsung OSG)</name>
<email>shuah@kernel.org</email>
</author>
<published>2018-05-02T21:28:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5104acdb9f3a71691e714ce6863b17bd64fb5440'/>
<id>urn:sha1:5104acdb9f3a71691e714ce6863b17bd64fb5440</id>
<content type='text'>
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) &lt;shuah@kernel.org&gt;
Acked-by: Pintu Agarwal &lt;pintu.ping@gmail.com&gt;
Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: android: delete RUN_TESTS and EMIT_TESTS overrides</title>
<updated>2018-05-30T21:21:52Z</updated>
<author>
<name>Shuah Khan (Samsung OSG)</name>
<email>shuah@kernel.org</email>
</author>
<published>2018-05-02T01:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bf1fc76b5199ada84874f98d96bbeec20662bcbc'/>
<id>urn:sha1:bf1fc76b5199ada84874f98d96bbeec20662bcbc</id>
<content type='text'>
Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work just fine and there is no need to define
custom overrides.

Signed-off-by: Shuah Khan (Samsung OSG) &lt;shuah@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests/android/ion: Makefile: fix build error</title>
<updated>2018-03-21T16:40:04Z</updated>
<author>
<name>Anders Roxell</name>
<email>anders.roxell@linaro.org</email>
</author>
<published>2018-03-08T14:37:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=55c1b5f4af398f5776add417ddf8ae9cc574f0b7'/>
<id>urn:sha1:55c1b5f4af398f5776add417ddf8ae9cc574f0b7</id>
<content type='text'>
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 &lt;linux/dma-buf.h&gt;
                           ^
compilation terminated.
&lt;builtin&gt;: 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 &lt;anders.roxell@linaro.org&gt;
Acked-by: Laura Abbott &lt;labbott@redhat.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: ion: Add simple test with the vgem driver</title>
<updated>2018-03-06T01:56:24Z</updated>
<author>
<name>Laura Abbott</name>
<email>labbott@redhat.com</email>
</author>
<published>2018-02-16T01:24:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ac93f7046a5371ff08268965c9a696bf97bec105'/>
<id>urn:sha1:ac93f7046a5371ff08268965c9a696bf97bec105</id>
<content type='text'>
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 &lt;labbott@redhat.com&gt;
Reviewed-by: Daniel Vetter &lt;daniel.vetter@ffwll.ch&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: ion: Remove some prints</title>
<updated>2018-03-06T01:56:14Z</updated>
<author>
<name>Laura Abbott</name>
<email>labbott@redhat.com</email>
</author>
<published>2018-02-16T01:24:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=829dd7d642c90b641f14aed03a722a4d3e058083'/>
<id>urn:sha1:829dd7d642c90b641f14aed03a722a4d3e058083</id>
<content type='text'>
There's no need to print messages each time we alloc and free. Remove them.

Signed-off-by: Laura Abbott &lt;labbott@redhat.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests/android: Fix line continuation in Makefile</title>
<updated>2018-02-13T20:59:39Z</updated>
<author>
<name>Daniel Díaz</name>
<email>daniel.diaz@linaro.org</email>
</author>
<published>2018-02-06T23:52:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=64136fb76039defd193e9e885bb722919d220021'/>
<id>urn:sha1:64136fb76039defd193e9e885bb722919d220021</id>
<content type='text'>
The Makefile lacks a couple of line continuation backslashes
in an `if' clause, which can make the subsequent rsync
command go awry over the whole filesystem (`rsync -a / /`).

  /bin/sh: -c: line 5: syntax error: unexpected end of file
  make[1]: [all] Error 1 (ignored)
  TEST=$DIR"_test.sh"; \
                  if [ -e $DIR/$TEST ]; then
  /bin/sh: -c: line 2: syntax error: unexpected end of file
  make[1]: [all] Error 1 (ignored)
  rsync -a $DIR/$TEST $BUILD_TARGET/;
  [...a myriad of:]
  [  rsync: readlink_stat("...") failed: Permission denied (13)]
  [  skipping non-regular file "..."]
  [  rsync: opendir "..." failed: Permission denied (13)]
  [and many other errors...]
  fi
  make[1]: fi: Command not found
  make[1]: [all] Error 127 (ignored)
  done
  make[1]: done: Command not found
  make[1]: [all] Error 127 (ignored)

Signed-off-by: Daniel Díaz &lt;daniel.diaz@linaro.org&gt;
Acked-by: Pintu Agarwal &lt;pintu.ping@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
</feed>
