Instantly share code, notes, and snippets.

View notes
In TS repo subdir tests. In this dir, run ./autest.sh --ats-bin <install-ats-bin-path> -f <test-name> where <test-name>.test.py file is in the gold_tests dir tree.
Some of the python code for Au Test is in files with a .ext extension rather than a .py extension.
TS/tests/gold_tests/autest-site contains python extensions that are specific to trafficserver for Au Test.
Weird failures can be caused by a ‘stale’ env-test subdirectory. If you do ‘rm -rf env-test’, this will trigger bootstrap.py to re-run, getting the latest contents for env-test.
Test.RunDirectory - _sandbox/<test-name>
Test.TestDirectory - directory with <test-name>.test.py file.
View TS_debug_output.txt
[Aug 22 23:02:49.590] {0x7f48ba4dd740} DEBUG: <Cache.cc:3161 (ink_cache_init)> (cache_init) proxy.config.cache.ram_cache.size = -1 = 0Mb
[Aug 22 23:02:49.590] {0x7f48ba4dd740} DEBUG: <Cache.cc:3169 (ink_cache_init)> (cache_init) proxy.config.cache.limits.http.max_alts = 5
[Aug 22 23:02:49.590] {0x7f48ba4dd740} DEBUG: <Cache.cc:3173 (ink_cache_init)> (cache_init) cache_config_ram_cache_cutoff = 4194304 = 4Mb
[Aug 22 23:02:49.590] {0x7f48ba4dd740} DEBUG: <Cache.cc:3176 (ink_cache_init)> (cache_init) proxy.config.cache.permit.pinning = 0
[Aug 22 23:02:49.590] {0x7f48ba4dd740} DEBUG: <Cache.cc:3179 (ink_cache_init)> (cache_init) proxy.config.cache.dir.sync_frequency = 60
[Aug 22 23:02:49.591] {0x7f48ba4dd740} DEBUG: <Cache.cc:3182 (ink_cache_init)> (cache_init) proxy.config.cache.select_alternate = 1
[Aug 22 23:02:49.591] {0x7f48ba4dd740} DEBUG: <Cache.cc:3186 (ink_cache_init)> (cache_init) proxy.config.cache.max_doc_size = 0 = 0Mb
[Aug 22 23:02:49.591] {0x7f48ba4dd740} DEBUG: <Cache.cc:3189 (ink_cache_init)> (ca
View PUSH.cap
wkaras ~/TSX/TS/bin
C$ date ; curl --verbose http://127.0.0.1:8080/ip -X PUSH -H 'Content-Length: 0' -H 'Host: httpbin.org' 2>&1 | fgrep '< HTTP/' ; date
Wed Aug 8 16:47:16 UTC 2018
0 0 0 0 0 0 0 0 --:--:-- 0:00:29 --:--:-- 0< HTTP/1.1 400 Malformed Pushed Response Header
Wed Aug 8 16:47:46 UTC 2018
wkaras ~/TSX/TS/bin
C$ date ; curl --verbose http://httpbin.org/ip -X PUSH -H 'Content-Length: 0' 2>&1 | fgrep '< HTTP/' ; date
Wed Aug 8 16:48:26 UTC 2018
< HTTP/1.1 405 METHOD NOT ALLOWED
Wed Aug 8 16:48:26 UTC 2018
View error.txt
body = ('''
{
"beacons": [
{
"url" : "http://127.0.0.1:{0}",
"action": "return_204"
}
],
"version": "0.1"
}
View config.my
#!/bin/bash
if [[ ! -f configure.ac ]] ; then
echo "configure.ac not found"
exit 1
fi
DIR="$(basename $PWD )"
# "--enable-layout=Yahoo"
View compress_long.log
wkaras ~/TS2/tests/_sandbox/compress
$ cat *long.log
* About to connect() to proxy 127.0.0.1 port 61998 (#0)
* Trying 127.0.0.1... connected
* Connected to 127.0.0.1 (127.0.0.1) port 61998 (#0)
> GET http://ae-0/obj0 HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.19.1 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2
> Host: ae-0
> Accept: */*
> Proxy-Connection: Keep-Alive
View VagueDynLink.txt
View gist:f5a6b47804d77e274d8ae0990e60a218
(gdb) info stack
#0 0x00002b0ebb91f495 in raise () from /lib64/libc.so.6
#1 0x00002b0ebb920bfd in abort () from /lib64/libc.so.6
#2 0x00002b0eb93fc13d in ink_abort (message_format=0x2b0eb9422afc "%s:%d: failed assertion `%s`") at ink_error.cc:99
#3 0x00002b0eb93f95b2 in _ink_assert (expression=0x7da865 "t != 0", file=0x7da838 "/home/wkaras/TS4/iocore/eventsystem/I_Lock.h",
line=407) at ink_assert.cc:37
#4 0x000000000053b044 in Mutex_lock (location=..., ahandler=0x0, m=0x2b0ec010f260, t=0x0)
at /home/wkaras/TS4/iocore/eventsystem/I_Lock.h:407
#5 0x000000000055e074 in TSMutexLock (mutexp=0x2b0ec010f260) at InkIOCoreAPI.cc:289
#6 0x00002aaaaaecec48 in Test1::thread () at test_cppapi/test_cppapi.cc:31
View gist:692d210d4c9c3688140cc4b69fa4e017
wkaras ~/TS6/doc
$ make clean
Making clean in .
make[1]: Entering directory `/home/wkaras/TS6/doc'
rm -rf .libs _libs
rm -rf docbuild/* _build/html/* xml
rm -f *.lo
make[1]: Leaving directory `/home/wkaras/TS6/doc'
wkaras ~/TS6/doc
$ make html
View gzip.config
cache true
remove-accept-encoding true
compressible-content-type text/*
supported-algorithms br,gzip