Searched refs:assert_se (Results 1 - 25 of 220) sorted by relevance

123456789

/systemd/src/libsystemd/sd-bus/
H A Dtest-bus-signature.c29 assert_se(signature_is_single("y", false));
30 assert_se(signature_is_single("u", false));
31 assert_se(signature_is_single("v", false));
32 assert_se(signature_is_single("as", false));
33 assert_se(signature_is_single("(ss)", false));
34 assert_se(signature_is_single("()", false));
35 assert_se(signature_is_single("(()()()()())", false));
36 assert_se(signature_is_single("(((())))", false));
37 assert_se(signature_is_single("((((s))))", false));
38 assert_se(signature_is_singl
[all...]
H A Dtest-bus-gvariant.c36 assert_se(bus_gvariant_is_fixed_size("") > 0);
37 assert_se(bus_gvariant_is_fixed_size("()") > 0);
38 assert_se(bus_gvariant_is_fixed_size("y") > 0);
39 assert_se(bus_gvariant_is_fixed_size("u") > 0);
40 assert_se(bus_gvariant_is_fixed_size("b") > 0);
41 assert_se(bus_gvariant_is_fixed_size("n") > 0);
42 assert_se(bus_gvariant_is_fixed_size("q") > 0);
43 assert_se(bus_gvariant_is_fixed_size("i") > 0);
44 assert_se(bus_gvariant_is_fixed_size("t") > 0);
45 assert_se(bus_gvariant_is_fixed_siz
[all...]
H A Dtest-bus-error.c36 assert_se(!sd_bus_error_is_set(&error));
37 assert_se(sd_bus_error_set(&error, SD_BUS_ERROR_NOT_SUPPORTED, "xxx") == -EOPNOTSUPP);
38 assert_se(streq(error.name, SD_BUS_ERROR_NOT_SUPPORTED));
39 assert_se(streq(error.message, "xxx"));
40 assert_se(sd_bus_error_has_name(&error, SD_BUS_ERROR_NOT_SUPPORTED));
41 assert_se(sd_bus_error_get_errno(&error) == EOPNOTSUPP);
42 assert_se(sd_bus_error_is_set(&error));
46 assert_se(!sd_bus_error_is_set(&error));
47 assert_se(sd_bus_error_setf(&error, NULL, "yyy %i", -1) == 0);
48 assert_se(erro
[all...]
H A Dtest-bus-kernel.c44 assert_se(asprintf(&name, "deine-mutter-%u", (unsigned) getpid()) >= 0);
50 assert_se(bus_ref >= 0);
53 assert_se(address);
56 assert_se(r >= 0);
59 assert_se(r >= 0);
62 assert_se(r >= 0);
65 assert_se(r >= 0);
68 assert_se(r >= 0);
70 assert_se(sd_bus_negotiate_timestamp(a, 1) >= 0);
71 assert_se(sd_bus_negotiate_cred
[all...]
/systemd/src/test/
H A Dtest-uid-range.c32 assert_se(uid_range_add_str(&p, &n, "500-999") >= 0);
33 assert_se(n == 1);
34 assert_se(p[0].start == 500);
35 assert_se(p[0].nr == 500);
37 assert_se(!uid_range_contains(p, n, 499));
38 assert_se(uid_range_contains(p, n, 500));
39 assert_se(uid_range_contains(p, n, 999));
40 assert_se(!uid_range_contains(p, n, 1000));
43 assert_se(uid_range_next_lower(p, n, &search));
44 assert_se(searc
[all...]
H A Dtest-parse-util.c28 assert_se(parse_boolean("1") == 1);
29 assert_se(parse_boolean("y") == 1);
30 assert_se(parse_boolean("Y") == 1);
31 assert_se(parse_boolean("yes") == 1);
32 assert_se(parse_boolean("YES") == 1);
33 assert_se(parse_boolean("true") == 1);
34 assert_se(parse_boolean("TRUE") == 1);
35 assert_se(parse_boolean("on") == 1);
36 assert_se(parse_boolean("ON") == 1);
38 assert_se(parse_boolea
[all...]
H A Dtest-string-util.c26 assert_se(streq(string_erase(x), ""));
29 assert_se(streq(string_erase(x), "x"));
32 assert_se(streq(string_erase(x), "xx"));
35 assert_se(streq(string_erase(x), "xxx"));
38 assert_se(streq(string_erase(x), "xxxx"));
41 assert_se(streq(string_erase(x), "xxxxx"));
44 assert_se(streq(string_erase(x), "xxxxxx"));
47 assert_se(streq(string_erase(x), "xxxxxxx"));
50 assert_se(streq(string_erase(x), "xxxxxxxx"));
53 assert_se(stre
[all...]
H A Dtest-locale-util.c31 assert_se(r >= 0);
32 assert_se(locales);
36 assert_se(locale_is_valid(*p));
41 assert_se(locale_is_valid("en_EN.utf8"));
42 assert_se(locale_is_valid("fr_FR.utf8"));
43 assert_se(locale_is_valid("fr_FR@euro"));
44 assert_se(locale_is_valid("fi_FI"));
45 assert_se(locale_is_valid("POSIX"));
46 assert_se(locale_is_valid("C"));
48 assert_se(!locale_is_vali
[all...]
H A Dtest-env-replace.c31 assert_se(a);
34 assert_se(b);
37 assert_se(c);
40 assert_se(d);
42 assert_se(streq(d[0], "WALDO=WALDO"));
43 assert_se(streq(d[1], "WALDO="));
44 assert_se(strv_length(d) == 2);
51 assert_se(l);
53 assert_se(strv_env_unset(l, "SCHLUMPF") == l);
55 assert_se(stre
[all...]
H A Dtest-hostname-util.c29 assert_se(hostname_is_valid("foobar", false));
30 assert_se(hostname_is_valid("foobar.com", false));
31 assert_se(!hostname_is_valid("foobar.com.", false));
32 assert_se(hostname_is_valid("fooBAR", false));
33 assert_se(hostname_is_valid("fooBAR.com", false));
34 assert_se(!hostname_is_valid("fooBAR.", false));
35 assert_se(!hostname_is_valid("fooBAR.com.", false));
36 assert_se(!hostname_is_valid("fööbar", false));
37 assert_se(!hostname_is_valid("", false));
38 assert_se(!hostname_is_vali
[all...]
H A Dtest-bitmap.c28 assert_se(b);
30 assert_se(bitmap_ensure_allocated(&b) == 0);
33 assert_se(bitmap_ensure_allocated(&b) == 0);
35 assert_se(bitmap_isset(b, 0) == false);
36 assert_se(bitmap_isset(b, 1) == false);
37 assert_se(bitmap_isset(b, 256) == false);
38 assert_se(bitmap_isclear(b) == true);
40 assert_se(bitmap_set(b, 0) == 0);
41 assert_se(bitmap_isset(b, 0) == true);
42 assert_se(bitmap_isclea
[all...]
H A Dtest-cgroup.c32 assert_se(cg_create(SYSTEMD_CGROUP_CONTROLLER, "/test-a") == 0);
33 assert_se(cg_create(SYSTEMD_CGROUP_CONTROLLER, "/test-a") == 0);
34 assert_se(cg_create(SYSTEMD_CGROUP_CONTROLLER, "/test-b") == 0);
35 assert_se(cg_create(SYSTEMD_CGROUP_CONTROLLER, "/test-b/test-c") == 0);
36 assert_se(cg_create_and_attach(SYSTEMD_CGROUP_CONTROLLER, "/test-b", 0) == 0);
38 assert_se(cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0);
39 assert_se(streq(path, "/test-b"));
42 assert_se(cg_attach(SYSTEMD_CGROUP_CONTROLLER, "/test-a", 0) == 0);
44 assert_se(cg_pid_get_path(SYSTEMD_CGROUP_CONTROLLER, getpid(), &path) == 0);
45 assert_se(path_equa
[all...]
H A Dtest-time.c26 assert_se(parse_sec("5s", &u) >= 0);
27 assert_se(u == 5 * USEC_PER_SEC);
28 assert_se(parse_sec("5s500ms", &u) >= 0);
29 assert_se(u == 5 * USEC_PER_SEC + 500 * USEC_PER_MSEC);
30 assert_se(parse_sec(" 5s 500ms ", &u) >= 0);
31 assert_se(u == 5 * USEC_PER_SEC + 500 * USEC_PER_MSEC);
32 assert_se(parse_sec(" 5.5s ", &u) >= 0);
33 assert_se(u == 5 * USEC_PER_SEC + 500 * USEC_PER_MSEC);
34 assert_se(parse_sec(" 5.5s 0.5ms ", &u) >= 0);
35 assert_se(
[all...]
H A Dtest-set.c28 assert_se(m);
30 assert_se(set_put(m, (void*) "1") == 1);
31 assert_se(set_put(m, (void*) "22") == 1);
32 assert_se(set_put(m, (void*) "333") == 1);
37 assert_se(seen[0] == 1 && seen[1] == 1 && seen[2] == 1);
39 assert_se(set_isempty(m));
46 assert_se(m);
48 assert_se(set_put(m, (void*) "1") == 1);
49 assert_se(set_put(m, (void*) "22") == 1);
50 assert_se(set_pu
[all...]
H A Dtest-list.c33 assert_se(head == NULL);
37 assert_se(LIST_JUST_US(item, &items[i]));
44 assert_se(cursor != &items[2]);
46 assert_se(i == ELEMENTSOF(items)-1);
51 assert_se(cursor != &items[0]);
53 assert_se(i == ELEMENTSOF(items)-1);
58 assert_se(cursor != &items[3]);
60 assert_se(i == ELEMENTSOF(items)-1);
62 assert_se(!LIST_JUST_US(item, head));
64 assert_se(item
[all...]
H A Dtest-id128.c39 assert_se(sd_id128_randomize(&id) == 0);
42 assert_se(sd_id128_from_string(t, &id2) == 0);
43 assert_se(sd_id128_equal(id, id2));
46 assert_se(sd_id128_get_machine(&id) == 0);
49 assert_se(sd_id128_get_boot(&id) == 0);
54 assert_se(streq(t, STR_WALDI));
56 assert_se(asprintf(&b, SD_ID128_FORMAT_STR, SD_ID128_FORMAT_VAL(ID128_WALDI)) == 32);
58 assert_se(streq(t, b));
60 assert_se(sd_id128_from_string(UUID_WALDI, &id) >= 0);
61 assert_se(sd_id128_equa
[all...]
H A Dtest-util.c60 assert_se(streq_ptr(NULL, NULL));
61 assert_se(!streq_ptr("abc", "cdef"));
67 assert_se(ALIGN_POWER2(0) == 0);
68 assert_se(ALIGN_POWER2(1) == 1);
69 assert_se(ALIGN_POWER2(2) == 2);
70 assert_se(ALIGN_POWER2(3) == 4);
71 assert_se(ALIGN_POWER2(12) == 16);
73 assert_se(ALIGN_POWER2(ULONG_MAX) == 0);
74 assert_se(ALIGN_POWER2(ULONG_MAX - 1) == 0);
75 assert_se(ALIGN_POWER
[all...]
H A Dtest-barrier.c47 assert_se(setitimer(ITIMER_REAL, &v, NULL) >= 0);
52 assert_se(usecs < USEC_PER_SEC);
61 assert_se(barrier_create(&b) >= 0); \
62 assert_se(b.me > 0); \
63 assert_se(b.them > 0); \
64 assert_se(b.pipe[0] > 0); \
65 assert_se(b.pipe[1] > 0); \
68 assert_se(pid1 >= 0); \
76 assert_se(pid2 >= 0); \
94 assert_se(pid
[all...]
H A Dtest-cap-list.c33 assert_se(!capability_to_name(-1));
34 assert_se(!capability_to_name(capability_list_length()));
39 assert_se(n = capability_to_name(i));
40 assert_se(capability_from_name(n) == i);
44 assert_se(capability_from_name("asdfbsd") == -EINVAL);
45 assert_se(capability_from_name("CAP_AUDIT_READ") == CAP_AUDIT_READ);
46 assert_se(capability_from_name("cap_audit_read") == CAP_AUDIT_READ);
47 assert_se(capability_from_name("cAp_aUdIt_rEAd") == CAP_AUDIT_READ);
48 assert_se(capability_from_name("0") == 0);
49 assert_se(capability_from_nam
[all...]
H A Dtest-strbuf.c50 assert_se(streq(l[0], "")); /* root */
51 assert_se(streq(l[1], "waldo"));
52 assert_se(streq(l[2], "foo"));
53 assert_se(streq(l[3], "bar"));
54 assert_se(streq(l[4], "waldorf"));
56 assert_se(sb->nodes_count == 5); /* root + 4 non-duplicates */
57 assert_se(sb->dedup_count == 3);
58 assert_se(sb->in_count == 7);
60 assert_se(sb->in_len == 29); /* length of all strings added */
61 assert_se(s
[all...]
H A Dtest-utf8.c26 assert_se(utf8_is_printable("ascii is valid\tunicode", 22));
27 assert_se(utf8_is_printable("\342\204\242", 3));
28 assert_se(!utf8_is_printable("\341\204", 2));
29 assert_se(utf8_is_printable("ąę", 4));
33 assert_se(utf8_is_valid("ascii is valid unicode"));
34 assert_se(utf8_is_valid("\342\204\242"));
35 assert_se(!utf8_is_valid("\341\204"));
39 assert_se(ascii_is_valid("alsdjf\t\vbarr\nba z"));
40 assert_se(!ascii_is_valid("\342\204\242"));
41 assert_se(!ascii_is_vali
[all...]
/systemd/src/login/
H A Dtest-login-shared.c24 assert_se(session_id_valid("c1"));
25 assert_se(session_id_valid("1234"));
27 assert_se(!session_id_valid("1-2"));
28 assert_se(!session_id_valid(""));
29 assert_se(!session_id_valid("\tid"));
/systemd/src/journal/
H A Dtest-journal-match.c36 assert_se(sd_journal_open(&j, 0) >= 0);
38 assert_se(sd_journal_add_match(j, "foobar", 0) < 0);
39 assert_se(sd_journal_add_match(j, "foobar=waldo", 0) < 0);
40 assert_se(sd_journal_add_match(j, "", 0) < 0);
41 assert_se(sd_journal_add_match(j, "=", 0) < 0);
42 assert_se(sd_journal_add_match(j, "=xxxxx", 0) < 0);
43 assert_se(sd_journal_add_match(j, "HALLO=WALDO", 0) >= 0);
44 assert_se(sd_journal_add_match(j, "QUUX=mmmm", 0) >= 0);
45 assert_se(sd_journal_add_match(j, "QUUX=xxxxx", 0) >= 0);
46 assert_se(sd_journal_add_matc
[all...]
/systemd/src/bus-proxyd/
H A Dtest-bus-xml-policy.c38 assert_se(path);
77 assert_se(test_policy_load(&p, "ownerships.conf") == 0);
79 assert_se(policy_check_own(&p, 0, 0, "org.test.test1") == true);
80 assert_se(policy_check_own(&p, 1, 0, "org.test.test1") == true);
82 assert_se(policy_check_own(&p, 0, 0, "org.test.test2") == true);
83 assert_se(policy_check_own(&p, 1, 0, "org.test.test2") == false);
85 assert_se(policy_check_own(&p, 0, 0, "org.test.test3") == false);
86 assert_se(policy_check_own(&p, 1, 0, "org.test.test3") == false);
88 assert_se(policy_check_own(&p, 0, 0, "org.test.test4") == false);
89 assert_se(policy_check_ow
[all...]
/systemd/src/network/
H A Dtest-network.c33 assert_se(inet_pton(AF_INET, "0:0:0:0:0:FFFF:204.152.189.116", &a) == 0);
34 assert_se(inet_pton(AF_INET6, "192.168.0.1", &d) == 0);
36 assert_se(inet_pton(AF_INET, "192.168.0.1", &a) == 1);
37 assert_se(inet_pton(AF_INET, "192.168.0.2", &b) == 1);
38 assert_se(inet_pton(AF_INET, "192.168.0.3", &c) == 1);
39 assert_se(inet_pton(AF_INET6, "0:0:0:0:0:FFFF:204.152.189.116", &d) == 1);
40 assert_se(inet_pton(AF_INET6, "::1", &e) == 1);
41 assert_se(inet_pton(AF_INET6, "1:0:0:0:0:0:0:8", &f) == 1);
43 assert_se((size = deserialize_in_addrs(&addresses, addresses_string)) >= 0);
44 assert_se(siz
[all...]

Completed in 6105 milliseconds

123456789