aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/zlib_SUITE.erl
AgeCommit message (Collapse)Author
2018-06-18Update copyright yearHenrik Nord
2017-11-10Merge branch 'maint'Ingela Anderton Andin
* maint: Updated OTP version Update release notes Update version numbers inets: Prepare for release inets: Add missing guard Avoid WindowBits=8 as per the manual Fix deflateParams on zlib 1.2.11 Ignore empty binaries in enif_inspect_iovec Emasculate writable binaries on entering an iovec Only apply EOS behaviors if there's pending data Conflicts: OTP_VERSION
2017-11-09Merge branch 'john/erts/fix-gunzip-eos/OTP-14730/ERL-507' into maint-20Erlang/OTP
* john/erts/fix-gunzip-eos/OTP-14730/ERL-507: Only apply EOS behaviors if there's pending data
2017-11-09Avoid WindowBits=8 as per the manualJohn Högberg
The docs for zlib:deflateInit/6 explicitly mention that 8 is broken and should not be used unless we know for certain that our zlib version supports it.
2017-11-09Fix deflateParams on zlib 1.2.11John Högberg
1.2.11 started bailing when avail_out==0 regardless of whether there's anything to flush or not, and there's no point in adapting the old method since it was vulnerable to bugs in other zlib versions which updated the deflate parameters even on failure. The api_deflateParams test has been expanded accordingly, and two white-box cases in zip_usage has been updated to make fewer assumptions about the output; the validity of the compressed data is what matters, not whether it's exactly the same as the test vector.
2017-11-02Only apply EOS behaviors if there's pending dataJohn Högberg
2017-10-25Merge branch 'maint'John Högberg
* maint: Updated OTP version Update release notes Update version numbers erts: Fix so that bind correct schedulers Update version Fix error handling when decoding an AVP with an alternate dictionary Remove unused function arguments Fix faulty recursion vsn -> 2.1.2 Update appup for ERIERL-14684 Fix speling error 'sndbuf' -> 'recbuf' Add zlib:set_controlling_process/2
2017-10-11Add zlib:set_controlling_process/2John Högberg
2017-10-02Merge branch 'maint'John Högberg
2017-09-29Fix gunzip/1 of concatenated gzip filesJohn Högberg
Quoting RFC 1952: "A gzip file consists of a series of "members" (compressed data sets). [...] The members simply appear one after another in the file, with no additional information before, between, or after them."
2017-09-29Fix minor incompatibilities in inflate behaviorJohn Högberg
When presented with multiple valid but concatenated streams, the old driver returned an empty result once the end of the first stream was reached, and kept doing so even if fed new data. The new driver/NIF returned a data_error instead. zlib:inflateInit/3 has been added to control this behavior, but is not yet ready for public use.
2017-09-06Merge branch 'maint' into john/erts/merge-zlib-and-vector-qJohn Högberg
2017-09-05Clean up zlib test suiteJohn Högberg
2017-09-05Improve zlib error messages and update test suite to fitJohn Högberg
OTP-14527
2017-09-05Replace the zlib driver with a NIFJohn Högberg
All operations will now yield appropriately, allowing them to be used freely in concurrent applications. This commit also deprecates the functions listed below, although they won't raise deprecation warnings until OTP 21: zlib:adler32 zlib:crc32 zlib:inflateChunk zlib:getBufSize zlib:setBufSize The behavior of throwing an error when a dictionary is required for decompression has also been deprecated.
2017-07-17Fix testcases after removal of non-smp emulatorLukas Larsson
2016-08-22Skip inflateGetDictionary test case if unsupportedGuilherme Andrade
2016-08-09zlib: Add test case for inflateGetDictionaryGuilherme Andrade
2016-03-15update copyright-yearHenrik Nord
2016-03-10Remove ?line macrosBjörn Gustavsson
While we are it, also re-ident the files.
2016-03-10Eliminate use of doc and suite clausesBjörn Gustavsson
Those clause are obsolete and never used by common_test.
2016-03-09Eliminate use of test_server:fail/0,1Björn Gustavsson
2016-03-09Eliminate use of ?config() macroBjörn Gustavsson
?config is ugly and not recommended. Use proplists:get_value/2 instead.
2016-03-09Modernize timetrapsBjörn Gustavsson
2016-02-17Eliminate use of test_server.hrl and test_server_line.hrlBjörn Gustavsson
As a first step to removing the test_server application as as its own separate application, change the inclusion of test_server.hrl to an inclusion of ct.hrl and remove the inclusion of test_server_line.hrl.
2015-12-11kernel test: Replace 'random' with 'rand'Björn Gustavsson
2015-06-18Change license text to APLv2Bruce Yinhe
2015-03-17Merge branch 'essen/zlib-windowbits'Zandra Hird
* essen/zlib-windowbits: Update zlib:zwindowbits/0 type to accept 8 and -8 OTP-12564
2015-03-03Update zlib:zwindowbits/0 type to accept 8 and -8Loïc Hoguin
Commit 7e8f5a776cbfa376e03369d058a90c8dd9f217fc (importing R11B-3) updated zlib, which had changed what values it accepts for window bits from 9-15 to 8-15. From deflate.c: - windowBits < 9 || windowBits > 15 || level < 0 || level > 9 || - strategy < 0 || strategy > Z_HUFFMAN_ONLY) { + windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || + strategy < 0 || strategy > Z_FIXED) { return Z_STREAM_ERROR; } + if (windowBits == 8) windowBits = 9; /* until 256-byte window bug fixed */ In inflate.c 8 was already an accepted value. This commit updates OTP to also accept the values 8 and -8.
2015-02-12Add zlib limited output buffer size functionalityСергей Прохоров
This functionality may be useful for compressed streams with high compression ratio (in case of gzip it may be up to x1000), when small amount of compressed data will produce large amount of uncompressed output. This may lead to DoS attacks, because server easily goes out of memory. Example of such high compression ratio stream: ``` dd if=/dev/zero of=sparse.bin bs=1MB count=100 # 100mb of zeroes gzip sparse.bin # 95kb sparse.bin.gz $ erl > {ok, Compressed} = file:read_file("sparse.bin.gz"), > 97082 = size(Compressed), > Uncompressed = zlib:gunzip(Compressed), > 100000000 = iolist_size(Uncompressed). ```
2014-01-16Add the 'rle' zstrategyBjörn Gustavsson
2014-01-14Update zlib to 1.2.8Björn Gustavsson
2013-11-26kernel: Fix zlib_SUITE:large_deflateSverker Eriksson
Commontest doesn't like arity 0 function with same name as test case.
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-03-15Fix port leaks in zlibSverker Eriksson
zip,unzip,gzip,gunzip,compress and uncompress did not close the port when given invalid data argument. Fixed by putting close in "try-after". A closed port could in same cases get stuck in limbo due to data in io-queue. Fixed by adding a flush callback.
2011-09-02Merge branch 'dev' into majorHans Bolinder
* dev: Update documentation and specifications of some of the zlib functions Conflicts: erts/preloaded/ebin/zlib.beam
2011-09-02Update documentation and specifications of some of the zlib functionsHans Bolinder
The functions zlib:deflateSetDictionary/2 and zlib:inflateSetDictionary/2 accept iodata() as Dictionary. The functions zlib:crc32/2,3, zlib:adler32/2,3, zlib:compress/1, zlib:uncompress/1, zlib:zip/1, and zlib:unzip/1 accept iodata() as data.
2011-08-16emulator: Add a fourth element in exception stacktracesBjörn Gustavsson
This commit is a preparation for introducing location information (filename/line number) in stacktraces in exceptions. Currently a stack trace looks like: [{Mod1,Function1,Arity1}, . . . {ModN,FunctionN,ArityN}] Add a forth element to each tuple that can be used indication the filename and line number of the source file: [{Mod1,Function1,Arity1,Location1}, . . . {ModN,FunctionN,ArityN,LocationN}] In this commit, the fourth element will just be an empty list, and we will change all code that look at or manipulate stacktraces.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-02-17Rename Suite Callback to Common Test HookLukas Larsson
2011-02-17Fix formatting for kernelLukas Larsson
2011-02-17Add init_per_suite and end_per_suiteLukas Larsson
2011-02-17Add ts_install_scb to suite/0Lukas Larsson
2011-02-17Update kernel tests to conform with common_test standardLukas Larsson
2011-02-17Update all fin_per_testcase to end_per_testcase.Lukas Larsson
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP