Commit 34c1ea8c authored by Josh Coalson's avatar Josh Coalson
Browse files

instrument for valgrind

parent 23fec2b7
......@@ -22,6 +22,7 @@
#
# all : build all libraries and programs in the default configuration (currently 'release')
# debug : build all libraries and programs in debug mode
# valgrind: build all libraries and programs in debug mode, dynamically linked and ready for valgrind
# release : build all libraries and programs in release mode
# test : run the unit and stream tests
# clean : remove all non-distro files
......@@ -37,9 +38,11 @@ DEFAULT_CONFIG = release
CONFIG = $(DEFAULT_CONFIG)
debug : CONFIG = debug
valgrind: CONFIG = valgrind
release : CONFIG = release
debug : all
valgrind: all
release : all
doc:
......@@ -91,7 +94,13 @@ test_libOggFLAC++: libFLAC libOggFLAC libOggFLAC++
(cd src/$@ ; $(MAKE) -f Makefile.lite $(CONFIG))
test: debug
(cd test ; $(MAKE) -f Makefile.lite)
(cd test ; $(MAKE) -f Makefile.lite debug)
testv: valgrind
(cd test ; $(MAKE) -f Makefile.lite valgrind)
testr: release
(cd test ; $(MAKE) -f Makefile.lite release)
clean:
-(cd doc ; $(MAKE) -f Makefile.lite clean)
......
......@@ -21,8 +21,13 @@
DEFAULT_BUILD = release
debug : BUILD = debug
release : BUILD = release
debug : BUILD = debug
valgrind : BUILD = debug
release : BUILD = release
debug : LINKAGE = -static
valgrind : LINKAGE = -dynamic
release : LINKAGE = -static
all default: $(DEFAULT_BUILD)
......
......@@ -29,11 +29,9 @@ CC = gcc
CCC = g++
endif
NASM = nasm
# LINKAGE can be forced to -static or -dynamic from invocation if desired, but it defaults to -static except on OSX
# override to -dynamic on OSX
ifeq ($(DARWIN_BUILD),yes)
LINKAGE = -dynamic
else
LINKAGE = -static
endif
LINK = $(CC) $(LINKAGE)
OBJPATH = $(topdir)/obj
......@@ -48,6 +46,7 @@ DEBUG_PROGRAM = $(DEBUG_BINPATH)/$(PROGRAM_NAME)
RELEASE_PROGRAM = $(RELEASE_BINPATH)/$(PROGRAM_NAME)
debug : CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
valgrind: CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
LFLAGS = -L$(LIBPATH)
......@@ -58,6 +57,7 @@ DEBUG_OBJS = $(SRCS_C:%.c=%.debug.o) $(SRCS_CC:%.cc=%.debug.o) $(SRCS_CPP:%.cpp=
RELEASE_OBJS = $(SRCS_C:%.c=%.release.o) $(SRCS_CC:%.cc=%.release.o) $(SRCS_CPP:%.cpp=%.release.o) $(SRCS_NASM:%.nasm=%.release.o)
debug : $(ORDINALS_H) $(DEBUG_PROGRAM)
valgrind: $(ORDINALS_H) $(DEBUG_PROGRAM)
release : $(ORDINALS_H) $(RELEASE_PROGRAM)
$(DEBUG_PROGRAM) : $(DEBUG_OBJS)
......
......@@ -56,6 +56,7 @@ LINKD = $(CC) -shared
endif
debug : CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
valgrind: CFLAGS = -g -O0 -DDEBUG $(DEBUG_CFLAGS) -Wall -W -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
release : CFLAGS = -O3 -fomit-frame-pointer -funroll-loops -finline-functions -DNDEBUG $(RELEASE_CFLAGS) -Wall -W -Winline -DFLaC__INLINE=__inline__ -DVERSION=$(VERSION) $(DEFINES) $(INCLUDES)
LFLAGS = -L$(LIBPATH)
......@@ -66,6 +67,7 @@ DEBUG_OBJS = $(SRCS_C:%.c=%.debug.o) $(SRCS_CC:%.cc=%.debug.o) $(SRCS_CPP:%.cpp=
RELEASE_OBJS = $(SRCS_C:%.c=%.release.o) $(SRCS_CC:%.cc=%.release.o) $(SRCS_CPP:%.cpp=%.release.o) $(SRCS_NASM:%.nasm=%.release.o)
debug : $(ORDINALS_H) $(DEBUG_STATIC_LIB) $(DEBUG_DYNAMIC_LIB)
valgrind: $(ORDINALS_H) $(DEBUG_STATIC_LIB) $(DEBUG_DYNAMIC_LIB)
release : $(ORDINALS_H) $(RELEASE_STATIC_LIB) $(RELEASE_DYNAMIC_LIB)
$(DEBUG_STATIC_LIB): $(DEBUG_OBJS)
......
......@@ -23,9 +23,11 @@ DEFAULT_CONFIG = release
CONFIG = $(DEFAULT_CONFIG)
debug : CONFIG = debug
valgrind: CONFIG = valgrind
release : CONFIG = release
debug : all
valgrind: all
release : all
gain_analysis:
......
......@@ -23,9 +23,11 @@ DEFAULT_CONFIG = release
CONFIG = $(DEFAULT_CONFIG)
debug : CONFIG = debug
valgrind: CONFIG = valgrind
release : CONFIG = release
debug : all
valgrind: all
release : all
cuesheet:
......
......@@ -21,6 +21,12 @@ else
TESTS_ENVIRONMENT = FLAC__EXHAUSTIVE_TESTS=no
endif
if FLaC__VALGRIND_TESTING
TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT) FLAC__VALGRIND=yes
else
TESTS_ENVIRONMENT = $(TESTS_ENVIRONMENT) FLAC__VALGRIND=no
endif
SUBDIRS = cuesheets
if FLaC__HAS_OGG
......
......@@ -22,18 +22,26 @@
topdir = ..
all: clean
FLAC__EXHAUSTIVE_TESTS=yes ./test_libFLAC.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_libFLAC++.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_libOggFLAC.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_libOggFLAC++.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_metaflac.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_grabbag.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_streams.sh
FLAC__EXHAUSTIVE_TESTS=yes ./test_bins.sh
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libFLAC.sh
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libFLAC++.sh
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libOggFLAC.sh
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_libOggFLAC++.sh
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_metaflac.sh
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_grabbag.sh
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_streams.sh
$(FLAC__EXHAUSTIVE_TESTS) $(FLAC__VALGRIND) ./test_bins.sh
debug: all
debug : FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=yes
valgrind: FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=no
release : FLAC__EXHAUSTIVE_TESTS=FLAC__EXHAUSTIVE_TESTS=yes
release: all
debug : FLAC__VALGRIND=FLAC__VALGRIND=no
valgrind: FLAC__VALGRIND=FLAC__VALGRIND=yes
release : FLAC__VALGRIND=FLAC__VALGRIND=no
debug : all
valgrind: all
release : all
clean:
rm -f *.raw *.flac *.ogg *.cmp *.wav ../../test_files/bins/*.raw ../../test_files/bins/*.flac ../../test_files/bins/*.cmp *.diff *.log *.cue core
......@@ -19,14 +19,20 @@
LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/flac:../obj/release/b:../obj/debug/bin:$PATH
PATH=../src/flac:../obj/release/bin:../obj/debug/bin:$PATH
BINS_PATH=../../test_files/bins
flac --help 1>/dev/null 2>/dev/null || (echo "ERROR can't find flac executable" 1>&2 && exit 1)
if [ $? != 0 ] ; then exit 1 ; fi
#FLAC="valgrind --leak-check=yes --show-reachable=yes --logfile-fd=1 flac"
FLAC=flac
run_flac ()
{
if [ "$FLAC__VALGRIND" = yes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 flac $* 4>>valgrind.log
else
flac $*
fi
}
test -d ${BINS_PATH} || exit 77
......@@ -38,7 +44,7 @@ test_file ()
encode_options="$4"
echo -n "$name (--channels=$channels --bps=$bps $encode_options): encode..."
cmd="$FLAC --verify --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options $name.bin"
cmd="run_flac --verify --silent --force-raw-format --endian=big --sign=signed --sample-rate=44100 --bps=$bps --channels=$channels $encode_options $name.bin"
echo "### ENCODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
if $cmd 2>>./streams.log ; then : ; else
......@@ -46,7 +52,7 @@ test_file ()
exit 1
fi
echo -n "decode..."
cmd="$FLAC --silent --endian=big --sign=signed --decode --force-raw-format $name.flac";
cmd="run_flac --silent --endian=big --sign=signed --decode --force-raw-format $name.flac";
echo "### DECODE $name #######################################################" >> ./streams.log
echo "### cmd=$cmd" >> ./streams.log
if $cmd 2>>./streams.log ; then : ; else
......
......@@ -19,11 +19,20 @@
LD_LIBRARY_PATH=../src/libFLAC/.libs:../src/share/grabbag/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/test_grabbag/cuesheet:../obj/release/b:../obj/debug/bin:$PATH
PATH=../src/test_grabbag/cuesheet:../obj/release/bin:../obj/debug/bin:$PATH
test_cuesheet -h 1>/dev/null 2>/dev/null || (echo "ERROR can't find test_cuesheet executable" 1>&2 && exit 1)
if [ $? != 0 ] ; then exit 1 ; fi
run_test_cuesheet ()
{
if [ "$FLAC__VALGRIND" = yes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 test_cuesheet $* 4>>valgrind.log
else
test_cuesheet $*
fi
}
########################################################################
#
# test_cuesheet
......@@ -43,7 +52,7 @@ rm -f $log
#
for cuesheet in $bad_cuesheets ; do
echo "NEGATIVE $cuesheet" >> $log 2>&1
test_cuesheet $cuesheet $good_leadout cdda >> $log 2>&1
run_test_cuesheet $cuesheet $good_leadout cdda >> $log 2>&1
exit_code=$?
if [ "$exit_code" = 255 ] ; then
echo "Error: test script is broken"
......@@ -59,7 +68,7 @@ done
#
for cuesheet in $good_cuesheets ; do
echo "POSITIVE $cuesheet" >> $log 2>&1
test_cuesheet $cuesheet $good_leadout cdda >> $log 2>&1
run_test_cuesheet $cuesheet $good_leadout cdda >> $log 2>&1
exit_code=$?
if [ "$exit_code" = 255 ] ; then
echo "Error: test script is broken"
......
......@@ -19,10 +19,19 @@
LD_LIBRARY_PATH=../src/libFLAC++/.libs:../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/test_libFLAC++:../obj/release/b:../obj/debug/bin:$PATH
PATH=../src/test_libFLAC++:../obj/release/bin:../obj/debug/bin:$PATH
export PATH
if test_libFLAC++ ; then : ; else
run_test_libFLACpp ()
{
if [ "$FLAC__VALGRIND" = yes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 test_libFLAC++ $* 4>>valgrind.log
else
test_libFLAC++ $*
fi
}
if run_test_libFLACpp ; then : ; else
echo "ERROR during test_libFLAC++" 1>&2
exit 1
fi
......@@ -19,10 +19,19 @@
LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/test_libFLAC:../obj/release/b:../obj/debug/bin:$PATH
PATH=../src/test_libFLAC:../obj/release/bin:../obj/debug/bin:$PATH
export PATH
if test_libFLAC ; then : ; else
run_test_libFLAC ()
{
if [ "$FLAC__VALGRIND" = yes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 test_libFLAC $* 4>>valgrind.log
else
test_libFLAC $*
fi
}
if run_test_libFLAC ; then : ; else
echo "ERROR during test_libFLAC" 1>&2
exit 1
fi
......@@ -19,10 +19,19 @@
LD_LIBRARY_PATH=../src/libOggFLAC++/.libs:../src/libOggFLAC/.libs:../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/test_libOggFLAC++:../obj/release/b:../obj/debug/bin:$PATH
PATH=../src/test_libOggFLAC++:../obj/release/bin:../obj/debug/bin:$PATH
export PATH
if test_libOggFLAC++ ; then : ; else
run_test_libOggFLACpp ()
{
if [ "$FLAC__VALGRIND" = yes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 test_libOggFLAC++ $* 4>>valgrind.log
else
test_libOggFLAC++ $*
fi
}
if run_test_libOggFLACpp ; then : ; else
echo "ERROR during test_libOggFLAC++" 1>&2
exit 1
fi
......@@ -19,10 +19,19 @@
LD_LIBRARY_PATH=../src/libOggFLAC/.libs../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/test_libOggFLAC:../obj/release/b:../obj/debug/bin:$PATH
PATH=../src/test_libOggFLAC:../obj/release/bin:../obj/debug/bin:$PATH
export PATH
if test_libOggFLAC ; then : ; else
run_test_libOggFLAC ()
{
if [ "$FLAC__VALGRIND" = yes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 test_libOggFLAC $* 4>>valgrind.log
else
test_libOggFLAC $*
fi
}
if run_test_libOggFLAC ; then : ; else
echo "ERROR during test_libOggFLAC" 1>&2
exit 1
fi
......@@ -19,7 +19,7 @@
LD_LIBRARY_PATH=../src/libFLAC/.libs:../obj/release/lib:../obj/debug/lib:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
PATH=../src/flac:../src/metaflac:../obj/release/b:../obj/debug/bin:$PATH
PATH=../src/flac:../src/metaflac:../obj/release/bin:../obj/debug/bin:$PATH
flacfile=metaflac.flac
......@@ -29,10 +29,23 @@ if [ $? != 0 ] ; then exit 1 ; fi
metaflac --help 1>/dev/null 2>/dev/null || (echo "ERROR can't find metaflac executable" 1>&2 && exit 1)
if [ $? != 0 ] ; then exit 1 ; fi
#FLAC="valgrind --leak-check=yes --show-reachable=yes flac"
FLAC=flac
#METAFLAC="valgrind --leak-check=yes --show-reachable=yes metaflac"
METAFLAC=metaflac
run_flac ()
{
if [ "$FLAC__VALGRIND" = yes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 flac $* 4>>valgrind.log
else
flac $*
fi
}
run_metaflac ()
{
if [ "$FLAC__VALGRIND" = yes ] ; then
valgrind --leak-check=yes --show-reachable=yes --num-callers=10 --logfile-fd=4 metaflac $* 4>>valgrind.log
else
metaflac $*
fi
}
echo "Generating stream..."
if [ -f /bin/sh.exe ] ; then
......@@ -40,7 +53,7 @@ if [ -f /bin/sh.exe ] ; then
else
inputfile=/bin/sh
fi
if $FLAC --verify -0 --output-name=$flacfile --force-raw-format --endian=big --sign=signed --channels=1 --bps=8 --sample-rate=44100 $inputfile ; then
if run_flac --verify -0 --output-name=$flacfile --force-raw-format --endian=big --sign=signed --channels=1 --bps=8 --sample-rate=44100 $inputfile ; then
chmod +w $flacfile
else
echo "ERROR during generation" 1>&2
......@@ -58,7 +71,7 @@ check_exit ()
check_flac ()
{
if $FLAC --silent --test $flacfile ; then : ; else
if run_flac --silent --test $flacfile ; then : ; else
echo "ERROR in $flacfile" 1>&2
exit 1
fi
......@@ -66,11 +79,11 @@ check_flac ()
check_flac
(set -x && $METAFLAC --list $flacfile)
(set -x && run_metaflac --list $flacfile)
check_exit
(set -x &&
$METAFLAC \
run_metaflac \
--show-md5sum \
--show-min-blocksize \
--show-max-blocksize \
......@@ -84,193 +97,193 @@ $METAFLAC \
)
check_exit
(set -x && $METAFLAC --preserve-modtime --add-padding=12345 $flacfile)
(set -x && run_metaflac --preserve-modtime --add-padding=12345 $flacfile)
check_exit
check_flac
# some flavors of /bin/sh (e.g. Darwin's) won't even handle quoted spaces, so we underscore:
(set -x && $METAFLAC --set-vc-field="ARTIST=The_artist_formerly_known_as_the_artist..." $flacfile)
(set -x && run_metaflac --set-vc-field="ARTIST=The_artist_formerly_known_as_the_artist..." $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --block-type=VORBIS_COMMENT $flacfile)
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
check_exit
(set -x && $METAFLAC --set-vc-field="ARTIST=Chuck_Woolery" $flacfile)
(set -x && run_metaflac --set-vc-field="ARTIST=Chuck_Woolery" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --block-type=VORBIS_COMMENT $flacfile)
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
check_exit
(set -x && $METAFLAC --list --block-type=VORBIS_COMMENT $flacfile)
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
check_exit
(set -x && $METAFLAC --set-vc-field="ARTIST=Vern" $flacfile)
(set -x && run_metaflac --set-vc-field="ARTIST=Vern" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --block-type=VORBIS_COMMENT $flacfile)
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
check_exit
(set -x && $METAFLAC --set-vc-field="TITLE=He_who_smelt_it_dealt_it" $flacfile)
(set -x && run_metaflac --set-vc-field="TITLE=He_who_smelt_it_dealt_it" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --block-type=VORBIS_COMMENT $flacfile)
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
check_exit
(set -x && $METAFLAC --show-vc-vendor --show-vc-field=ARTIST $flacfile)
(set -x && run_metaflac --show-vc-vendor --show-vc-field=ARTIST $flacfile)
check_exit
(set -x && $METAFLAC --remove-vc-firstfield=ARTIST $flacfile)
(set -x && run_metaflac --remove-vc-firstfield=ARTIST $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --block-type=VORBIS_COMMENT $flacfile)
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
check_exit
(set -x && $METAFLAC --remove-vc-field=ARTIST $flacfile)
(set -x && run_metaflac --remove-vc-field=ARTIST $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --block-type=VORBIS_COMMENT $flacfile)
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT $flacfile)
check_exit
(set -x && $METAFLAC --list --block-number=0 $flacfile)
(set -x && run_metaflac --list --block-number=0 $flacfile)
check_exit
(set -x && $METAFLAC --list --block-number=1,2,999 $flacfile)
(set -x && run_metaflac --list --block-number=1,2,999 $flacfile)
check_exit
(set -x && $METAFLAC --list --block-type=VORBIS_COMMENT,PADDING $flacfile)
(set -x && run_metaflac --list --block-type=VORBIS_COMMENT,PADDING $flacfile)
check_exit
(set -x && $METAFLAC --list --except-block-type=SEEKTABLE,VORBIS_COMMENT $flacfile)
(set -x && run_metaflac --list --except-block-type=SEEKTABLE,VORBIS_COMMENT $flacfile)
check_exit
(set -x && $METAFLAC --add-padding=4321 $flacfile $flacfile)
(set -x && run_metaflac --add-padding=4321 $flacfile $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --merge-padding $flacfile)
(set -x && run_metaflac --merge-padding $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --add-padding=0 $flacfile)
(set -x && run_metaflac --add-padding=0 $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --sort-padding $flacfile)
(set -x && run_metaflac --sort-padding $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --add-padding=0 $flacfile)
(set -x && run_metaflac --add-padding=0 $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove-vc-all $flacfile)
(set -x && run_metaflac --remove-vc-all $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove --block-number=1,99 --dont-use-padding $flacfile)
(set -x && run_metaflac --remove --block-number=1,99 --dont-use-padding $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove --block-number=99 --dont-use-padding $flacfile)
(set -x && run_metaflac --remove --block-number=99 --dont-use-padding $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove --block-type=PADDING $flacfile)
(set -x && run_metaflac --remove --block-type=PADDING $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove --block-type=PADDING --dont-use-padding $flacfile)
(set -x && run_metaflac --remove --block-type=PADDING --dont-use-padding $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --add-padding=0 $flacfile $flacfile)
(set -x && run_metaflac --add-padding=0 $flacfile $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove --except-block-type=PADDING $flacfile)
(set -x && run_metaflac --remove --except-block-type=PADDING $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove-all $flacfile)
(set -x && run_metaflac --remove-all $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove-all --dont-use-padding $flacfile)
(set -x && run_metaflac --remove-all --dont-use-padding $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --remove-all --dont-use-padding $flacfile)
(set -x && run_metaflac --remove-all --dont-use-padding $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --set-vc-field="f=0123456789abcdefghij" $flacfile)
(set -x && run_metaflac --set-vc-field="f=0123456789abcdefghij" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --except-block-type=STREAMINFO $flacfile)
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
check_exit
(set -x && $METAFLAC --remove-vc-all --set-vc-field="f=0123456789abcdefghi" $flacfile)
(set -x && run_metaflac --remove-vc-all --set-vc-field="f=0123456789abcdefghi" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --except-block-type=STREAMINFO $flacfile)
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
check_exit
(set -x && $METAFLAC --remove-vc-all --set-vc-field="f=0123456789abcde" $flacfile)
(set -x && run_metaflac --remove-vc-all --set-vc-field="f=0123456789abcde" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --except-block-type=STREAMINFO $flacfile)
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
check_exit
(set -x && $METAFLAC --remove-vc-all --set-vc-field="f=0" $flacfile)
(set -x && run_metaflac --remove-vc-all --set-vc-field="f=0" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --except-block-type=STREAMINFO $flacfile)
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
check_exit
(set -x && $METAFLAC --remove-vc-all --set-vc-field="f=0123456789" $flacfile)
(set -x && run_metaflac --remove-vc-all --set-vc-field="f=0123456789" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --except-block-type=STREAMINFO $flacfile)
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
check_exit
(set -x && $METAFLAC --remove-vc-all --set-vc-field="f=0123456789abcdefghi" $flacfile)
(set -x && run_metaflac --remove-vc-all --set-vc-field="f=0123456789abcdefghi" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --except-block-type=STREAMINFO $flacfile)
(set -x && run_metaflac --list --except-block-type=STREAMINFO $flacfile)
check_exit
(set -x && $METAFLAC --remove-vc-all --set-vc-field="f=0123456789" $flacfile)
(set -x && run_metaflac --remove-vc-all --set-vc-field="f=0123456789" $flacfile)
check_exit
check_flac
(set -x && $METAFLAC --list --except-block-type=STREAMINFO $flacfile)