mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
ctdb-tests: Strengthen some tests
Check for the expected result instead of just any failure. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
1eec3184b6
commit
a0c5d2e2b5
@ -49,7 +49,7 @@ static void test_sock_addr_from_string_bad(const char *ip, bool with_port)
|
||||
int ret;
|
||||
|
||||
ret = ctdb_sock_addr_from_string(ip, &sa, with_port);
|
||||
assert(ret != 0);
|
||||
assert(ret == EINVAL);
|
||||
}
|
||||
|
||||
static void test_sock_addr_cmp(const char *ip1, const char *ip2,
|
||||
@ -141,7 +141,7 @@ static void test_connection_from_string_bad(const char *conn_str)
|
||||
int ret;
|
||||
|
||||
ret = ctdb_connection_from_string(conn_str, false, &conn);
|
||||
assert(ret != 0);
|
||||
assert(ret == EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
@ -240,7 +240,7 @@ static void test_connection_list_read_bad(const char *s1)
|
||||
close(pipefd[0]);
|
||||
|
||||
ret = ctdb_connection_list_read(tmp_ctx, false, &conn_list);
|
||||
assert(ret != 0);
|
||||
assert(ret == EINVAL);
|
||||
|
||||
talloc_free(tmp_ctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user