From 58daab21cd043e1dc37024a7f99b396788372918 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 9 Mar 2024 14:19:48 +0100 Subject: Merging upstream version 1.44.3. Signed-off-by: Daniel Baumann --- fluent-bit/lib/monkey/qa/__MACROS | 51 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 fluent-bit/lib/monkey/qa/__MACROS (limited to 'fluent-bit/lib/monkey/qa/__MACROS') diff --git a/fluent-bit/lib/monkey/qa/__MACROS b/fluent-bit/lib/monkey/qa/__MACROS new file mode 100644 index 000000000..5e0352fef --- /dev/null +++ b/fluent-bit/lib/monkey/qa/__MACROS @@ -0,0 +1,51 @@ +# ---------------------------------------------------------------------------- +# INIT: Common client-initialization +# ---------------------------------------------------------------------------- +BLOCK INIT +_LOG_LEVEL $TEST_LOG_LEVEL +END + + +# ---------------------------------------------------------------------------- +# FMT_DATE: Format given time in seconds to RFC 1123 format +# Param 1: time in seconds +# Param 2: where to store result (variable-name) +# +# (note: httest' STRFTIME works with msec instead of sec) +# ---------------------------------------------------------------------------- +BLOCK FMT_DATE +_OP $1 MUL 1000 aux +_STRFTIME $aux "%a, %d %b %Y %H:%M:%S GMT" $2 +END + + +# ---------------------------------------------------------------------------- +# TESTDOC_GETSIZE: Get TEST_DOC's file size & store it in TEST_DOC_LEN variable +# ---------------------------------------------------------------------------- +BLOCK TESTDOC_GETSIZE +_MATCH EXEC "(.*)" TEST_DOC_LEN +_SH #!/bin/bash +_SH stat -c %s $DOC_ROOT/$TEST_DOC +_SH END +END + + +# ---------------------------------------------------------------------------- +# TESTDOC_GETEPOCH: Get TEST_DOC's Epoch time & store it in TEST_DOC_EPOCH +# variable +# ---------------------------------------------------------------------------- +BLOCK TESTDOC_GETEPOCH +_MATCH EXEC "(.*)" TEST_DOC_EPOCH +_SH #!/bin/bash +_SH stat -c %Y $DOC_ROOT/$TEST_DOC +_SH END +END + + +# ---------------------------------------------------------------------------- +# TESTDOC_GETDATE: Get TEST_DOC's date & store it in TEST_DOC_HTTPDATE variable +# ---------------------------------------------------------------------------- +BLOCK TESTDOC_GETDATE +_CALL TESTDOC_GETEPOCH +_CALL FMT_DATE $TEST_DOC_EPOCH TEST_DOC_HTTPDATE +END -- cgit v1.2.3