Skip to content

Commit

Permalink
automatic commit at releng box
Browse files Browse the repository at this point in the history
  • Loading branch information
mc36 committed Apr 6, 2022
1 parent 017eeeb commit 232fa5a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 16 deletions.
20 changes: 6 additions & 14 deletions misc/native/ptyRun.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ int main(int argc, char **argv) {

if (argc < 2) err("using: pty <bin> [args]");

int status = 1;

struct pollfd* fds = malloc(sizeof(struct pollfd)*2);
if (fds == NULL) err("error allocating memory");
int commSock = 0;
Expand All @@ -30,18 +28,10 @@ int main(int argc, char **argv) {
return 0;
}

int i = fork();
if ((i != -1) && (i != 0)) {
if (waitpid(childPid, &status, 0) == -1) err("error waiting for process");
sleep(1);
printf("\r\nchild exited with %i code\r\n", status);
fflush(stdout);
return WEXITSTATUS(status);
}

printf("child %i created on %i\r\n", childPid, commSock);
fflush(stdout);

int i;
unsigned char buf[1024];
for (;;) {
fds[0].fd = commSock;
Expand All @@ -64,8 +54,10 @@ int main(int argc, char **argv) {
if ((i & POLLHUP) != 0) break;
}

printf("\r\nchild closed stdio lines\r\n");
fflush(stdout);
int status = 1;
if (waitpid(childPid, &status, 0) == -1) err("error waiting for process");
sleep(1);
return status;
printf("\r\nprocess exited with %i code\r\n", status);
fflush(stdout);
return WEXITSTATUS(status);
}
2 changes: 1 addition & 1 deletion src/rtr.csv
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
url;file;result;test
-;-;-;freeRouter v22.4.6-cur, done by cs@nop.
-;-;-;2022-04-06 11:13:39, took 00:08:50, with 80 workers, on 2830 cases, 0 failed, 0 traces, 0 retries
-;-;-;2022-04-06 14:56:25, took 00:08:41, with 80 workers, on 2830 cases, 0 failed, 0 traces, 4 retries
-;-;-;./rtr.bin
http://sources.freertr.net/cfg/basic.tst;basic.tst;success;dummy test
http://sources.freertr.net/cfg/conn-amt01.tst;conn-amt01.tst;success;amt over ipv4
Expand Down
2 changes: 1 addition & 1 deletion src/rtr.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</style>
<title>tester</title></head><body>
release: freeRouter v22.4.6-cur, done by cs@nop.<br/>
tested: 2022-04-06 11:13:39, took 00:08:50, with 80 workers, on 2830 cases, 0 failed, 0 traces, 0 retries<br/>
tested: 2022-04-06 14:56:25, took 00:08:41, with 80 workers, on 2830 cases, 0 failed, 0 traces, 4 retries<br/>
jvm: ./rtr.bin<br/>
<br/>
<table><thead><tr><td><b>file</b></td><td><b>result</b></td><td><b>test</b></td></tr></thead><tbody>
Expand Down

0 comments on commit 232fa5a

Please sign in to comment.