Cristian RodrÃguez
2012-Apr-18 01:12 UTC
[flac-dev] [PATCH 3/3] export MALLOC_PERTURB_ and MALLOC_CHECK_ in test suite
That enables an special implementation that checks for common memory errors and will save us from a lot pain. --- test/test_bins.sh | 2 ++ test/test_flac.sh | 2 ++ test/test_grabbag.sh | 2 ++ test/test_libFLAC++.sh | 2 ++ test/test_libFLAC.sh | 3 +++ test/test_metaflac.sh | 2 ++ test/test_seeking.sh | 2 ++ test/test_streams.sh | 2 ++ 8 files changed, 17 insertions(+), 0 deletions(-) diff --git a/test/test_bins.sh b/test/test_bins.sh index 55a0b8a..9b1fa0f 100755 --- a/test/test_bins.sh +++ b/test/test_bins.sh @@ -37,6 +37,8 @@ LD_LIBRARY_PATH=../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../src/share/utf8/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_==$(($RANDOM % 255 + 1)) PATH=../src/flac:$PATH PATH=../obj/$BUILD/bin:$PATH BINS_PATH=../../test_files/bins diff --git a/test/test_flac.sh b/test/test_flac.sh index 0aa7e61..7e4a8fd 100755 --- a/test/test_flac.sh +++ b/test/test_flac.sh @@ -51,6 +51,8 @@ LD_LIBRARY_PATH=`pwd`/../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=`pwd`/../src/share/utf8/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=`pwd`/../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) PATH=`pwd`/../src/flac:$PATH PATH=`pwd`/../src/metaflac:$PATH PATH=`pwd`/../src/test_streams:$PATH diff --git a/test/test_grabbag.sh b/test/test_grabbag.sh index 5c044b3..8f1c5c9 100755 --- a/test/test_grabbag.sh +++ b/test/test_grabbag.sh @@ -34,6 +34,8 @@ LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) PATH=../src/test_grabbag/cuesheet:$PATH PATH=../src/test_grabbag/picture:$PATH PATH=../obj/$BUILD/bin:$PATH diff --git a/test/test_libFLAC++.sh b/test/test_libFLAC++.sh index a5e32a5..18ddd53 100755 --- a/test/test_libFLAC++.sh +++ b/test/test_libFLAC++.sh @@ -35,6 +35,8 @@ LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) PATH=../src/test_libFLAC++:$PATH PATH=../obj/$BUILD/bin:$PATH diff --git a/test/test_libFLAC.sh b/test/test_libFLAC.sh index 21ed6bf..067b4e1 100755 --- a/test/test_libFLAC.sh +++ b/test/test_libFLAC.sh @@ -34,6 +34,9 @@ LD_LIBRARY_PATH=../src/share/grabbag/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../src/share/replaygain_analysis/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) + PATH=../src/test_libFLAC:$PATH PATH=../obj/$BUILD/bin:$PATH diff --git a/test/test_metaflac.sh b/test/test_metaflac.sh index c823ccf..3cc9a8e 100755 --- a/test/test_metaflac.sh +++ b/test/test_metaflac.sh @@ -46,6 +46,8 @@ LD_LIBRARY_PATH=`pwd`/../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=`pwd`/../src/share/utf8/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=`pwd`/../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) PATH=`pwd`/../src/flac:$PATH PATH=`pwd`/../src/metaflac:$PATH PATH=`pwd`/../obj/$BUILD/bin:$PATH diff --git a/test/test_seeking.sh b/test/test_seeking.sh index 94e4de1..86e828b 100755 --- a/test/test_seeking.sh +++ b/test/test_seeking.sh @@ -32,6 +32,8 @@ fi LD_LIBRARY_PATH=../src/libFLAC/.libs:$LD_LIBRARY_PATH LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) PATH=../src/flac:$PATH PATH=../src/metaflac:$PATH PATH=../src/test_seeking:$PATH diff --git a/test/test_streams.sh b/test/test_streams.sh index 14c1a12..b5680c4 100755 --- a/test/test_streams.sh +++ b/test/test_streams.sh @@ -31,6 +31,8 @@ fi LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) PATH=../src/flac:$PATH PATH=../src/test_streams:$PATH PATH=../obj/$BUILD/bin:$PATH -- 1.7.7
Erik de Castro Lopo
2012-Apr-18 12:08 UTC
[flac-dev] [PATCH 3/3] export MALLOC_PERTURB_ and MALLOC_CHECK_ in test suite
Cristian Rodr?guez wrote:> That enables an special implementation that checks > for common memory errors and will save us from a lot pain. > --- > test/test_bins.sh | 2 ++ > test/test_flac.sh | 2 ++ > test/test_grabbag.sh | 2 ++ > test/test_libFLAC++.sh | 2 ++ > test/test_libFLAC.sh | 3 +++ > test/test_metaflac.sh | 2 ++ > test/test_seeking.sh | 2 ++ > test/test_streams.sh | 2 ++ > 8 files changed, 17 insertions(+), 0 deletions(-) > > diff --git a/test/test_bins.sh b/test/test_bins.sh > index 55a0b8a..9b1fa0f 100755 > --- a/test/test_bins.sh > +++ b/test/test_bins.sh > @@ -37,6 +37,8 @@ LD_LIBRARY_PATH=../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH > LD_LIBRARY_PATH=../src/share/utf8/.libs:$LD_LIBRARY_PATH > LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH > export LD_LIBRARY_PATH > +export MALLOC_CHECK_=3 > +export MALLOC_PERTURB_==$(($RANDOM % 255 + 1))This has problems. This fails in bash, sh and dash. Eg bash: $ echo $(($RANDON % 256)) bash: % 256: syntax error: operand expected (error token is "% 256") I do howver like this idea it if can be made to work Erik -- ---------------------------------------------------------------------- Erik de Castro Lopo http://www.mega-nerd.com/
LRN
2012-Apr-18 12:53 UTC
[flac-dev] [PATCH 3/3] export MALLOC_PERTURB_ and MALLOC_CHECK_ in test suite
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 18.04.2012 16:08, Erik de Castro Lopo wrote:> Cristian Rodr?guez wrote: > >> That enables an special implementation that checks for common >> memory errors and will save us from a lot pain. --- >> test/test_bins.sh | 2 ++ test/test_flac.sh | 2 >> ++ test/test_grabbag.sh | 2 ++ test/test_libFLAC++.sh | 2 >> ++ test/test_libFLAC.sh | 3 +++ test/test_metaflac.sh | >> 2 ++ test/test_seeking.sh | 2 ++ test/test_streams.sh | >> 2 ++ 8 files changed, 17 insertions(+), 0 deletions(-) >> >> diff --git a/test/test_bins.sh b/test/test_bins.sh index >> 55a0b8a..9b1fa0f 100755 --- a/test/test_bins.sh +++ >> b/test/test_bins.sh @@ -37,6 +37,8 @@ >> LD_LIBRARY_PATH=../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH >> >>LD_LIBRARY_PATH=../src/share/utf8/.libs:$LD_LIBRARY_PATH>> LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH export >> LD_LIBRARY_PATH +export MALLOC_CHECK_=3 +export >> MALLOC_PERTURB_==$(($RANDOM % 255 + 1)) > > This has problems. > > This fails in bash, sh and dash. Eg bash: > > $ echo $(($RANDON % 256)) bash: % 256: syntax error: operand > expected (error token is "% 256") > > I do howver like this idea it if can be made to work >Works for me (TM): $ echo $((RANDOM % 255 + 1)) 111 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBAgAGBQJPjrlbAAoJEOs4Jb6SI2CwPK8H/Au+sz3zdGtiJrDAnUoSoAmt czT0VTWh+i4eeXW/SfuocTc2VkFEuK4ky7fdjCSV1iD2Jrj+3RndqQQClwPTK5Je 9z7gKDOzRekvIF1pENnB8r7OdoiBhVSFU2rGN7GDXxh4des6rvJPHi6Z5VU6AYMO eX+CAppVKIcfRbX56A5HcvzaWOQB+KlH4i7nlVUQq2M5efXCSYKy9d2IjBnywYKa Ddt0Sly/VBwZNE5yiWz6xDU359/0eTfhfDR6N0eZz1B+N3U/67ZnzmWCP1NcLEuL M1coelMpevB8yfQPqYhQdGjgrKajMPsxe0QAoPeHLRic7h0qgSHkZZQTkHE3LoA=kEcZ -----END PGP SIGNATURE-----
Cristian RodrÃguez
2012-Apr-18 13:15 UTC
[flac-dev] [PATCH 3/3] export MALLOC_PERTURB_ and MALLOC_CHECK_ in test suite
On 18/04/12 09:08, Erik de Castro Lopo wrote:> Cristian Rodr?guez wrote: > >> That enables an special implementation that checks >> for common memory errors and will save us from a lot pain. >> --- >> test/test_bins.sh | 2 ++ >> test/test_flac.sh | 2 ++ >> test/test_grabbag.sh | 2 ++ >> test/test_libFLAC++.sh | 2 ++ >> test/test_libFLAC.sh | 3 +++ >> test/test_metaflac.sh | 2 ++ >> test/test_seeking.sh | 2 ++ >> test/test_streams.sh | 2 ++ >> 8 files changed, 17 insertions(+), 0 deletions(-) >> >> diff --git a/test/test_bins.sh b/test/test_bins.sh >> index 55a0b8a..9b1fa0f 100755 >> --- a/test/test_bins.sh >> +++ b/test/test_bins.sh >> @@ -37,6 +37,8 @@ LD_LIBRARY_PATH=../src/share/replaygain_synthesis/.libs:$LD_LIBRARY_PATH >> LD_LIBRARY_PATH=../src/share/utf8/.libs:$LD_LIBRARY_PATH >> LD_LIBRARY_PATH=../obj/$BUILD/lib:$LD_LIBRARY_PATH >> export LD_LIBRARY_PATH >> +export MALLOC_CHECK_=3 >> +export MALLOC_PERTURB_==$(($RANDOM % 255 + 1)) > > This has problems. > > This fails in bash, sh and dash. Eg bash: > > $ echo $(($RANDON % 256)) > bash: % 256: syntax error: operand expected (error token is "% 256") > > I do howver like this idea it if can be made to workworks for me in zsh, bash..etc.. there is a typo in the quoted line though. export MALLOC_PERTURB_==$(($RANDOM % 255 + 1)) must say export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) however is not gonna work with dash.