This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of how to use GCC backtrace functions (in a plugin). | |
#include <cstdlib> | |
extern "C" int backtrace(void **frame_list, int size); | |
extern "C" char ** backtrace_symbols(void * const *frame_list, int size); | |
// ... | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ cat load.py | |
import yaml | |
import sys | |
f = open(sys.argv[1], 'r') | |
y = yaml.load(f) | |
print(y) | |
$ | |
$ cat y1.yaml | |
a: | |
- b: | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
M$ fgrep threadKey *.[ch]* | |
combo_handler.cc:pthread_key_t threadKey = 0; | |
combo_handler.cc: TSReleaseAssert(pthread_key_create(&threadKey, nullptr) == 0); | |
esi.cc:pthread_key_t threadKey = 0; | |
esi.cc: if (threadKey == 0) { | |
esi.cc: if ((result = pthread_key_create(&threadKey, nullptr)) != 0) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ -x /usr/bin/shasum ]] ; then | |
/usr/bin/shasum "$@" | |
echo "$?" | |
fi | |
if [[ ( "$1" != "-a" ) || ( "$2" != 256 ) ]] ; then | |
echo "first two parameters must be '-a 256'" 1>&1 | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if [[ "$(uname)" != Linux ]] ; then | |
echo "This script only runs on Linux" | |
exit 1 | |
fi | |
if [[ ! -d .git ]] ; then | |
echo "Not at root of repo" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@atslab03 TWATCH3]# cat x.cc | |
#include <iostream> | |
#include <cstdlib> | |
#include <atomic> | |
#include <cstdint> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <pthread.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DEBUG_LOG("IMS Cached header time %" PRId64 " vs IMS %" PRId64, static_cast<std::int64_t>(ch_time), static_cast<std::int64_t>(txn_state->ims_time)); | |
Because: | |
DEBUG_LOG("IMS Cached header time %" PRId64 " vs IMS %" PRId64, std::int64_t(ch_time), std::int64_t(txn_state->ims_time)); | |
(constructor-style casts) is not Leif-legal. |