From 85e0c8135de3db530a4605f67235844babea1a01 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 14 Jun 2024 18:17:58 +0200 Subject: Merging upstream version 3.3.6. Signed-off-by: Daniel Baumann --- tests/libknot/test_xdp_tcp.c | 1 - tests/libknot/test_yparser.c | 9 ++++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/libknot/test_xdp_tcp.c b/tests/libknot/test_xdp_tcp.c index 3e366b1..f6b11b0 100644 --- a/tests/libknot/test_xdp_tcp.c +++ b/tests/libknot/test_xdp_tcp.c @@ -92,7 +92,6 @@ static int mock_send(_unused_ knot_xdp_socket_t *sock, const knot_xdp_msg_t msgs ok(msg->payload.iov_len == 0, "send: is empty payload"); if (msg->flags & KNOT_XDP_MSG_RST) { - ok(!(msg->flags & KNOT_XDP_MSG_ACK), "send: no RST+ACK"); sent_rsts++; } else if (msg->flags & KNOT_XDP_MSG_SYN) { ok(msg->flags & KNOT_XDP_MSG_ACK, "send: is SYN+ACK"); diff --git a/tests/libknot/test_yparser.c b/tests/libknot/test_yparser.c index 8655096..8b6c31f 100644 --- a/tests/libknot/test_yparser.c +++ b/tests/libknot/test_yparser.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2021 CZ.NIC, z.s.p.o. +/* Copyright (C) 2024 CZ.NIC, z.s.p.o. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -27,6 +27,9 @@ const char *syntax_ok = " # comment\n" "a:\n" "a :\n" + "a: \"\"\n" + "a: []\n" + "a: [ ]\n" "a : #comment\n" "\n" "b: \"b\"\n" @@ -118,7 +121,7 @@ static void test_syntax_ok(yp_parser_t *yp) is_int(KNOT_EOK, ret, "set input string"); size_t line = 3; - for (int i = 0; i < 3; i++) { + for (int i = 0; i < 6; i++) { ret = yp_parse(yp); is_int(KNOT_EOK, ret, "parse %i. key0", i); ok(yp->key_len == 1 && yp->key[0] == 'a' && @@ -126,7 +129,7 @@ static void test_syntax_ok(yp_parser_t *yp) yp->line_count == line + i, "compare %i. key0", i); } - line += 4; + line += 7; for (int i = 0; i < 6; i++) { ret = yp_parse(yp); is_int(KNOT_EOK, ret, "parse %i. key0 with value", i); -- cgit v1.2.3