Jump to navigation Jump to search


1,857 bytes added, 23:28, 1 August 2013
no edit summary
== Tracking octave bugs with hg bisect==
I had a strange problem when loading gzip compressed ascii files in octave. It failed dependent on the integer values. After some stripping I made a minimalistic test script (min_testcase_fails.m) which always fails in a current dev (88616c872933):
fid = fopen (fn,"w");
fprintf(fid, "%i %i %i %i\n",639, 25, 160, 978160);
fprintf(fid, "%i %i %i %i\n",687, 25, 171, 978160);
fprintf(fid, "%i %i %i %i\n",663, 31, 173, 978161);
fprintf(fid, "%i %i %i %i\n",663, 15, 154, 978161);
fprintf(fid, "%i %i %i %i\n",655, 21, 151, 978161);
## gzip it!
fn_gz=strcat(fn, ".gz");
cmd=cstrcat("gzip ",fn," -c > ",fn_gz)
c=load("file2.txt.gz") #this fails in newer versions
If line 4 with "663, 15, 154, 978161" is changed to ""663, 16, 154, 978161", load works as expected. '''Strange, isn't it?'''
I also had an old build (dev ab1c6e6d1be6 from Sun Oct 28 21:48:02 2012) and "load" worked in this version.
=== Running bisect ===
I decided to make a fresh clone in a separate directory:
cd ~/src
hg clone octave-src
cd octave-src
hg bisect -b 88616c872933
hg bisect -g ab1c6e6d1be6
After this hg bisect uses a binary search strategy to test revisions:
Teste Änderungssatz 16428:f016a5342e19 (1380 Änderungssätze verbleiben, ~10 Tests)
So after checkout I had to compile the source tree (used ccache in the hope of faster checkout-compile cycles).
cd .. && mkdir octave-build
export CXX="ccache g++"
export CC="ccache gcc"
make -j 7
After compilation I tried my testscript min_testcase_fails.m:
./run-octave -q ../min_testcase_fails.m
cd ..
cd octave
hg bisect -g
I used [ Jordis bisect script for bug 32818] and modified it to my needs:


Navigation menu