<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/tests/ubi-tests/io_basic.c, branch v2.3.1</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.3.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2019-06-16T10:27:10+00:00</updated>
<entry>
<title>ubi-tests: ubi_mkvol_request: Fully initialize 'struct ubi_mkvol_request req'</title>
<updated>2019-06-16T10:27:10+00:00</updated>
<author>
<name>Zhihao Cheng</name>
<email>chengzhihao1@huawei.com</email>
</author>
<published>2019-06-14T12:14:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c74c62420cbe1939c924e83f00e8838f148ae051'/>
<id>urn:sha1:c74c62420cbe1939c924e83f00e8838f148ae051</id>
<content type='text'>
'struct ubi_mkvol_request req' is one parameter of the function 'ubi_mkvol'
, this parameter will be passed to kernel and then be checked. It acts as a
local variable in many ubi tests, such as io_basic, io_read, mkvol_bad,
mkvol_basic, etc.

After commit c355aa465fce ("ubi: expose the volume CRC check skip flag") in
linux-stable, 'struct ubi_mkvol_request' supports a new configuration named
'flags', and req.flags will be checked in kernel function
'verify_mkvol_req'. Currently, there is no initialization for req.flags
before 'ubi_mkvol' invoked. So, req.flags can be an arbitrary number passed
to kernel. When we run ubi tests in qemu (x86_64, kernel image: 5.2.0-rc4),
the following errors may occur:

  ======================================================================
  ======================================================================
  ======================================================================
  Test on mtdram, fastmap enabled, VID header offset factor 1
  ======================================================================
  ======================================================================
  ======================================================================
  mtdram: 16MiB, PEB size 16KiB, fastmap enabled
  Running mkvol_basic /dev/ubi0
  Running mkvol_bad /dev/ubi0
  [mkvol_bad] test_mkvol():105: ubi_mkvol failed with error 22
  (Invalid argument), expected 28 (No space left on device)
  [mkvol_bad] test_mkvol():105: bytes = 16060929
  Error: mkvol_bad failed
  FAILURE

This patch fully initializes every 'struct ubi_mkvol_request req' passed to
'ubi_mkvol', which can fix the bug that the ubi test failed caused by that
req.flags was not initialized. And it is still compatible with old kernel
before kernel commit c355aa465fce ("ubi: expose the volume CRC check skip
flag").

----------------------------------------

Signed-off-by: Zhihao Cheng &lt;chengzhihao1@huawei.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-tests: switch to using common.h from the top level</title>
<updated>2012-11-16T08:09:54+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-11-16T07:56:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=7343528e5821c69224000ed7cfd3e8aaf47b7a93'/>
<id>urn:sha1:7343528e5821c69224000ed7cfd3e8aaf47b7a93</id>
<content type='text'>
Sorry, the commit is huge, I just did not have time to split it.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>ubi-tests: rename common.[ch] to helpers.[ch]</title>
<updated>2012-11-16T07:52:21+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2012-11-16T07:52:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=98ed9f3360bb5cbfb02d2cb82ee3167fce437772'/>
<id>urn:sha1:98ed9f3360bb5cbfb02d2cb82ee3167fce437772</id>
<content type='text'>
... to avoid confusion when the local common.h shadows the top-level common.h.

Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>ubi-tests: make tests compile again</title>
<updated>2009-05-07T10:48:21+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2009-05-07T10:48:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c6a26438e240da532177753bf9a41d43f8341777'/>
<id>urn:sha1:c6a26438e240da532177753bf9a41d43f8341777</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>ubi-tests: fix build and some warnings</title>
<updated>2009-01-16T18:53:42+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2009-01-16T18:53:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=f6bd2c366b32262c2a5a1ac38713dc84bf7c9cbf'/>
<id>urn:sha1:f6bd2c366b32262c2a5a1ac38713dc84bf7c9cbf</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>ubi-tests: fix compilation</title>
<updated>2008-06-04T16:25:00+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2008-06-04T16:23:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a3b8a2f068bfc13391c6e1d06471f97d4743d398'/>
<id>urn:sha1:a3b8a2f068bfc13391c6e1d06471f97d4743d398</id>
<content type='text'>
libubi_open interface was changed, but the tests were not
amended. Fix this.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>ubi-tests: stylistic amendments</title>
<updated>2008-01-25T12:33:58+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2008-01-25T12:33:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=8570a32e92e10f6a7f08ea4409b03b54bd992d5d'/>
<id>urn:sha1:8570a32e92e10f6a7f08ea4409b03b54bd992d5d</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>ubi-tests: update to recent libubi changes</title>
<updated>2007-12-23T16:32:09+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2007-12-23T16:32:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=db697836173e90d95390649287648cdd420e1b43'/>
<id>urn:sha1:db697836173e90d95390649287648cdd420e1b43</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>ubi-utils: move UBI tests to tests/ubi-tests/</title>
<updated>2007-12-20T15:34:55+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2007-12-20T15:34:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=1ba6959299cb386faf178317b21ffd61689246b5'/>
<id>urn:sha1:1ba6959299cb386faf178317b21ffd61689246b5</id>
<content type='text'>
Clean-up ubi-utils a little by moving tests to a proper place.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
</feed>
