Home
last modified time | relevance | path

Searched refs:ATF_CHECK_MSG (Results 1 – 25 of 58) sorted by relevance

123

/freebsd/lib/libc/tests/gen/
H A Dpopen_test.c57 ATF_CHECK_MSG(flags != -1, "fcntl(F_GETFD) failed; errno=%d", errno); in check_cloexec()
64 ATF_CHECK_MSG((flags & FD_CLOEXEC) == exp_flags, in check_cloexec()
79 ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode); in ATF_TC_BODY()
84 ATF_CHECK_MSG(WIFEXITED(status) && WEXITSTATUS(status) == 7, in ATF_TC_BODY()
101 ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode); in ATF_TC_BODY()
106 ATF_CHECK_MSG(!input_error_1, "input error 1"); in ATF_TC_BODY()
110 ATF_CHECK_MSG(WIFEXITED(status) && WEXITSTATUS(status) == 9, in ATF_TC_BODY()
118 ATF_CHECK_MSG(fp != NULL, "popen(, \"%s\") failed", mode); in ATF_TC_BODY()
122 ATF_CHECK_MSG((sres = fgets(buf, sizeof(buf), fp)) != NULL, in ATF_TC_BODY()
125 ATF_CHECK_MSG(strcmp(buf, "hi there\n") == 0, in ATF_TC_BODY()
[all …]
H A Dglob2_test.c85 ATF_CHECK_MSG(rc == GLOB_NOMATCH, in ATF_TC_BODY()
97 ATF_CHECK_MSG(dt < 1, "glob(3) took far too long: %d %.9f", i, in ATF_TC_BODY()
H A Dfmtmsg_test.c234 ATF_CHECK_MSG(result != NULL, "testcase %d failed", i + 1); in ATF_TC_BODY()
236 ATF_CHECK_MSG(strcmp(result, t->result) == 0, in ATF_TC_BODY()
/freebsd/lib/libc/tests/stdio/
H A Dgets_s_test.c50 ATF_CHECK_MSG(gets_s(NULL, 1) == NULL, in ATF_TC_BODY()
73 ATF_CHECK_MSG(gets_s(b, sizeof(b)) == 0, "gets_s() normal failed"); in ATF_TC_BODY()
92 ATF_CHECK_MSG(gets_s(&b, RSIZE_MAX + 1) == NULL, in ATF_TC_BODY()
102 ATF_CHECK_MSG(gets_s(&b, 0) == NULL, "gets_s() n is zero"); in ATF_TC_BODY()
114 ATF_CHECK_MSG(gets_s(&b, RSIZE_MAX + 1) == NULL, "gets_s() n > RSIZE_MAX"); in ATF_TC_BODY()
115 ATF_CHECK_MSG(error_code > 0, "gets_s() error code is %d", error_code); in ATF_TC_BODY()
116 ATF_CHECK_MSG(strcmp(message, "gets_s : n > RSIZE_MAX") == 0, "gets_s(): incorrect error message"); in ATF_TC_BODY()
129 ATF_CHECK_MSG(error_code > 0, "gets_s() error code is %d", error_code); in ATF_TC_BODY()
130 ATF_CHECK_MSG(strcmp(message, "gets_s : n == 0") == 0, "gets_s(): incorrect error message"); in ATF_TC_BODY()
H A Dprintbasic_test.c78 ATF_CHECK_MSG(strcmp(result, s) == 0, in _testfmt()
87 ATF_CHECK_MSG(wcscmp(wresult, ws) == 0, in _testfmt()
/freebsd/lib/libsbuf/tests/
H A Dsbuf_string_test.c73 ATF_CHECK_MSG(sbuf_bcat(sb, test_buffer, sizeof(test_buffer)) == 0, in ATF_TC_BODY()
81 ATF_CHECK_MSG(sbuf_bcat(sb, test_buffer, sizeof(test_buffer)) == 0, in ATF_TC_BODY()
110 ATF_CHECK_MSG(sbuf_bcpy(sb, test_buffer, sizeof(test_buffer)) == 0, in ATF_TC_BODY()
118 ATF_CHECK_MSG(sbuf_bcpy(sb, test_buffer, sizeof(test_buffer)) == 0, in ATF_TC_BODY()
148 ATF_CHECK_MSG(sbuf_cat(sb, test_string) == 0, "sbuf_cat failed"); in ATF_TC_BODY()
155 ATF_CHECK_MSG(sbuf_cat(sb, test_string) == 0, "sbuf_cat failed"); in ATF_TC_BODY()
184 ATF_CHECK_MSG(sbuf_cpy(sb, test_string) == 0, "sbuf_cpy failed"); in ATF_TC_BODY()
191 ATF_CHECK_MSG(sbuf_cpy(sb, test_string) == 0, "sbuf_cpy failed"); in ATF_TC_BODY()
250 ATF_CHECK_MSG(sbuf_cpy(sb, test_string) == 0, "sbuf_cpy failed"); in ATF_TC_BODY()
251 ATF_CHECK_MSG(sbuf_cat(sb, test_whitespace_string) == 0, in ATF_TC_BODY()
/freebsd/contrib/atf/atf-c/
H A Dmacros.h136 #define ATF_CHECK_MSG(expression, fmt, ...) \ macro
160 ATF_CHECK_MSG((expected) == (actual), "%s != %s", #expected, #actual)
167 ATF_CHECK_MSG((expected) == (actual), "%s != %s: " fmt, \
181 ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \
197 ATF_CHECK_MSG(strcmp(_atf_expected, _atf_actual) == 0, \
213 ATF_CHECK_MSG(_atf_expected == _atf_actual, \
229 ATF_CHECK_MSG(_atf_expected == _atf_actual, \
244 ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \
259 ATF_CHECK_MSG(atf_utils_grep_string("%s", _atf_string, _atf_regexp), \
/freebsd/tests/sys/sys/
H A Dtime_test.c43 ATF_CHECK_MSG((expected) - 1 <= (actual) && actual <= (expected) + 1, in atf_check_nstosbt()
71 ATF_CHECK_MSG((expected) - 1 <= (actual) && actual <= (expected) + 1, in atf_check_ustosbt()
99 ATF_CHECK_MSG((expected) - 1 <= (actual) && actual <= (expected) + 1, in atf_check_mstosbt()
126 ATF_CHECK_MSG((expected) - 1 <= (actual) && actual <= (expected) + 1, in atf_check_sbttons()
155 ATF_CHECK_MSG((expected) - 1 <= (actual) && actual <= (expected) + 1, in atf_check_sbttous()
185 ATF_CHECK_MSG((expected) - 1 <= (actual) && actual <= (expected) + 1, in atf_check_sbttoms()
H A Dqmath_test.c257 ATF_CHECK_MSG(delta_dbl <= maxe_dbl, in ATF_TC_BODY()
306 ATF_CHECK_MSG(delta_dbl <= maxe_dbl, in ATF_TC_BODY()
354 ATF_CHECK_MSG(delta_dbl <= maxe_dbl, in ATF_TC_BODY()
399 ATF_CHECK_MSG(delta_dbl <= maxe_dbl, in ATF_TC_BODY()
446 ATF_CHECK_MSG(delta_dbl <= maxe_dbl, in ATF_TC_BODY()
493 ATF_CHECK_MSG(delta_dbl <= maxe_dbl, in ATF_TC_BODY()
544 ATF_CHECK_MSG(delta_dbl <= maxe_dbl, in ATF_TC_BODY()
592 ATF_CHECK_MSG(delta_dbl <= maxe_dbl, in ATF_TC_BODY()
/freebsd/lib/libc/tests/string/
H A Dwcscoll_test.c52 ATF_CHECK_MSG(setlocale(LC_ALL, "ru_RU.UTF-8") != NULL, in ATF_TC_BODY()
55 ATF_CHECK_MSG(wcscmp(c, res) == 0, in ATF_TC_BODY()
76 ATF_CHECK_MSG(curloc != NULL, "Fail to set locale"); in ATF_TC_BODY()
121 ATF_CHECK_MSG(strxfrm(data[i].xval, data[i].sval, in ATF_TC_BODY()
139 ATF_CHECK_MSG(!((sr * sx < 0) || in ATF_TC_BODY()
H A Dstrverscmp_test.c20 ATF_CHECK_MSG( in check_all()
26 ATF_CHECK_MSG( in check_all()
32 ATF_CHECK_MSG( in check_all()
/freebsd/contrib/netbsd-tests/lib/libm/
H A Dt_fe_round.c81 ATF_CHECK_MSG( in ATF_TC_BODY()
88 ATF_CHECK_MSG( in ATF_TC_BODY()
110 ATF_CHECK_MSG( in ATF_TC_BODY()
117 ATF_CHECK_MSG( in ATF_TC_BODY()
152 ATF_CHECK_MSG( in ATF_TC_BODY()
178 ATF_CHECK_MSG( in ATF_TC_BODY()
H A Dt_ilogb.c47 ATF_CHECK_MSG((r & FE_INVALID) != 0, \
55 ATF_CHECK_MSG(r == 0, "r=%#x != 0\n", r); \
H A Dt_round.c107 ATF_CHECK_MSG((u % 2 == 0), in ATF_TC_BODY()
126 ATF_CHECK_MSG(unsigned_even % 2 == 0, in ATF_TC_BODY()
H A Dt_scalbn.c101 ATF_CHECK_MSG(rv == tests[i].result, in ATF_TC_BODY()
174 ATF_CHECK_MSG(y == ldexp(x, exps[i]), "test %zu: exponent=%d, " in ATF_TC_BODY()
246 ATF_CHECK_MSG(rv == (float)tests[i].result, in ATF_TC_BODY()
319 ATF_CHECK_MSG(y == ldexpf(x, exps[i]), in ATF_TC_BODY()
394 ATF_CHECK_MSG(rv == (long double)tests[i].result, in ATF_TC_BODY()
/freebsd/tests/sys/netinet/libalias/
H A D1_instance.c62 ATF_CHECK_MSG(la != NULL, "Creating an instance failed.");
81 ATF_CHECK_MSG(la == lo, "Recreating moved the instance around: %d", i);
99 ATF_CHECK_MSG(la[i] != NULL, "Creating instance %d failed.", i);
H A Dutil.h71 ATF_CHECK_MSG(res == PKT_ALIAS_OK, \
83 ATF_CHECK_MSG(res != PKT_ALIAS_OK, \
95 ATF_CHECK_MSG(res == PKT_ALIAS_OK, \
107 ATF_CHECK_MSG(res != PKT_ALIAS_OK, \
/freebsd/lib/msun/tests/
H A Dtest-utils.h152 ATF_CHECK_MSG(fpequal_cs(_x, _y, checksign), \
161 ATF_CHECK_MSG(eq, "%s (%.25Lg) ~= %s (%.25Lg), diff=%Lg, maxdiff=%Lg,", \
179 ATF_CHECK_MSG(equal_cs, "%s (%Lg + %Lg I) ~= %s (%Lg + %Lg I)", \
188 ATF_CHECK_MSG(equal_tol, "%s (%Lg + %Lg I) ~= %s (%Lg + %Lg I)", \
/freebsd/contrib/netbsd-tests/lib/libcrypt/
H A Dt_crypt.c135 ATF_CHECK_MSG(0, "Test %zu NULL\n", i); in ATF_TC_BODY()
141 ATF_CHECK_MSG(0, "Test %zu %s != %s\n", in ATF_TC_BODY()
/freebsd/contrib/netbsd-tests/
H A Dh_macros.h45 ATF_CHECK_MSG((x) != (v), "%s: %s", #x, strerror(errno))
49 ATF_CHECK_MSG((x) != -1, "%s [" fmt "]: %s", #x, arg, strerror(errno))
/freebsd/contrib/netbsd-tests/lib/libutil/
H A Dt_parsedate.c85 ATF_CHECK_MSG((t = parsedate(datestr, reftime, zoff)) != -1, in parsecheck()
89 ATF_CHECK_MSG(tm.tm_year + 1900 == year, in parsecheck()
93 ATF_CHECK_MSG(tm.tm_mon + 1 == month, in parsecheck()
97 ATF_CHECK_MSG(tm.tm_mday == day, in parsecheck()
101 ATF_CHECK_MSG(tm.tm_hour == hour, in parsecheck()
105 ATF_CHECK_MSG(tm.tm_min == minute, in parsecheck()
109 ATF_CHECK_MSG(tm.tm_sec == second, in parsecheck()
/freebsd/lib/libcam/tests/
H A Dlibcam_test.c233 ATF_CHECK_MSG(cam_dev != NULL, "cam_open_device failed: %s", in ATF_TC_BODY()
274 ATF_CHECK_MSG(cam_dev != NULL, "cam_open_device failed: %s", in ATF_TC_BODY()
278 ATF_CHECK_MSG(cam_ccb != NULL, "get_camccb failed: %s", cam_errbuf); in ATF_TC_BODY()
/freebsd/tests/sys/vm/
H A Dmmap_test.c101 ATF_CHECK_MSG(map_at_zero_tests[i].ok[map_at_zero] == 0, in ATF_TC_BODY()
104 ATF_CHECK_MSG(map_at_zero_tests[i].ok[map_at_zero] == 1, in ATF_TC_BODY()
121 ATF_CHECK_MSG(0, "%s failed with errno %d", msg, in checked_mmap()
128 ATF_CHECK_MSG(error == 0, "%s succeeded", msg); in checked_mmap()
/freebsd/contrib/netbsd-tests/lib/libc/time/
H A Dt_strptime.c55 ATF_CHECK_MSG(ret == exp, in h_pass()
60 ATF_CHECK_MSG(tm.field == field, \ in h_pass()
94 ATF_CHECK_MSG(strptime(buf, fmt, &tm) == NULL, "strptime(\"%s\", " in h_fail()
/freebsd/tests/sys/posixshm/
H A Dposixshm_test.c93 ATF_CHECK_MSG(fd == -1, "shm_open didn't fail"); in shm_open_should_fail()
94 ATF_CHECK_MSG(error == errno, in shm_open_should_fail()
106 ATF_CHECK_MSG(shm_unlink(path) == -1, "shm_unlink didn't fail"); in shm_unlink_should_fail()
107 ATF_CHECK_MSG(error == errno, in shm_unlink_should_fail()
1107 ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, in ATF_TC_BODY()
1109 ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, in ATF_TC_BODY()
1117 ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, in ATF_TC_BODY()
1119 ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, in ATF_TC_BODY()
1126 ATF_CHECK_MSG(fspacectl(fd, SPACECTL_DEALLOC, &range, 0, &range) == 0, in ATF_TC_BODY()
1128 ATF_CHECK_MSG(check_content_dealloc(fd, offset, length, shm_sz) == 0, in ATF_TC_BODY()
[all …]

123