common.h revision 5a22be7f84f85d6b25aa277ac78ee34fac95dd42
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina Common utilities for check-based tests using talloc.
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina Martin Nagy <mnagy@redhat.com>
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina Copyright (C) Red Hat, Inc 2009
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina This program is free software; you can redistribute it and/or modify
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina it under the terms of the GNU General Public License as published by
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina the Free Software Foundation; either version 3 of the License, or
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina (at your option) any later version.
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina This program is distributed in the hope that it will be useful,
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina but WITHOUT ANY WARRANTY; without even the implied warranty of
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina GNU General Public License for more details.
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina You should have received a copy of the GNU General Public License
132e477d69e07e02fe6e4d668c0bb6226206474aPavel Březina along with this program. If not, see <http://www.gnu.org/licenses/>.
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina#define check_leaks(ctx, bytes) _check_leaks((ctx), (bytes), __location__)
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březina#define check_leaks_pop(ctx) _check_leaks_pop((ctx), __location__)
a1e4113a5388e34c08459c5b69679c82ac2bddc9Pavel Březinabool _check_leaks_pop(TALLOC_CTX *ctx, const char *location);
132e477d69e07e02fe6e4d668c0bb6226206474aPavel Březinaconst char *check_leaks_err_msg(void);
8fe171bf5a7a570591418e6548105f1d5a0097b3Pavel Březinacompare_dp_options(struct dp_option *map1, size_t size1,
8fe171bf5a7a570591418e6548105f1d5a0097b3Pavel Březinacompare_sdap_attr_maps(struct sdap_attr_map *map1, size_t size1,
8fe171bf5a7a570591418e6548105f1d5a0097b3Pavel Březina/* A common test structure for tests that require a domain to be set up. */
8fe171bf5a7a570591418e6548105f1d5a0097b3Pavel Březina const char *key;
8fe171bf5a7a570591418e6548105f1d5a0097b3Pavel Březinastruct sss_test_ctx *create_ev_test_ctx(TALLOC_CTX *mem_ctx);
132e477d69e07e02fe6e4d668c0bb6226206474aPavel Březinavoid test_dom_suite_setup(const char *tests_path);
132e477d69e07e02fe6e4d668c0bb6226206474aPavel Březinavoid test_dom_suite_cleanup(const char *tests_path,
132e477d69e07e02fe6e4d668c0bb6226206474aPavel Březinatest_request_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev, errno_t err);
132e477d69e07e02fe6e4d668c0bb6226206474aPavel Březina#define test_req_succeed_send(mem_ctx, ev) test_request_send(mem_ctx, ev, 0)
132e477d69e07e02fe6e4d668c0bb6226206474aPavel Březinaerrno_t test_request_recv(struct tevent_req *req);
132e477d69e07e02fe6e4d668c0bb6226206474aPavel Březina#endif /* !__TESTS_COMMON_H__ */