Example #1
0
int main(int argc, char *argv[]) {
        _cleanup_event_unref_ sd_event *e;

        log_set_max_level(LOG_DEBUG);
        log_parse_environment();
        log_open();

        assert_se(sd_event_new(&e) >= 0);

        test_request_basic(e);
        test_checksum();

        test_discover_message(e);
        test_addr_acq(e);

        return 0;
}
Example #2
0
int main(int argc, char *argv[]) {
        _cleanup_(sd_event_unrefp) sd_event *e;

        test_setup_logging(LOG_DEBUG);

        assert_se(sd_event_new(&e) >= 0);

        test_request_basic(e);
        test_request_anonymize(e);
        test_checksum();

        test_discover_message(e);
        test_addr_acq(e);

#if VALGRIND
        /* Make sure the async_close thread has finished.
         * valgrind would report some of the phread_* structures
         * as not cleaned up properly. */
        sleep(1);
#endif

        return 0;
}