diff options
author | Andreas Schwab <schwab@suse.de> | 2016-10-20 10:04:41 +0200 |
---|---|---|
committer | Andreas Schwab <schwab@suse.de> | 2016-10-31 12:36:08 +0100 |
commit | 44c637ce806cc41534e89117a93c41fd310e7e3f (patch) | |
tree | 5b5cd09de566e3bbdec011b97838293b0ac6a418 /posix/globtest.sh | |
parent | 93fe09cb5fbf68e473d5514adc069d2f6115cc23 (diff) | |
download | glibc-44c637ce806cc41534e89117a93c41fd310e7e3f.tar glibc-44c637ce806cc41534e89117a93c41fd310e7e3f.tar.gz glibc-44c637ce806cc41534e89117a93c41fd310e7e3f.tar.bz2 glibc-44c637ce806cc41534e89117a93c41fd310e7e3f.zip |
Properly initialize glob structure with GLOB_BRACE|GLOB_DOOFFS (bug 20707)
Diffstat (limited to 'posix/globtest.sh')
-rwxr-xr-x | posix/globtest.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/posix/globtest.sh b/posix/globtest.sh index 73fe11bd76..e280f7d2b3 100755 --- a/posix/globtest.sh +++ b/posix/globtest.sh @@ -794,6 +794,22 @@ if test $failed -ne 0; then result=1 fi +# Test GLOB_BRACE and GLIB_DOOFFS with malloc checking +failed=0 +${test_wrapper_env} \ +MALLOC_PERTURB_=65 \ +${test_via_rtld_prefix} \ +${common_objpfx}posix/globtest -b -o "$testdir" "file{1,2}" > $testout || failed=1 +cat <<"EOF" | $CMP - $testout >> $logfile || failed=1 +`abc' +`file1' +`file2' +EOF +if test $failed -ne 0; then + echo "GLOB_BRACE+GLOB_DOOFFS test failed" >> $logfile + result=1 +fi + if test $result -eq 0; then chmod 777 $testdir/noread rm -fr $testdir $testout |