Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ls test frang 08 #298

Closed
wants to merge 13 commits into from
3 changes: 2 additions & 1 deletion tempesta_fw/t/unit/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ tfw_test-objs = \
test_sched_hash.o \
test_sched_http.o \
test_http_sticky.o \
kallsyms_helper.o
kallsyms_helper.o \
test_frang.o
6 changes: 4 additions & 2 deletions tempesta_fw/t/unit/sched_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,19 +95,21 @@ test_create_srv(const char *in_addr, TfwSrvGroup *sg)

return srv;
}

TfwSrvConnection *
test_create_conn(TfwPeer *peer)
{
void (*tfw_connection_link_peer)(TfwConnection *conn,TfwPeer *peer);
static struct sock __test_sock = {
.sk_state = TCP_ESTABLISHED,
};
TfwSrvConnection *srv_conn;

tfw_connection_link_peer = get_sym_ptr("tfw_connection_link_peer");

BUG_ON(tfw_srv_conn_alloc_ptr == NULL);
srv_conn = tfw_srv_conn_alloc_ptr();
BUG_ON(!srv_conn);

BUG_ON(tfw_connection_link_peer == NULL);
tfw_connection_link_peer(&srv_conn->conn, peer);
srv_conn->conn.sk = &__test_sock;

Expand Down
3 changes: 3 additions & 0 deletions tempesta_fw/t/unit/test.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ TEST_SUITE(cfg);
TEST_SUITE(sched_rr);
TEST_SUITE(sched_hash);
TEST_SUITE(sched_http);
TEST_SUITE(frang);

int
test_run_all(void)
Expand All @@ -108,6 +109,8 @@ test_run_all(void)
TEST_SUITE_RUN(sched_rr);
TEST_SUITE_RUN(sched_hash);
TEST_SUITE_RUN(sched_http);
TEST_SUITE_RUN(frang);


return test_fail_counter;
}
Loading