<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtd-utils.git/tests/fs-tests/integrity, branch v2.0.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.0.1</id>
<link rel='self' href='https://git.infraroot.at/mtd-utils.git/atom?h=v2.0.1'/>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/'/>
<updated>2017-06-28T08:27:31+00:00</updated>
<entry>
<title>Eliminate warnings about missing prototypes</title>
<updated>2017-06-28T08:27:31+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2017-06-22T11:37:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ca517e8b320c7a31c3a147fb1212ddb33cabd919'/>
<id>urn:sha1:ca517e8b320c7a31c3a147fb1212ddb33cabd919</id>
<content type='text'>
This patch eliminates warnings generated by the -Wmissing-prototypes
option. With this flag set, we are now forced to have prototypes for
all global, exported functions, that have to be made visible to the
definitions and we are forced to mark all local functions as static.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>ubi-utils: Return error code if command line option is unknown</title>
<updated>2017-06-14T09:00:30+00:00</updated>
<author>
<name>Daniel Wagner</name>
<email>daniel.wagner@siemens.com</email>
</author>
<published>2017-06-12T10:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=76e27a79eddb6279bbbc0ec840d66b753a9ba0f3'/>
<id>urn:sha1:76e27a79eddb6279bbbc0ec840d66b753a9ba0f3</id>
<content type='text'>
The tools in question will quit with an exit code 0 if the command
line option was not recognized. By returning an error code a calling
script has the possibility to distinguish between a real success and
an invalid invocation.

We need to return -1 instead of EXIT_FAILURE to be consistent with the
other exit code places.

Signed-off-by: Daniel Wagner &lt;daniel.wagner@siemens.com&gt;
Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
</content>
</entry>
<entry>
<title>Add libmissing</title>
<updated>2016-11-17T10:36:55+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-09-01T09:20:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=3516b8b7558a69dfd06410b0c997d096a78221c9'/>
<id>urn:sha1:3516b8b7558a69dfd06410b0c997d096a78221c9</id>
<content type='text'>
This patch adds a libmissing library to mtd-utils, containing
implementations of functionality found in glibc but typically
missing from embedded C libraries such as uclibc ot musl.

For now, the library only contains stub implementations of
the backtrace*() family of functions.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>Unify version string printing</title>
<updated>2016-11-17T10:36:55+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-07-19T13:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=7dd42c510dc8ab10f52dcc2d20dc8af412be0744'/>
<id>urn:sha1:7dd42c510dc8ab10f52dcc2d20dc8af412be0744</id>
<content type='text'>
When a program does sophisticated enough command line processing
(i.e. getopt), make sure it responds to -V and --version.

When a program prints a version string, make sure it uses the
common_print_version macro to print out its name, that it is part
of mtd-utils and the mtd-utils version from the build system in a
fashion similar to common program packages like the GNU coreutils.

When a program responds to -V/--version or -h/--help, make sure it
reports success exit status.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>Integrate tests into autotools build system</title>
<updated>2016-11-17T10:36:55+00:00</updated>
<author>
<name>David Oberhollenzer</name>
<email>david.oberhollenzer@sigma-star.at</email>
</author>
<published>2016-07-13T14:10:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=8a00021b2ab5529640e5acaca30a27cdaca04178'/>
<id>urn:sha1:8a00021b2ab5529640e5acaca30a27cdaca04178</id>
<content type='text'>
Add automake files for the test binaries. If configured to do so,
install the test binaries to libexec/mtd-utils and use autoconf to
fix the paths in the test scripts.

Signed-off-by: David Oberhollenzer &lt;david.oberhollenzer@sigma-star.at&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>fs-tests: integrity: don't include header &lt;bits/stdio_lim.h&gt;</title>
<updated>2016-08-25T13:33:09+00:00</updated>
<author>
<name>Rahul Bedarkar</name>
<email>rahul.bedarkar@imgtec.com</email>
</author>
<published>2016-08-18T17:41:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=fd6fc61227867179c87b6ee5d2199b3976ffef12'/>
<id>urn:sha1:fd6fc61227867179c87b6ee5d2199b3976ffef12</id>
<content type='text'>
In commit ca7a5eda221d("integck.c: Fix buffer overflow in save_file")
we started including header &lt;bits/stdio_lim.h&gt;.

But with musl C library, we get following build error

  integck.c:37:28: fatal error: bits/stdio_lim.h: No such file or directory
   #include &lt;bits/stdio_lim.h&gt;
                              ^
  compilation terminated.
  make[2]: *** [integck] Error 1

Header &lt;bits/stdio_lim.h&gt; is not available in musl C library. However
&lt;stdio.h&gt; has all definition that &lt;bits/stdio_lim.h&gt; supposed to be
providing. Moreover &lt;bits/stdio_lim.h&gt; shouldn't be included directly
instead we should be using &lt;stdio.h&gt;.

Since we already include &lt;stdio.h&gt; and in case of uClibc or glibc
&lt;bits/stdio_lim.h&gt; gets included internally, we can safely remove it.

This build issue is found by Buildroot autobuilder
http://autobuild.buildroot.net/results/175/1754861457af520480cc34d7d2d0edff2868ff66/

Fixes: ca7a5eda221d("integck.c: Fix buffer overflow in save_file")
Signed-off-by: Rahul Bedarkar &lt;rahul.bedarkar@imgtec.com&gt;
Signed-off-by: Richard Weinberger &lt;richard@nod.at&gt;
</content>
</entry>
<entry>
<title>mtd-utils: integck: Use $(CC) and $(AR) instead of 'gcc' and 'ar' consistently</title>
<updated>2014-04-15T13:01:12+00:00</updated>
<author>
<name>Mats Kärrman</name>
<email>mats.karrman@tritech.se</email>
</author>
<published>2014-04-11T07:38:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=7556c09cbac5c9d8a7a6d9c7c4bb736e2c472366'/>
<id>urn:sha1:7556c09cbac5c9d8a7a6d9c7c4bb736e2c472366</id>
<content type='text'>
Not using the macros may be a problem when cross-compiling.

Signed-off-by: Mats Karrman &lt;mats.karrman@tritech.se&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>integck: fix identation a bit</title>
<updated>2013-03-11T08:44:29+00:00</updated>
<author>
<name>Artem Bityutskiy</name>
<email>artem.bityutskiy@linux.intel.com</email>
</author>
<published>2013-03-11T08:44:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=c8f34d79c4f5d6f061d744538949167afa803f5f'/>
<id>urn:sha1:c8f34d79c4f5d6f061d744538949167afa803f5f</id>
<content type='text'>
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>integck.c: Fix buffer overflow in save_file</title>
<updated>2013-03-11T08:40:23+00:00</updated>
<author>
<name>Elie De Brauwer</name>
<email>eliedebrauwer@gmail.com</email>
</author>
<published>2013-03-01T18:37:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=ca7a5eda221d53aa571836a6186ed117c804d702'/>
<id>urn:sha1:ca7a5eda221d53aa571836a6186ed117c804d702</id>
<content type='text'>
In the problem above I've spend several hours waiting for the issue to 
appear, only to had the 'luck' that it was found in a file whose name was
256 bytes in length, resulting in the write to fail. Closer examination 
showed that the buffer to store the path was 256 bytes in length, but this
buffer also includes /tmp and the read/write suffix and should be able to
contain a filename which is up to 255 bytes (NAME_MAX in linux/limits.h)
in size which is a bad fit. So that array is modified to FILENAME_MAX
(stdio_lim.h) and some checking is added to truncate the filename should
it cause an overflow.

The following log shows the first patch in action (see the correct seed), 
and shows why this third patch is needed:
&lt;quote&gt;
integck:     File Data:
integck:         Offset: 0  Size: 1  Seed: 5008310  R.Off: 0
integck:     1 writes
integck:     ============================================
integck:     Write Info:
integck:         Offset: 0  Size: 1  Seed: 5008310  R.Off: 0
integck:         Offset: 0  Size: 1  Seed: 8246352  R.Off: 0
integck:         Offset: 0  Size: 1  Seed: 5078796  R.Off: 0
integck:         Offset: 0  Size: 1  Seed: 2267087  R.Off: 0
integck:         Offset: 0  Size: 1  Seed: 3602680  R.Off: 0
integck:     5 writes or truncations
integck:     ============================================
integck: Saving /tmp/yqcnfygfitaatyeyvffrguegcdttamcnyhowhgieljfuxfipiljsjcbluaeaghwyinkggommsbwnmvekihgnwgiibccpbwfrpxuxwkmnyghnutrudienngxwgorudbskedaaekiuiyqksfazrwzfwbfhzjjqoiulebtlpbfiuffmsnguqkjzqjqizimsmhbqqagaebjdhqwmzdxghiavtcxubegawlgtvstuqurkurpnrckjfkgostdtpg.integ.sav.readn
integck: error!: condition 'w_fd != -1' failed in save_file() at integck.c:1445
integck: error 36 (File name too long)
&lt;/quote&gt;

Signed-off-by: Elie De Brauwer &lt;eliedebrauwer@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
<entry>
<title>integck.c: rework file_check_data to immediately dump the buffer containing the errors</title>
<updated>2013-03-11T08:36:02+00:00</updated>
<author>
<name>Elie De Brauwer</name>
<email>eliedebrauwer@gmail.com</email>
</author>
<published>2013-03-01T18:37:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.infraroot.at/mtd-utils.git/commit/?id=3ff90433ab22c001215d9a26c65de1b7f448dc79'/>
<id>urn:sha1:3ff90433ab22c001215d9a26c65de1b7f448dc79</id>
<content type='text'>
See my problem description int the previous commit, the point is that integck
in file_check_data reads a buffer, and then checks if the data is correct,  it
will do a seek(0), and reread from the same fd. The point is that in the
scenario I observed integck failed (due to a buffer mismatch) but the it saved
(and what was in flash) was actually correct. So I modified this function to
dump the buffers to stderr at the moment an error is found.

Signed-off-by: Elie De Brauwer &lt;eliedebrauwer@gmail.com&gt;
Signed-off-by: Artem Bityutskiy &lt;artem.bityutskiy@linux.intel.com&gt;
</content>
</entry>
</feed>
