[FFmpeg-devel] [PATCH 2/2] Add http cookie tests cases to fate

Michael Niedermayer michael at niedermayer.cc
Mon Apr 3 03:00:47 EEST 2017


On Sun, Apr 02, 2017 at 04:26:07PM -0400, Micah Galizia wrote:
> Signed-off-by: Micah Galizia <micahgalizia at gmail.com>
> ---
>  libavformat/Makefile       |   1 +
>  libavformat/tests/http.c   | 185 +++++++++++++++++++++++++++++++++++++++++++++
>  tests/fate/libavformat.mak |   5 ++
>  tests/ref/fate/http        |  30 ++++++++
>  4 files changed, 221 insertions(+)
>  create mode 100644 libavformat/tests/http.c
>  create mode 100644 tests/ref/fate/http

crashes on x86-32
'good=not_expired; domain=.test.com; path=/; expires=Fri, 12 Mar 2117 02:53:03 GMT; HttpOnly'->'expires'|'Fri, 12 Mar 2117 02:53:03 GMT'
'good=great'->'good'|'great'
0) 'first="good"; Domain=.test.com; Path=/
second=great; domain=.test.com; path=/; HttpOnly'=>'first="good"; second=great'

Unable to parse 'expired="really_old"; Domain=.test.com; Expires=Thu, 01 Jan 1970 00:00:10 GMT; Path=/'
Unable to parse 'good=not_expired; domain=.test.com; path=/; expires=Fri, 12 Mar 2117 02:53:03 GMT; HttpOnly'
1) 'expired="really_old"; Domain=.test.com; Expires=Thu, 01 Jan 1970 00:00:10 GMT; Path=/
good=not_expired; domain=.test.com; path=/; expires=Fri, 12 Mar 2117 02:53:03 GMT; HttpOnly'=>'(null)'

ERROR: test case 1 failed NULL check
Unable to parse 'expired="really_old"; Domain=.test.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/'
Unable to parse 'neulion=not_expired; domain=.test.com; path=/; expires=Fri, 12-Mar-2117 02:53:03 GMT; HttpOnly'
2) 'expired="really_old"; Domain=.test.com; Expires=Thu, 01-Jan-1970 00:00:10 GMT; Path=/
neulion=not_expired; domain=.test.com; path=/; expires=Fri, 12-Mar-2117 02:53:03 GMT; HttpOnly'=>'(null)'

ERROR: test case 2 failed NULL check
Unable to parse 'no_day=still_ok; domain=.test.com; path=/; expires=12-Mar-2117 02:53:03 GMT; HttpOnly'
3) 'no_day=still_ok; domain=.test.com; path=/; expires=12-Mar-2117 02:53:03 GMT; HttpOnly'=>'(null)'

ERROR: test case 3 failed NULL check
4) 'unparsable_date=allow_cookie; domain=.test.com; path=/; expires=12-Mur-2117 02:53:03 GMT; HttpOnly'=>'unparsable_date=allow_cookie'

Unable to parse 'different_domain=exclude; domain=.nottest.com; path=/; expires=12-Mar-2117 02:53:03 GMT; HttpOnly'
5) 'different_domain=exclude; domain=.nottest.com; path=/; expires=12-Mar-2117 02:53:03 GMT; HttpOnly'=>'(null)'

Unable to parse 'no_spaces=no_big_deal;domain=.test.com;path=/;expires=Fri,12Mar211702:53:03GMT;HttpOnly'
6) 'no_spaces=no_big_deal;domain=.test.com;path=/;expires=Fri,12Mar211702:53:03GMT;HttpOnly'=>'(null)'

ERROR: test case 6 failed NULL check
Unable to parse 'no_spaces_expired=not_ok;domain=.test.com;path=/;expires=Thu01Jan1970000010GMT;HttpOnly'
7) 'no_spaces_expired=not_ok;domain=.test.com;path=/;expires=Thu01Jan1970000010GMT;HttpOnly'=>'(null)'

Unable to parse 'long=handled;domain=.test.com;path=/;expires=Fri, 12 Mar 2117 02:53:03GMTGMTGMTGMTGMTGMT;HttpOnly'
8) 'long=handled;domain=.test.com;path=/;expires=Fri, 12 Mar 2117 02:53:03GMTGMTGMTGMTGMTGMT;HttpOnly'=>'(null)'

ERROR: test case 8 failed NULL check
9) 'bad_start=ok;domain=.test.com;path=/;expires=BooBooBooFri, 12 Mar 2117 02:53:03;HttpOnly'=>'bad_start=ok'


Program received signal SIGSEGV, Segmentation fault.
test_parse_cookie () at src/libavformat/tests/http.c:146
146         printf("'%s'->'%s'|'%s'\n", new, e->key, e->value);
(gdb) bt
Python Exception <type 'exceptions.ImportError'> No module named gdb.frames:
#0  test_parse_cookie () at src/libavformat/tests/http.c:146
#1  main () at src/libavformat/tests/http.c:180
(gdb) print e
$1 = (AVDictionaryEntry *) 0x0
(gdb)

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The worst form of inequality is to try to make unequal things equal.
-- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20170403/c6e4e806/attachment.sig>


More information about the ffmpeg-devel mailing list