Lines Matching refs:tc
81 static struct test_case tc[] = {
163 const char *fname = strstr(tc[i].fname, "fgetxattr02") + OFFSET;
165 TEST(fgetxattr(tc[i].fd, tc[i].key, tc[i].ret_value, tc[i].size));
172 if (tc[i].exp_ret == TST_RET) {
181 if (strncmp(tc[i].ret_value, XATTR_TEST_VALUE,
184 XATTR_TEST_VALUE, tc[i].ret_value);
191 if (tc[i].exp_err == TST_ERR) {
218 for (i = 0; i < ARRAY_SIZE(tc); i++) {
220 tc[i].ret_value = SAFE_MALLOC(tc[i].size);
221 memset(tc[i].ret_value, 0, tc[i].size);
223 if (tc[i].issocket) {
229 tc[i].fd = SAFE_SOCKET(AF_UNIX, SOCK_STREAM, 0);
233 strncpy(sun.sun_path, tc[i].fname,
236 SAFE_BIND(tc[i].fd, (const struct sockaddr *) &sun,
239 tc[i].fd = SAFE_OPEN(tc[i].fname, tc[i].fflags);
242 if (tc[i].exp_ret >= 0) {
243 SAFE_FSETXATTR(tc[i].fd, tc[i].key, tc[i].value,
244 tc[i].size, tc[i].flags);
253 for (i = 0; i < ARRAY_SIZE(tc); i++) {
254 free(tc[i].ret_value);
256 if (tc[i].fd > 0)
257 SAFE_CLOSE(tc[i].fd);
265 .tcnt = ARRAY_SIZE(tc),