<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/tools/testing/selftests, branch v3.9</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=v3.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2013-03-06T14:46:04Z</updated>
<entry>
<title>efivars: efivarfs_valid_name() should handle pstore syntax</title>
<updated>2013-03-06T14:46:04Z</updated>
<author>
<name>Matt Fleming</name>
<email>matt.fleming@intel.com</email>
</author>
<published>2013-03-05T07:40:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=123abd76edf56c02a76b46d3d673897177ef067b'/>
<id>urn:sha1:123abd76edf56c02a76b46d3d673897177ef067b</id>
<content type='text'>
Stricter validation was introduced with commit da27a24383b2b
("efivarfs: guid part of filenames are case-insensitive") and commit
47f531e8ba3b ("efivarfs: Validate filenames much more aggressively"),
which is necessary for the guid portion of efivarfs filenames, but we
don't need to be so strict with the first part, the variable name. The
UEFI specification doesn't impose any constraints on variable names
other than they be a NULL-terminated string.

The above commits caused a regression that resulted in users seeing
the following message,

  $ sudo mount -v /sys/firmware/efi/efivars mount: Cannot allocate memory

whenever pstore EFI variables were present in the variable store,
since their variable names failed to pass the following check,

    /* GUID should be right after the first '-' */
    if (s - 1 != strchr(str, '-'))

as a typical pstore filename is of the form, dump-type0-10-1-&lt;guid&gt;.
The fix is trivial since the guid portion of the filename is GUID_LEN
bytes, we can use (len - GUID_LEN) to ensure the '-' character is
where we expect it to be.

(The bogus ENOMEM error value will be fixed in a separate patch.)

Reported-by: Joseph Yasi &lt;joe.yasi@gmail.com&gt;
Tested-by: Joseph Yasi &lt;joe.yasi@gmail.com&gt;
Reported-by: Lingzhu Xiang &lt;lxiang@redhat.com&gt;
Cc: Josh Boyer &lt;jwboyer@redhat.com&gt;
Cc: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Cc: Matthew Garrett &lt;mjg59@srcf.ucam.org&gt;
Cc: &lt;stable@vger.kernel.org&gt; # v3.8
Signed-off-by: Matt Fleming &lt;matt.fleming@intel.com&gt;
</content>
</entry>
<entry>
<title>selftests: add a simple doc</title>
<updated>2013-02-28T03:10:24Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2013-02-28T01:05:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=80d03428597056f4e2d1aed389929ece7879dad1'/>
<id>urn:sha1:80d03428597056f4e2d1aed389929ece7879dad1</id>
<content type='text'>
This change adds a little documentation to the tests under
tools/testing/selftests/, based on akpm's explanation.

[akpm@linux-foundation.org: move from Documentation to tools/testing/selftests/README.txt]
Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Cc: Dave Young &lt;dyoung@redhat.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/Makefile: rearrange targets</title>
<updated>2013-02-28T03:10:24Z</updated>
<author>
<name>Andrew Morton</name>
<email>akpm@linux-foundation.org</email>
</author>
<published>2013-02-28T01:05:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=66a01b9659016cbb74dfac64861f28c71c804c97'/>
<id>urn:sha1:66a01b9659016cbb74dfac64861f28c71c804c97</id>
<content type='text'>
Do it one-per-line to reduce patch conflict pain.

Cc: Dave Young &lt;dyoung@redhat.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/efivarfs: add create-read test</title>
<updated>2013-02-28T03:10:24Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2013-02-28T01:05:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d974f67a528fa7ef5547318ea09bf581c8c1d3d9'/>
<id>urn:sha1:d974f67a528fa7ef5547318ea09bf581c8c1d3d9</id>
<content type='text'>
Test that reads from a newly-created efivarfs file (with no data written)
will return EOF.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Cc: Lingzhu Xiang &lt;lxiang@redhat.com&gt;
Cc: Dave Young &lt;dyoung@redhat.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/efivarfs: add empty file creation test</title>
<updated>2013-02-28T03:10:24Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2013-02-28T01:05:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=033a1a7fe7e27b9320496ca7da6905a5f654a768'/>
<id>urn:sha1:033a1a7fe7e27b9320496ca7da6905a5f654a768</id>
<content type='text'>
Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Cc: Lingzhu Xiang &lt;lxiang@redhat.com&gt;
Cc: Dave Young &lt;dyoung@redhat.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: add tests for efivarfs</title>
<updated>2013-02-28T03:10:24Z</updated>
<author>
<name>Jeremy Kerr</name>
<email>jk@ozlabs.org</email>
</author>
<published>2013-02-28T01:05:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=455ce1c721b1787e6695c535528034e9e7271f37'/>
<id>urn:sha1:455ce1c721b1787e6695c535528034e9e7271f37</id>
<content type='text'>
This change adds a few initial efivarfs tests to the
tools/testing/selftests directory.

The open-unlink test is based on code from Lingzhu Xiang.

Signed-off-by: Jeremy Kerr &lt;jk@ozlabs.org&gt;
Cc: Matt Fleming &lt;matt.fleming@intel.com&gt;
Cc: Lingzhu Xiang &lt;lxiang@redhat.com&gt;
Cc: Dave Young &lt;dyoung@redhat.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.shady.money/linux/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>
<entry>
<title>tools/testing/selftests/kcmp/kcmp_test.c: print reason for failure in kcmp_test</title>
<updated>2012-12-18T01:15:27Z</updated>
<author>
<name>Dave Jones</name>
<email>davej@redhat.com</email>
</author>
<published>2012-12-18T00:04:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=2bf1cbf1c616b4dd85a3a8a715af9c5701c16a91'/>
<id>urn:sha1:2bf1cbf1c616b4dd85a3a8a715af9c5701c16a91</id>
<content type='text'>
I was curious why sys_kcmp wasn't working, which led me to the testcase.
It turned out I hadn't enabled CHECKPOINT_RESTORE in the kernel I was
testing.  Add a decoding of errno to the testcase to make that obvious.

Signed-off-by: Dave Jones &lt;davej@redhat.com&gt;
Acked-by: Cyrill Gorcunov &lt;gorcunov@openvz.org&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>breakpoint selftests: print failure status instead of cause make error</title>
<updated>2012-12-18T01:15:27Z</updated>
<author>
<name>Dave Young</name>
<email>dyoung@redhat.com</email>
</author>
<published>2012-12-18T00:04:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=5a55f8bb2d0c4e5c05837b688ed1b2132a0ed0e7'/>
<id>urn:sha1:5a55f8bb2d0c4e5c05837b688ed1b2132a0ed0e7</id>
<content type='text'>
In case breakpoint test exit non zero value it will cause make error.
Better way is just print the test failure status.

Signed-off-by: Dave Young &lt;dyoung@redhat.com&gt;
Reviewed-by: Pekka Enberg &lt;penberg@kernel.org&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>kcmp selftests: print fail status instead of cause make error</title>
<updated>2012-12-18T01:15:27Z</updated>
<author>
<name>Dave Young</name>
<email>dyoung@redhat.com</email>
</author>
<published>2012-12-18T00:04:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ed8ad10c3b2fab18dd92d21afd4277a8a521ecfd'/>
<id>urn:sha1:ed8ad10c3b2fab18dd92d21afd4277a8a521ecfd</id>
<content type='text'>
In case kcmp_test exit non zero value it will cause make error.
Better way is just print the test failure status.

Signed-off-by: Dave Young &lt;dyoung@redhat.com&gt;
Reviewed-by: Pekka Enberg &lt;penberg@kernel.org&gt;
Cc: Cyrill Gorcunov &lt;gorcunov@openvz.org&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>
