<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/linux.git/tools/testing/selftests/ipc, branch v4.9.334</title>
<subtitle>Linux Kernel
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.334</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/atom?h=v4.9.334'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/'/>
<updated>2020-05-10T08:28:00Z</updated>
<entry>
<title>selftests/ipc: Fix test failure seen after initial test run</title>
<updated>2020-05-10T08:28:00Z</updated>
<author>
<name>Tyler Hicks</name>
<email>tyhicks@linux.microsoft.com</email>
</author>
<published>2020-04-13T20:21:45Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=bca8fdc1cc586e2e222462bee9eaa67a2c0b0758'/>
<id>urn:sha1:bca8fdc1cc586e2e222462bee9eaa67a2c0b0758</id>
<content type='text'>
[ Upstream commit b87080eab4c1377706c113fc9c0157f19ea8fed1 ]

After successfully running the IPC msgque test once, subsequent runs
result in a test failure:

  $ sudo ./run_kselftest.sh
  TAP version 13
  1..1
  # selftests: ipc: msgque
  # Failed to get stats for IPC queue with id 0
  # Failed to dump queue: -22
  # Bail out!
  # # Pass 0 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0
  not ok 1 selftests: ipc: msgque # exit=1

The dump_queue() function loops through the possible message queue index
values using calls to msgctl(kern_id, MSG_STAT, ...) where kern_id
represents the index value. The first time the test is ran, the initial
index value of 0 is valid and the test is able to complete. The index
value of 0 is not valid in subsequent test runs and the loop attempts to
try index values of 1, 2, 3, and so on until a valid index value is
found that corresponds to the message queue created earlier in the test.

The msgctl() syscall returns -1 and sets errno to EINVAL when invalid
index values are used. The test failure is caused by incorrectly
comparing errno to -EINVAL when cycling through possible index values.

Fix invalid test failures on subsequent runs of the msgque test by
correctly comparing errno values to a non-negated EINVAL.

Fixes: 3a665531a3b7 ("selftests: IPC message queue copy feature test")
Signed-off-by: Tyler Hicks &lt;tyhicks@linux.microsoft.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>selftests: add missing .gitignore file or entry</title>
<updated>2016-02-25T20:16:36Z</updated>
<author>
<name>Sudeep Holla</name>
<email>sudeep.holla@arm.com</email>
</author>
<published>2016-02-25T13:57:07Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3b48bfc0ab997d43fa89190c769a881db853c569'/>
<id>urn:sha1:3b48bfc0ab997d43fa89190c769a881db853c569</id>
<content type='text'>
Only IPC selftest is missing the .gitignore file, so add it.
Also step_after_suspend_test is missing in breakpoints selftest
.gitignore file

Signed-off-by: Sudeep Holla &lt;sudeep.holla@arm.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: create test-specific kconfig fragments</title>
<updated>2016-02-25T16:47:52Z</updated>
<author>
<name>Bamvor Jian Zhang</name>
<email>bamvor.zhangjian@linaro.org</email>
</author>
<published>2016-01-08T07:27:33Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=8c749ce93ee69e789e46b3be98de9e0cbfcf8ed8'/>
<id>urn:sha1:8c749ce93ee69e789e46b3be98de9e0cbfcf8ed8</id>
<content type='text'>
Create the config file in each directory of testcase which need
more kernel configuration than the default defconfig. User could
use these configs with merge_config.sh script:

Enable config for specific testcase:
(export ARCH=xxx #for cross compiling)
./scripts/kconfig/merge_config.sh .config \
		tools/testing/selftests/xxx/config

Enable configs for all testcases:
(export ARCH=xxx #for cross compiling)
./scripts/kconfig/merge_config.sh .config \
		tools/testing/selftests/*/config

Signed-off-by: Bamvor Jian Zhang &lt;bamvor.zhangjian@linaro.org&gt;
Reviewed-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftest/ipc: enable cross compilation</title>
<updated>2015-04-02T18:41:52Z</updated>
<author>
<name>Tyler Baker</name>
<email>tyler.baker@linaro.org</email>
</author>
<published>2015-04-01T23:20:19Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5de830490454315fa64fd42a6efa6ad83bf123da'/>
<id>urn:sha1:5de830490454315fa64fd42a6efa6ad83bf123da</id>
<content type='text'>
Use the CC variable instead of hard coding gcc.

Signed-off-by: Tyler Baker &lt;tyler.baker@linaro.org&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests: Introduce minimal shared logic for running tests</title>
<updated>2015-03-13T21:13:40Z</updated>
<author>
<name>Michael Ellerman</name>
<email>mpe@ellerman.id.au</email>
</author>
<published>2015-03-11T04:05:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=5e29a9105b1a0da86eff0ad6ae015997b49d4d1d'/>
<id>urn:sha1:5e29a9105b1a0da86eff0ad6ae015997b49d4d1d</id>
<content type='text'>
This adds a Make include file which most selftests can then include to
get the run_tests logic.

On its own this has the advantage of some reduction in repetition, and
also means the pass/fail message is defined in fewer places.

However the key advantage is it will allow us to implement install very
simply in a subsequent patch.

The default implementation just executes each program in $(TEST_PROGS).

We use a variable to hold the default implementation of $(RUN_TESTS)
because that gives us a clean way to override it if necessary, ie. using
override. The mount, memory-hotplug and mqueue tests use that to provide
a different implementation.

Tests are not run via /bin/bash, so if they are scripts they must be
executable, we add a+x to several.

Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>selftests/ipc: change test to use ksft framework</title>
<updated>2014-11-17T17:39:15Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuahkh@osg.samsung.com</email>
</author>
<published>2014-10-03T15:07:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=56661564e1fea94c42289edd59361a1f87932410'/>
<id>urn:sha1:56661564e1fea94c42289edd59361a1f87932410</id>
<content type='text'>
Change ipc test to use kselftest framework to report
test results. With this change this test exits with
EXIT_FAIL instead of -errno. Changed print errno in
test fail messages to not loose that information.

Signed-off-by: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
</content>
</entry>
<entry>
<title>tools: selftests: fix build issue with make kselftests target</title>
<updated>2014-08-29T23:28:17Z</updated>
<author>
<name>Phong Tran</name>
<email>tranmanphong@gmail.com</email>
</author>
<published>2014-08-29T22:19:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=498b473af9c20a4cb533297dc43b063f35f86349'/>
<id>urn:sha1:498b473af9c20a4cb533297dc43b063f35f86349</id>
<content type='text'>
Fix the typo of ARCH when running 'make kselftests'.  Change the 'X86'
to 'x86'.  Test by compilation.

Signed-off-by: Phong Tran &lt;tranmanphong@gmail.com&gt;
Cc: David Herrmann &lt;dh.herrmann@gmail.com&gt;
Cc: Hugh Dickins &lt;hughd@google.com&gt;
Cc: Shuah Khan &lt;shuah.kh@samsung.com&gt;
Cc: Sam Ravnborg &lt;sam@ravnborg.org&gt;
Cc: Michal Marek &lt;mmarek@suse.cz&gt;
Cc: Shuah Khan &lt;shuahkh@osg.samsung.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/testing/selftests/ipc/msgque.c: improve error handling when not running as root</title>
<updated>2014-07-03T16:21:54Z</updated>
<author>
<name>Shuah Khan</name>
<email>shuah.kh@samsung.com</email>
</author>
<published>2014-07-02T22:22:37Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=e84f1ab33c76157fd061352b56c4fac9e0f2e8e1'/>
<id>urn:sha1:e84f1ab33c76157fd061352b56c4fac9e0f2e8e1</id>
<content type='text'>
The test fails in the middle when it is not run as root while accessing
/proc/sys/kernel/msg_next_id.  Changed it to check for root at the
beginning of the test and exit if not root.

Signed-off-by: Shuah Khan &lt;shuah.kh@samsung.com&gt;
Cc: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Cc: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Cc: Colin Ian King &lt;colin.king@canonical.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>tools/testing/selftests/ipc/msgque.c: handle msgget failure return correctly</title>
<updated>2014-03-11T00:26:21Z</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2014-03-10T22:49:50Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=53942232369ec317f77dc8c2d5a0637bb85a6e84'/>
<id>urn:sha1:53942232369ec317f77dc8c2d5a0637bb85a6e84</id>
<content type='text'>
A failed msgget causes the test to return an uninitialised value in ret.
Assign ret to -errno on error exit.

Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Acked-by: Davidlohr Bueso &lt;davidlohr@hp.com&gt;
Cc: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>selftests: IPC message queue copy feature test</title>
<updated>2013-01-05T00:11:45Z</updated>
<author>
<name>Stanislav Kinsbursky</name>
<email>skinsbursky@parallels.com</email>
</author>
<published>2013-01-04T23:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/linux.git/commit/?id=3a665531a3b7c2ad2c87903b24646be6916340e4'/>
<id>urn:sha1:3a665531a3b7c2ad2c87903b24646be6916340e4</id>
<content type='text'>
This test can be used to check wheither kernel supports IPC message queue
copy and restore features (required by CRIU project).

Signed-off-by: Stanislav Kinsbursky &lt;skinsbursky@parallels.com&gt;
Cc: Serge Hallyn &lt;serge.hallyn@canonical.com&gt;
Cc: "Eric W. Biederman" &lt;ebiederm@xmission.com&gt;
Cc: Pavel Emelyanov &lt;xemul@parallels.com&gt;
Cc: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Cc: KOSAKI Motohiro &lt;kosaki.motohiro@jp.fujitsu.com&gt;
Cc: Michael Kerrisk &lt;mtk.manpages@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
