Hi,
is the test suite broken?
> ============================================
> liblognorm 1.1.1: tests/test-suite.log
> ============================================
>
> # TOTAL: 21
> # PASS: 3
> # SKIP: 0
> # XFAIL: 0
> # FAIL: 18
> # XPASS: 0
> # ERROR: 0
>
> .. contents:: :depth: 2
>
> FAIL: field_hexnumber.sh
> ========================
>
> ===============================================================================
> [field_hexnumber.sh]: test for hexnumber field
> Using valgrind: no
> Out:
> { "originalmsg": "123 abc 456 def", "unparsed-data": " abc 456 def" }
> ": " is a number 0x1234 in hex form" }
> JSONs weren't equal.
> Expected:
> {"num": "0x1234"}
> Actual:
> { "server_ip": "192.168.1.5", "addresses": [ { "ip_addr":
> "1.2.3.4" }, { "subnet_mask": "12", "subnet_addr": "5.6.16.0" }, { "ip_addr":
> "8.9.10.11" }, { "ip_addr": "12.13.14.15" }, { "subnet_mask": "8",
> "subnet_addr": "16.17.18.0" }, { "subnet_mask": "3", "subnet_addr":
> "19.20.21.24" } ], "via_ip": "192.168.1.1" }
> FAIL field_hexnumber.sh (exit status: 1)
>
> FAIL: field_tokenized.sh
> ========================
>
> ===============================================================================
> [field_tokenized.sh]: test for tokenized field
> Using valgrind: no
> Out:
> { "more": "ijk789", "arr": [ "123", "abc", "456", "def" ] }
> FAIL field_tokenized.sh (exit status: 1)
>
> FAIL: field_tokenized_with_invalid_ruledef.sh
> =============================================
>
> ===============================================================================
> [field_tokenized_with_invalid_ruledef.sh]: test for tokenized field with
> invalid rule definition
> Using valgrind: no
> Out:
> { "originalmsg": "123 abc 456 def", "unparsed-data": " abc 456 def" }
> ": " is a number 0x1234 in hex form" }
> FAIL field_tokenized_with_invalid_ruledef.sh (exit status: 1)
>
> FAIL: field_recursive.sh
> ========================
>
> ===============================================================================
> [field_recursive.sh]: test for recursive parsing field
> Using valgrind: no
> Out:
> { "server_ip": "192.168.1.5", "addresses": [ { "ip_addr": "1.2.3.4" }, {
> "subnet_mask": "12", "subnet_addr": "5.6.16.0" }, { "ip_addr": "8.9.10.11" },
> { "ip_addr": "12.13.14.15" }, { "subnet_mask": "8", "subnet_addr":
> "16.17.18.0" }, { "subnet_mask": "3", "subnet_addr": "19.20.21.24" } ],
> "via_ip": "192.168.1.1" }
> JSONs weren't equal.
> Expected:
> {"word": "123", "next": {"word": "abc", "next": {"word": "456",
> "next" : {"word": "def"}}}}
> Actual:
> { "server_ip": "192.168.1.5", "addresses": [ { "ip_addr":
> "1.2.3.4" }, { "subnet_mask": "12", "subnet_addr": "5.6.16.0" }, { "ip_addr":
> "8.9.10.11" }, { "ip_addr": "12.13.14.15" }, { "subnet_mask": "8",
> "subnet_addr": "16.17.18.0" }, { "subnet_mask": "3", "subnet_addr":
> "19.20.21.24" } ], "via_ip": "192.168.1.1" }
> FAIL field_recursive.sh (exit status: 1)
>
> FAIL: field_tokenized_recursive.sh
> ==================================
>
> ===============================================================================
> [field_tokenized_recursive.sh]: test for tokenized field with recursive field
> matching tokens
> Using valgrind: no
> Out:
> { "server_ip": "192.168.1.5", "addresses": [ { "ip_addr": "1.2.3.4" }, {
> "subnet_mask": "12", "subnet_addr": "5.6.16.0" }, { "ip_addr": "8.9.10.11" },
> { "ip_addr": "12.13.14.15" }, { "subnet_mask": "8", "subnet_addr":
> "16.17.18.0" }, { "subnet_mask": "3", "subnet_addr": "19.20.21.24" } ],
> "via_ip": "192.168.1.1" }
> Out:
> JSONs weren't equal.
> Expected:
> {
> "addresses": [
> {"ip_addr": "1.2.3.4"},
> {"subnet_addr": "5.6.16.0", "subnet_mask": "12"},
> {"ip_addr": "8.9.10.11"},
> {"ip_addr": "12.13.14.15"},
> {"subnet_addr": "16.17.18.0", "subnet_mask": "8"},
> {"subnet_addr": "19.20.21.24", "subnet_mask": "3"}],
> "server_ip": "192.168.1.5",
> "via_ip": "192.168.1.1"}
> Actual:
>
> FAIL field_tokenized_recursive.sh (exit status: 1)
>
> FAIL: field_interpret.sh
> ========================
>
> ===============================================================================
> [field_interpret.sh]: test for value interpreting field
> Using valgrind: no
> Out:
> { "session_count": 64 }
> Out:
> { "originalmsg": "64 sessions established", "unparsed-data": "64 sessions
> established" }
> JSONs weren't equal.
> Expected:
> {"at_limit": true}
> Actual:
> { "originalmsg": "64 sessions established", "unparsed-data":
> "64 sessions established" }
> FAIL field_interpret.sh (exit status: 1)
>
> FAIL: field_interpret_with_invalid_ruledef.sh
> =============================================
>
> ===============================================================================
> [field_interpret_with_invalid_ruledef.sh]: test for value interpreting field,
> with invalid ruledef
> Using valgrind: no
> Out:
> { "originalmsg": "64 sessions established", "unparsed-data": "64 sessions
> established" }
> Out:
> { "originalmsg": "blocked on gw-1 10.20.30.40 at
> 2014-12-08T08:53:33.05+05:30", "unparsed-data": "blocked on gw-1 10.20.30.40
> at 2014-12-08T08:53:33.05+05:30" }
> JSONs weren't equal.
> Expected:
> { "originalmsg": "64 sessions established", "unparsed-data":
> "64 sessions established" }
> Actual:
> { "originalmsg": "blocked on gw-1 10.20.30.40 at
> 2014-12-08T08:53:33.05+05:30", "unparsed-data": "blocked on gw-1 10.20.30.40
> at 2014-12-08T08:53:33.05+05:30" }
> FAIL field_interpret_with_invalid_ruledef.sh (exit status: 1)
>
> FAIL: field_descent.sh
> ======================
>
> ===============================================================================
> [field_descent.sh]: test for descent based parsing field
> Using valgrind: no
> Out:
> { "originalmsg": "blocked on gw-1 10.20.30.40 at
> 2014-12-08T08:53:33.05+05:30", "unparsed-data": "blocked on gw-1 10.20.30.40
> at 2014-12-08T08:53:33.05+05:30" }
> JSONs weren't equal.
> Expected:
> {"device": "gw-1", "net": {"ip_addr": "10.20.30.40"}, "tm":
> "2014-12-08T08:53:33.05+05:30"}
> Actual:
> { "originalmsg": "blocked on gw-1 10.20.30.40 at
> 2014-12-08T08:53:33.05+05:30", "unparsed-data": "blocked on gw-1 10.20.30.40
> at 2014-12-08T08:53:33.05+05:30" }
> FAIL field_descent.sh (exit status: 1)
>
> FAIL: field_descent_with_invalid_ruledef.sh
> ===========================================
>
> ===============================================================================
> [field_descent_with_invalid_ruledef.sh]: test for descent based parsing
> field, with invalid ruledef
> Using valgrind: no
> Out:
> { "originalmsg": "64 sessions established", "unparsed-data": "64 sessions
> established" }
> JSONs weren't equal.
> Expected:
> { "originalmsg": "10.20.30.40 foo", "unparsed-data":
> "10.20.30.40 foo" }
> Actual:
> { "originalmsg": "blocked on gw-1 10.20.30.40 at
> 2014-12-08T08:53:33.05+05:30", "unparsed-data": "blocked on gw-1 10.20.30.40
> at 2014-12-08T08:53:33.05+05:30" }
> FAIL field_descent_with_invalid_ruledef.sh (exit status: 1)
>
> FAIL: field_float.sh
> ====================
>
> ===============================================================================
> [field_float.sh]: test for float field
> Using valgrind: no
> Out:
> { "originalmsg": "10.20.30.40 foo", "unparsed-data": "10.20.30.40 foo" }
> JSONs weren't equal.
> Expected:
> {"num": "15.9"}
> Actual:
> { "originalmsg": "blocked on gw-1 10.20.30.40 at
> 2014-12-08T08:53:33.05+05:30", "unparsed-data": "blocked on gw-1 10.20.30.40
> at 2014-12-08T08:53:33.05+05:30" }
> FAIL field_float.sh (exit status: 1)
>
> FAIL: field_suffixed.sh
> =======================
>
> ===============================================================================
> [field_suffixed.sh]: test for field with one of many possible suffixes
> Using valgrind: no
> Out:
> { "surviver_size": { "value": "30.2", "suffix": "mb" }, "surviver_used": {
> "value": "95", "suffix": "b" }, "eden_free": { "value": "559", "suffix": "mb"
> } }
> Out:
> { "rest": "gc reclaimed 559mb eden [surviver: 95b\/30.2mb]", "first": "" }
> JSONs weren't equal.
> Expected:
> {"eden_free": {"size": "559", "unit":"mb"}, "surviver_used":
> {"sz": "95", "u": "b"}, "surviver_size": {"value": "30.2", "suffix": "mb"}}
> Actual:
>
> FAIL field_suffixed.sh (exit status: 1)
>
> FAIL: field_suffixed_with_invalid_ruledef.sh
> ============================================
>
> ===============================================================================
> [field_suffixed_with_invalid_ruledef.sh]: test for field with one of many
> possible suffixes, but invalid ruledef
> Using valgrind: no
> Out:
> { "rest": "gc reclaimed 559mb eden [surviver: 95b\/30.2mb]", "first": "" }
> JSONs weren't equal.
> Expected:
> { "originalmsg": "reclaimed 559mb eden", "unparsed-data":
> "559mb eden" }
> Actual:
> { "rest": "gc reclaimed 559mb eden [surviver: 95b\/30.2mb]",
> "first": "" }
> FAIL field_suffixed_with_invalid_ruledef.sh (exit status: 1)
>
> FAIL: field_regex_default_group_parse_and_return.sh
> ===================================================
>
> ===============================================================================
> [field_regex_default_group_parse_and_return.sh]: test for type ERE for regex
> field
> Using valgrind: no
> Out:
> { "second": "122%:7a%", "first": "foo" }
> "" }
> FAIL field_regex_default_group_parse_and_return.sh (exit status: 1)
>
> FAIL: field_regex_invalid_args.sh
> =================================
>
> ===============================================================================
> [field_regex_invalid_args.sh]: test for invalid type for regex field with
> everything else defaulted
> Using valgrind: no
> Out:
> { "second": "122%:7a%", "first": "foo" }
> "" }
> FAIL field_regex_invalid_args.sh (exit status: 1)
>
> FAIL: field_regex_with_consume_group.sh
> =======================================
>
> ===============================================================================
> [field_regex_with_consume_group.sh]: test for regex field with consume-group
> Using valgrind: no
> Out:
> { "rest": "gc reclaimed 559mb eden [surviver: 95b\/30.2mb]", "first": "" }
> FAIL field_regex_with_consume_group.sh (exit status: 1)
>
> FAIL: field_regex_with_consume_group_and_return_group.sh
> ========================================================
>
> ===============================================================================
> [field_regex_with_consume_group_and_return_group.sh]: test for regex field
> with consume-group and return-group
> Using valgrind: no
> ++ add_rule 'rule=:%first:regex:[a-z]{2}(([a-f0-9]+),)+:0:2%%rest:rest%'
> +++ rulebase_file_name
> +++ '[' x == x ']'
> +++ echo tmp.rulebase
> ++ local rb_file=tmp.rulebase
> ++ echo 'rule=:%first:regex:[a-z]{2}(([a-f0-9]+),)+:0:2%%rest:rest%'
> ++ execute ad1234abcd,4567ef12,8901abef
> ++ '[' x == xon ']'
> ++ echo ad1234abcd,4567ef12,8901abef
> ++ ../src/ln_test -oallowRegex -r tmp.rulebase -e json
> ++ echo Out:
> Out:
> ++ cat test.out
> { "rest": "8901abef", "first": "4567ef12" }
> ++ '[' x == xon ']'
> ++ assert_output_contains '"first": "4567ef12"'
> ++ grep -F '"first": "4567ef12"'
> ++ cat test.out
> { "rest": "8901abef", "first": "4567ef12" }
> ++ assert_output_contains '"rest": "8901abef"'
> ++ grep -F '"rest": "8901abef"'
> ++ cat test.out
> { "rest": "8901abef", "first": "4567ef12" }
> ++ reset_rules
> +++ rulebase_file_name
> +++ '[' x == x ']'
> +++ echo tmp.rulebase
> ++ local rb_file=tmp.rulebase
> ++ rm -f tmp.rulebase
> ++ add_rule 'rule=:%first:regex:(([a-z]{2})(([a-f0-9]+),)+):2:4%%rest:rest%'
> +++ rulebase_file_name
> +++ '[' x == x ']'
> +++ echo tmp.rulebase
> ++ local rb_file=tmp.rulebase
> ++ echo 'rule=:%first:regex:(([a-z]{2})(([a-f0-9]+),)+):2:4%%rest:rest%'
> ++ execute ad1234abcd,4567ef12,8901abef
> ++ '[' x == xon ']'
> ++ ../src/ln_test -oallowRegex -r tmp.rulebase -e json
> ++ echo ad1234abcd,4567ef12,8901abef
> ++ echo Out:
> Out:
> ++ cat test.out
> { "rest": "1234abcd,4567ef12,8901abef", "first": "4567ef12" }
> ++ '[' x == xon ']'
> ++ assert_output_contains '"first": "4567ef12"'
> ++ grep -F '"first": "4567ef12"'
> ++ cat test.out
> FAIL field_regex_with_consume_group_and_return_group.sh (exit status: 1)
>
> FAIL: field_regex_with_negation.sh
> ==================================
>
> ===============================================================================
> [field_regex_with_negation.sh]: test for regex field with negation
> Using valgrind: no
> Out:
> { "originalmsg": "123,abc,456,def foo bar", "unparsed-data": "123,abc,456,def
> foo bar" }
> FAIL field_regex_with_negation.sh (exit status: 1)
>
> FAIL: field_regex_while_regex_support_is_disabled.sh
> ====================================================
>
> ===============================================================================
> [field_regex_while_regex_support_is_disabled.sh]: test for field regex, while
> regex support is disabled
> Using valgrind: no
> Out:
> { "originalmsg": "123,abc,456,def foo bar", "unparsed-data": "123,abc,456,def
> foo bar" }
> FAIL field_regex_while_regex_support_is_disabled.sh (exit status: 1)
-Thomas
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com/professional-services/
What's up with rsyslog? Follow https://twitter.com/rgerhards
NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of
sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE
THAT.