<feed xmlns='http://www.w3.org/2005/Atom'>
<title>glusterfs.git/run-tests.sh, branch v5.3</title>
<subtitle></subtitle>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/'/>
<entry>
<title>tests: Preserve tarball of tests when they timeout</title>
<updated>2018-08-27T02:42:19+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2018-08-14T18:00:41+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d34455a2d2d267c545c25ad7fa710ae2677d5afb'/>
<id>d34455a2d2d267c545c25ad7fa710ae2677d5afb</id>
<content type='text'>
When tests timeout, the timeout command sends TERM
signal to the command being executed. In the case of run-tests.sh
it invokes prove, which further invokes perl and finally the test
is run using bash. The TERM signal does not seem to be reachnig
the end bash that is actually executing the tests, and hence
when any test is terminated due to a timeout, the cleanup routine
in include.rc does not get a chance to run and preserve the
tarball.

Further, cleanup invokes tarball generation, but is invoked at
the beginning and end of every test, and at times in beteween
as well. This caused way too many tarballs in case we decide to
preserve the same whenever generated by cleanup.

This patch hence moves the tarball generation to run-tests.sh
instead, and further stores them named &lt;test&gt;-iteration-&lt;n&gt;.tar
and also prints tarball name generated and stored per iteration.

This should help relate failed runs to the tarball iteration #
and to look at relevant logs.

Further the patch also provides a -p option to run-tests.sh for
unit testing purposes, where running a test in a loop without the
option will generate as many tarballs, and using the option will
reduce this to preserving the last tarball, saving space in
smaller unit test setups.

Fixes: bz#1614062
Change-Id: I0aee76c89df0691cf4d0c1fcd4c04dffe0d7c896
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When tests timeout, the timeout command sends TERM
signal to the command being executed. In the case of run-tests.sh
it invokes prove, which further invokes perl and finally the test
is run using bash. The TERM signal does not seem to be reachnig
the end bash that is actually executing the tests, and hence
when any test is terminated due to a timeout, the cleanup routine
in include.rc does not get a chance to run and preserve the
tarball.

Further, cleanup invokes tarball generation, but is invoked at
the beginning and end of every test, and at times in beteween
as well. This caused way too many tarballs in case we decide to
preserve the same whenever generated by cleanup.

This patch hence moves the tarball generation to run-tests.sh
instead, and further stores them named &lt;test&gt;-iteration-&lt;n&gt;.tar
and also prints tarball name generated and stored per iteration.

This should help relate failed runs to the tarball iteration #
and to look at relevant logs.

Further the patch also provides a -p option to run-tests.sh for
unit testing purposes, where running a test in a loop without the
option will generate as many tarballs, and using the option will
reduce this to preserving the last tarball, saving space in
smaller unit test setups.

Fixes: bz#1614062
Change-Id: I0aee76c89df0691cf4d0c1fcd4c04dffe0d7c896
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Add ability to preserve older tarball for retried tests</title>
<updated>2018-08-09T14:42:15+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2018-08-08T22:29:01+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=69c557ad8468f9e32090cbef78512f82a98f7043'/>
<id>69c557ad8468f9e32090cbef78512f82a98f7043</id>
<content type='text'>
When a test is retried, the cleanup directives overwrite the
older tarball with the latest one, thus losing the logs from
the failed run.

This patch changes run-tests.sh to rename the older tarball
when retrying a test, thus preserving the same.

The tarball is renamed using a time stamp and optionally a
trailing sequence number, in case the test fails within the
very second. Although the sequence # is not strictly required
as we retry only once, it provides a defence for any future
enhancements to the same.

Fixes: bz#1614062
Change-Id: I9afe486b0b6f6a26f2ad0642e38bc0ba15b3ecc9
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When a test is retried, the cleanup directives overwrite the
older tarball with the latest one, thus losing the logs from
the failed run.

This patch changes run-tests.sh to rename the older tarball
when retrying a test, thus preserving the same.

The tarball is renamed using a time stamp and optionally a
trailing sequence number, in case the test fails within the
very second. Although the sequence # is not strictly required
as we retry only once, it provides a defence for any future
enhancements to the same.

Fixes: bz#1614062
Change-Id: I9afe486b0b6f6a26f2ad0642e38bc0ba15b3ecc9
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: Add timeout option to run-tests.sh</title>
<updated>2018-08-06T17:57:30+00:00</updated>
<author>
<name>ShyamsundarR</name>
<email>srangana@redhat.com</email>
</author>
<published>2018-08-06T17:55:08+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=0e821f9d10939495181484588f200300b70dfcc2'/>
<id>0e821f9d10939495181484588f200300b70dfcc2</id>
<content type='text'>
Added a '-t' timeout option to run-tests.sh, to be able to
set this to higher than the default 200 in case of lcov
based tests, as those take more time due to instrumentations
added by lcov.

Change-Id: Ibaf70e881bfa94f35e822124bcf9849b309e7cc1
Updates: bz#1608564
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added a '-t' timeout option to run-tests.sh, to be able to
set this to higher than the default 200 in case of lcov
based tests, as those take more time due to instrumentations
added by lcov.

Change-Id: Ibaf70e881bfa94f35e822124bcf9849b309e7cc1
Updates: bz#1608564
Signed-off-by: ShyamsundarR &lt;srangana@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>run-tests.sh: provide option to write 'failure' output to a file</title>
<updated>2018-07-17T17:06:58+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2018-07-15T14:12:55+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=b9a5d85d15ed82477a2491e55d6322e3d0d3d29a'/>
<id>b9a5d85d15ed82477a2491e55d6322e3d0d3d29a</id>
<content type='text'>
Change-Id: I42f5e0f3513ba758a09b1a7330e49fc3c8fc218e
updates: bz#1600963
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Change-Id: I42f5e0f3513ba758a09b1a7330e49fc3c8fc218e
updates: bz#1600963
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: check for the availability of netstat</title>
<updated>2018-06-26T07:21:15+00:00</updated>
<author>
<name>Niels de Vos</name>
<email>ndevos@redhat.com</email>
</author>
<published>2016-02-29T10:49:01+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=d6cd792af722c795df48eae68806add4c33e18f5'/>
<id>d6cd792af722c795df48eae68806add4c33e18f5</id>
<content type='text'>
bug-924726.t calls netstat, and tests fail in case netstat is not
available.

BUG: 1312832
Change-Id: I3393778e148504326a468744d8a97d28932feed1
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
bug-924726.t calls netstat, and tests fail in case netstat is not
available.

BUG: 1312832
Change-Id: I3393778e148504326a468744d8a97d28932feed1
Signed-off-by: Niels de Vos &lt;ndevos@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>run-tests.sh: added dependency check for netstat</title>
<updated>2018-03-12T22:19:24+00:00</updated>
<author>
<name>Sven Fischer</name>
<email>sven@fischer-abc.de</email>
</author>
<published>2018-03-12T22:00:28+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=c64fa1496517ba57e5a4dc4573ce5abf73ea03a0'/>
<id>c64fa1496517ba57e5a4dc4573ce5abf73ea03a0</id>
<content type='text'>
Because bug-924726.t depends on netstat, tests failed before. This got resolved
by adding respective check to run-tests.sh.

Enabled respective test again.

Change-Id: I70c9bff03379ed9ee8cd95842c3501dfb50b8e86
BUG: 1312830
Signed-off-by: Sven Fischer &lt;sven@fischer-abc.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Because bug-924726.t depends on netstat, tests failed before. This got resolved
by adding respective check to run-tests.sh.

Enabled respective test again.

Change-Id: I70c9bff03379ed9ee8cd95842c3501dfb50b8e86
BUG: 1312830
Signed-off-by: Sven Fischer &lt;sven@fischer-abc.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: bring option of per test timeout</title>
<updated>2018-02-15T08:20:19+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2018-01-18T17:54:04+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=9d0d1fdd091d754149242fd4389b964695aacf13'/>
<id>9d0d1fdd091d754149242fd4389b964695aacf13</id>
<content type='text'>
This uses 'timeout' command with 300 seconds default. Right now,
there is just 1 test which takes more than that in a properly
setup machine.

Ideally best case is set the default to something like 30 seconds,
and if a test is supposed to take more than that, owner should add
a timeout line to test knowingly. That way, it makes test writers
think about a time limit too.

Change-Id: I747005ce1f208aeb2ecbf899e8feea487ecd21a0
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses 'timeout' command with 300 seconds default. Right now,
there is just 1 test which takes more than that in a properly
setup machine.

Ideally best case is set the default to something like 30 seconds,
and if a test is supposed to take more than that, owner should add
a timeout line to test knowingly. That way, it makes test writers
think about a time limit too.

Change-Id: I747005ce1f208aeb2ecbf899e8feea487ecd21a0
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>tests: merge stdout and stderr output</title>
<updated>2018-01-30T05:59:09+00:00</updated>
<author>
<name>Milind Changire</name>
<email>mchangir@redhat.com</email>
</author>
<published>2018-01-26T10:37:59+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=016165c4110b2bd5bba5c64b7a3d09e9bc4928c2'/>
<id>016165c4110b2bd5bba5c64b7a3d09e9bc4928c2</id>
<content type='text'>
Add -m argument to 'prove' command-line.

Fix xxhsum.c debugging output to keep 'prove' happy.

Change-Id: I03485d5f5e43ae4ce454a275ec98bc18384ed00c
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add -m argument to 'prove' command-line.

Fix xxhsum.c debugging output to keep 'prove' happy.

Change-Id: I03485d5f5e43ae4ce454a275ec98bc18384ed00c
Signed-off-by: Milind Changire &lt;mchangir@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert "run-tests.sh: provide retry count option"</title>
<updated>2017-12-06T14:47:00+00:00</updated>
<author>
<name>Nigel Babu</name>
<email>nigelb@redhat.com</email>
</author>
<published>2017-12-06T14:46:09+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=3fa4510fdb5d6858b788f64c069299b133edef0e'/>
<id>3fa4510fdb5d6858b788f64c069299b133edef0e</id>
<content type='text'>
This change was actually causing failures to be reported as passing.

This reverts commit 4e798113229eab68e9e02364bb094a4ab8274c65.

Change-Id: I02b06e7f2af03419d922de8ad7e6948ae8cb8d06
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change was actually causing failures to be reported as passing.

This reverts commit 4e798113229eab68e9e02364bb094a4ab8274c65.

Change-Id: I02b06e7f2af03419d922de8ad7e6948ae8cb8d06
</pre>
</div>
</content>
</entry>
<entry>
<title>run-tests.sh: provide retry count option</title>
<updated>2017-12-05T14:22:52+00:00</updated>
<author>
<name>Amar Tumballi</name>
<email>amarts@redhat.com</email>
</author>
<published>2017-12-01T13:33:50+00:00</published>
<link rel='alternate' type='text/html' href='http://dev.gluster.org/cgit/glusterfs.git/commit/?id=4e798113229eab68e9e02364bb094a4ab8274c65'/>
<id>4e798113229eab68e9e02364bb094a4ab8274c65</id>
<content type='text'>
and default it to 5.

With this change, if any test fails due to timing issues (because of
slower/faster VM etc), there is a retry logic which gets triggered.
Many times, if a test successfully fails more than 5 times, there may
be a genuine issue with it, one should take a serious look at the
failing test.

Change-Id: Ia88e3293fd2724b0f9f09d8bc026560792fc1578
BUG: 1517961
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
and default it to 5.

With this change, if any test fails due to timing issues (because of
slower/faster VM etc), there is a retry logic which gets triggered.
Many times, if a test successfully fails more than 5 times, there may
be a genuine issue with it, one should take a serious look at the
failing test.

Change-Id: Ia88e3293fd2724b0f9f09d8bc026560792fc1578
BUG: 1517961
Signed-off-by: Amar Tumballi &lt;amarts@redhat.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
