<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/tests/mtd-tests, branch v2.1.2</title>
<subtitle>A mirror of http://git.infradead.org/mtd-utils.git</subtitle>
<id>https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.2</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.1.2'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2019-04-29T06:39:15+00:00</updated>
<entry>
<title>mtd-tests: nandbiterrs: Fix issue that just insert error at bit 7</title>
<updated>2019-04-29T06:39:15+00:00</updated>
<author>
<name>Xiaolei Li</name>
<email>xiaolei.li@mediatek.com</email>
</author>
<published>2019-04-29T03:28:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=49e6cb7b62c5d7cd5c0a5084c91a84cd9fa8e0fe'/>
<id>urn:sha1:49e6cb7b62c5d7cd5c0a5084c91a84cd9fa8e0fe</id>
<content type='text'>
The function insert_biterror should be designed to insert error at
the first '1' bit starting at offset byte.

But now, only bit 7 of each byte is checked, because checking mask
is always 0x80.

So, do right shift for checking mask after each checking to check
the whole 8 bits of each bytes.

Signed-off-by: Xiaolei Li &lt;xiaolei.li@mediatek.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: Instead of doing preprocessor magic, just output off_t as long long</title>
<updated>2018-10-02T12:00:28+00:00</updated>
<author>
<name>Thorsten Glaser</name>
<email>tg@mirbsd.org</email>
</author>
<published>2018-09-20T23:22:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=64667fe63ba9dd78adb9c4abf04bc3e4e25a0fd7'/>
<id>urn:sha1:64667fe63ba9dd78adb9c4abf04bc3e4e25a0fd7</id>
<content type='text'>
Fix warnings abot PRIdoff_t in libmtd.c, in mtd_read (and mtd_write):

In file included from ../git/lib/libmtd.c:40:0:
../git/lib/libmtd.c: In function 'mtd_read':
../git/include/common.h:110:18: warning: format '%ld' expects argument of
 type 'long int', but argument 5 has type 'off_t {aka long long int}'
 [-Wformat=]

../git/include/common.h:120:2: note: in expansion of macro 'errmsg'
  errmsg(fmt, ##__VA_ARGS__);                                         \
  ^~~~~~
../git/lib/libmtd.c:1082:10: note: in expansion of macro 'sys_errmsg'
   return sys_errmsg("cannot seek mtd%d to offset %"PRIdoff_t,
          ^~~~~~~~~~

/usr/lib/klibc/include/inttypes.h:28:17: note: format string is defined here
 #define PRId32 "d"

Signed-off-by: Thorsten Glaser &lt;tg@mirbsd.org&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd: tests: check erase block count in page test</title>
<updated>2018-03-05T11:22:39+00:00</updated>
<author>
<name>Stefan Agner</name>
<email>stefan@agner.ch</email>
</author>
<published>2018-03-03T22:39:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=414b71e9f9755e6d49f58eb303abc484115e9048'/>
<id>urn:sha1:414b71e9f9755e6d49f58eb303abc484115e9048</id>
<content type='text'>
When there is only a single erase block, the cross erase test
does not report sensible errors. Warn in case there is only
a single erase block instead of executing the test.

Signed-off-by: Stefan Agner &lt;stefan@agner.ch&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd: tests: Fix check on ebcnt in nandpagetest</title>
<updated>2017-11-22T11:44:52+00:00</updated>
<author>
<name>Paul HENRYS</name>
<email>paul.henrys@embconsulting.eu</email>
</author>
<published>2017-11-22T08:11:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=098e91af4a08a81b3cdfd4aac422bb768261aac5'/>
<id>urn:sha1:098e91af4a08a81b3cdfd4aac422bb768261aac5</id>
<content type='text'>
If the number of erase blocks to use is not specified, ebcnt originally
set to -1 leads the program to exit with:
  "Cannot run with less than two blocks."

If the number of erase blocks to use is not specified and thus ebcnt is
equal to -1, the expected behaviour is to perform the test on all the
erase blocks of the mtd partition.

This fixes the change introduced in
4458ad6481f60d9884925d5bc62a7954880d181b.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>nandbiterrs: Fix copy &amp; paste fail</title>
<updated>2017-11-03T18:41:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-11-02T00:01:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ce50e6d8d15b384ebf7021865a95d6f18d191291'/>
<id>urn:sha1:ce50e6d8d15b384ebf7021865a95d6f18d191291</id>
<content type='text'>
When porting some of the mtd-tests to user space, some code was
simplified. Among others, a while loop that iterates of page contents
was replaced with a for loop, but the old increment was left in place,
so every second byte was skipped.

This patch removes the erroneous second increment.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add no-return attribute to usage() style functions</title>
<updated>2017-11-02T00:33:32+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-09-21T11:36:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=cb2fcfc0a1da3cfac9094abf1d11c23653937395'/>
<id>urn:sha1:cb2fcfc0a1da3cfac9094abf1d11c23653937395</id>
<content type='text'>
A common pattern in command line processing is having a usage()
function that prints out how to use the command line options and
then terminates.

The function is typically used inside a switch block for command
line options like `-h' or unknown options. In a lot of places, the
break keyword is omitted, because the function exits anyway. However,
this triggers gcc warnings about implicit fall-through.

Rather than adding a phony "/* fall-through */" this patch flags the
usage() style function with a gcc attribute, indicating that they do
not return and removes further superfluous break statements.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: tests: Avoid using less than two blocks in nandpagetest</title>
<updated>2017-08-24T11:00:58+00:00</updated>
<author>
<name>Miquel Raynal</name>
<email>miquel.raynal@free-electrons.com</email>
</author>
<published>2017-08-24T10:59:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=4458ad6481f60d9884925d5bc62a7954880d181b'/>
<id>urn:sha1:4458ad6481f60d9884925d5bc62a7954880d181b</id>
<content type='text'>
Forbid the use of less than 2 eraseblocks in nandpagetest. It is obvious
that the test cannot run on zero block, but it cannot run on only one
block neither. The reason is: get_first_and_last_block() will return the
same id for both the first and the last blocks. In erasecrosstest(),
the logic is:
- erase/write/read/verify first block
- erase/write again first block
- erase *last* block
- read/verify first block
When using only one block, 'first' refers to the same block as 'last',
leading to erasing the block before reading it. Hence, the test would
fail with no actual reason.

Signed-off-by: Miquel Raynal &lt;miquel.raynal@free-electrons.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: tests: Add Erased Pages Bit Flip Test</title>
<updated>2017-07-03T08:19:29+00:00</updated>
<author>
<name>Harpreet Eli Sangha</name>
<email>harpreet@nestlabs.com</email>
</author>
<published>2017-06-30T22:12:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=df913e4316f28d60f630bac938863c4c65ad210e'/>
<id>urn:sha1:df913e4316f28d60f630bac938863c4c65ad210e</id>
<content type='text'>
Bit flip detection for written and erased pages tend to have different
implementations. Where written pages are detected and corrected using
ECC, erased pages are typically detected by ensuring that the number of
zeros is less than a specified threshold.

As such, it's necessary to have the 'nandbiterrs' test support the
testing of written and erased pages. Bit flips in erased pages are
emulated by rewriting the page in raw mode, to prevent the use of ECC.

Signed-off-by: Harpreet Eli Sangha &lt;harpreet@nestlabs.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: tests: Fix nandbiterrs Failure Check</title>
<updated>2017-06-28T08:26:27+00:00</updated>
<author>
<name>Harpreet Eli Sangha</name>
<email>harpreet@nestlabs.com</email>
</author>
<published>2017-06-27T20:52:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=b0b1bc51496b7c328fcda3e6164292fa0d1dbc18'/>
<id>urn:sha1:b0b1bc51496b7c328fcda3e6164292fa0d1dbc18</id>
<content type='text'>
After a page read, the old failure statistics are compared against the
new failure statistics before the new values are actually read.

Signed-off-by: Harpreet "Eli" Sangha &lt;harpreet@nestlabs.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: Fix format specifier definitions for off_t and loff_t.</title>
<updated>2017-02-20T12:12:47+00:00</updated>
<author>
<name>Torsten Fleischer</name>
<email>torfl@t-online.de</email>
</author>
<published>2017-02-11T16:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=5a8069113ee41cf8fecef0344abadebf9fdb4850'/>
<id>urn:sha1:5a8069113ee41cf8fecef0344abadebf9fdb4850</id>
<content type='text'>
On 32bit systems (e.g. ARM) the size of off_t can be 4 byte and the size of loff_t 8 byte.

This causes compiler warnings like the following:

flash_erase.c: In function 'show_progress':
flash_erase.c:56:22: warning: format '%llx' expects argument of type 'long long unsigned int', but argument 3 has type 'off_t {aka long int}' [-Wformat=]
  bareverbose(!quiet, "\rErasing %d Kibyte @ %"PRIxoff_t" -- %2i %% complete ",

and an output like this:

~# flash_erase /dev/mtd2 0 1
Erasing 64 Kibyte @ 6400000000 -- 0 % complete

~#

Since the size of off_t and loff_t can differ from each other, the
printf format specifier should be determined separately for both.
Further the format specifiers should be based directly on the size of the
particular data type.

Signed-off-by: Torsten Fleischer &lt;torfl6749@gmail.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
</feed>
