Lines Matching refs:ret

87 	int ret;
95 ret = pipe(pipefd);
96 if (ret < 0) {
97 TSTERR("pipe failed %d", ret);
98 return ret;
103 ret = ct->attach(ct, test_attach_lsm_func_func, NULL, &attach_options, &pid);
104 if (ret < 0) {
109 ret = read(pipefd[0], result, sizeof(result)-1);
110 if (ret < 0) {
111 TSTERR("read failed %d", ret);
115 result[ret] = '\0';
118 ret = -1;
121 ret = 0;
128 return ret;
133 int ret;
144 ret = pipe(pipefd);
145 if (ret < 0) {
146 TSTERR("pipe failed %d", ret);
147 return ret;
151 ret = ct->attach(ct, lxc_attach_run_command, &command, &attach_options, &pid);
152 if (ret < 0) {
157 ret = read(pipefd[0], result, sizeof(result)-1);
158 if (ret < 0) {
159 TSTERR("read failed %d", ret);
162 result[ret] = '\0';
170 ret = -1;
175 ret = 0;
182 return ret;
198 int ret;
210 ret = pipe(pipefd);
211 if (ret < 0) {
212 TSTERR("pipe failed %d", ret);
213 return ret;
217 ret = ct->attach(ct, test_attach_func_func, NULL, &attach_options, &pid);
218 if (ret < 0) {
223 ret = read(pipefd[0], result, sizeof(result)-1);
224 if (ret < 0) {
225 TSTERR("read failed %d", ret);
228 result[ret] = '\0';
237 ret = 0;
244 return ret;
249 int ret;
256 ret = ct->attach(ct, lxc_attach_run_command, &command, &attach_options, &pid);
257 if (ret < 0) {
259 return ret;
262 ret = wait_for_pid(pid);
263 if (ret < 0) {
264 TSTERR("attach success command got bad return %d", ret);
265 return ret;
270 ret = ct->attach(ct, lxc_attach_run_command, &command, &attach_options, &pid);
271 if (ret < 0) {
273 return ret;
276 ret = wait_for_pid(pid);
277 if (ret == 0) {
278 TSTERR("attach failure command got bad return %d", ret);
306 int ret;
310 ret = mkdir(lxcpath, 0755);
311 if (ret < 0 && errno != EEXIST) {
351 int ret = -1;
359 ret = test_attach_cmd(ct);
360 if (ret < 0) {
365 ret = test_attach_func(ct);
366 if (ret < 0) {
372 ret = test_attach_lsm_cmd(ct);
373 if (ret < 0) {
378 ret = test_attach_lsm_func(ct);
379 if (ret < 0) {
384 ret = 0;
389 return ret;
394 int ret;
397 ret = test_attach(NULL, TSTNAME, "busybox");
398 if (ret < 0)
402 ret = test_attach(LXCPATH "/alternate-path-test", TSTNAME, "busybox");
403 if (ret < 0)