<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/tests/ubi-tests/io_paral.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>2020-02-09T21:13:18+00:00</updated>
<entry>
<title>mtd-utils: Fix printf format specifiers with the wrong type</title>
<updated>2020-02-09T21:13:18+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2020-01-24T21:44:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=11bc41c32cc933a141545be6a9729122ac436cfe'/>
<id>urn:sha1:11bc41c32cc933a141545be6a9729122ac436cfe</id>
<content type='text'>
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<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: io_paral: Fix error handling of update_volume()</title>
<updated>2018-09-08T16:48:46+00:00</updated>
<author>
<name>Martin Lund</name>
<email>malu@gomspace.com</email>
</author>
<published>2018-09-05T13:47:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=04d76bcda9e1a948070927e6c5357d9760c32367'/>
<id>urn:sha1:04d76bcda9e1a948070927e6c5357d9760c32367</id>
<content type='text'>
The io_paral test returns success even in case it throws e.g. the
following error message:

[io_paral] update_volume():125: written and read data are different

This patch fixes so that the io_paral application returns a non-zero
error code when an error is detected.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi: tests: Speedup io_paral by using rand_r()</title>
<updated>2017-02-21T09:13:26+00:00</updated>
<author>
<name>Richard Weinberger</name>
<email>richard@nod.at</email>
</author>
<published>2016-02-22T13:52:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=fc7aa01f07919155fc167846125bc8f7e965b89d'/>
<id>urn:sha1:fc7aa01f07919155fc167846125bc8f7e965b89d</id>
<content type='text'>
rand() is not thread safe, but glibc seems to use a shared state which is
protected by a mutex. io_paral spawns a few threads and they call rand()
more or less in parallel, which causes heavy lock contention. That
makes the test extremely slow on some setups.

Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
Signed-off-by: David Gstir &lt;david@sigma-star.at&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: sync ubi-user.h with kernel v3.6-rc1</title>
<updated>2012-08-22T10:20:49+00:00</updated>
<author>
<name>Richard Genoud</name>
<email>richard.genoud@gmail.com</email>
</author>
<published>2012-08-22T09:27:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=312e784fb06eaafff4cfebe29c74b8d0ecc09167'/>
<id>urn:sha1:312e784fb06eaafff4cfebe29c74b8d0ecc09167</id>
<content type='text'>
Also remove the eraseblock type support, because kernel commit
a65a0eb6d198e058687a9214683bd1c418f20d39 set the dtype
parameter as obsolete.

Also adjust to some renames:
* 'UBI_PROP_DIRECT_WRITE' -&gt; 'UBI_VOL_PROP_DIRECT_WRITE'
* 'struct ubi_set_prop_req' -&gt; 'struct ubi_set_vol_prop_req'.
* 'UBI_IOCSETPROP' -&gt; 'UBI_IOCSETVOLPROP'

Signed-off-by: Richard Genoud &lt;richard.genoud@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>mtd-tests: io_paral: build error, "variable length strings"</title>
<updated>2011-06-29T05:42:38+00:00</updated>
<author>
<name>Brian Norris</name>
<email>computersforpeace@gmail.com</email>
</author>
<published>2011-06-27T18:27:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=6977ec0308678514ea4450e25e9d443a787da12e'/>
<id>urn:sha1:6977ec0308678514ea4450e25e9d443a787da12e</id>
<content type='text'>
Some compilers will complain about use of strlen() within a static array
size declaration. For this type of string, "sizeof() - 1" is equivalent
and prevents the build error.

Error:

   io_paral.c:48:13: error: variably modified 'vol_nodes' at file scope

Signed-off-by: Brian Norris &lt;computersforpeace@gmail.com&gt;
Acked-by: Mike Frysinger &lt;vapier@gentoo.org&gt;
Signed-off-by: Artem Bityutskiy &lt;dedekind1@gmail.com&gt;
</content>
</entry>
<entry>
<title>ubi-test: seed the random genrator in tests</title>
<updated>2010-06-15T11:02:48+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-06-15T11:01:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=e4867287195421ed3c41e15ce292b00b1c0e3649'/>
<id>urn:sha1:e4867287195421ed3c41e15ce292b00b1c0e3649</id>
<content type='text'>
Add a common seed_random_generator() and make tests use it
for seeding the random generator.

Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
<entry>
<title>ubi-tests: use rand instead of random in io_paral</title>
<updated>2010-06-15T11:02:48+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>Artem.Bityutskiy@nokia.com</email>
</author>
<published>2010-06-15T10:31:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=a6a67a71a26d6906c1c1fd12ea7eef9a9c9b4e2d'/>
<id>urn:sha1:a6a67a71a26d6906c1c1fd12ea7eef9a9c9b4e2d</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;Artem.Bityutskiy@nokia.com&gt;
</content>
</entry>
</feed>
