Skip to content

Commit

Permalink
reproc: Stop returning from test functions.
Browse files Browse the repository at this point in the history
  • Loading branch information
DaanDeMeyer committed Jan 4, 2020
1 parent 50997a4 commit 7296756
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 21 deletions.
2 changes: 0 additions & 2 deletions reproc/test/argv.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,4 @@ int main(void)

reproc_destroy(process);
reproc_free(output);

return 0;
}
2 changes: 0 additions & 2 deletions reproc/test/environment.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,4 @@ int main(void)

reproc_destroy(process);
reproc_free(output);

return 0;
}
10 changes: 2 additions & 8 deletions reproc/test/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <assert.h>
#include <string.h>

static int io(const char *mode, const char *input, const char *expected)
static void io(const char *mode, const char *input, const char *expected)
{
int r = -1;

Expand Down Expand Up @@ -36,11 +36,9 @@ static int io(const char *mode, const char *input, const char *expected)

reproc_destroy(process);
reproc_free(output);

return 0;
}

static int timeout(void)
static void timeout(void)
{
int r = -1;

Expand All @@ -63,8 +61,6 @@ static int timeout(void)
assert(r == REPROC_EPIPE);

reproc_destroy(process);

return 0;
}

#define MESSAGE "reproc stands for REdirected PROCess"
Expand All @@ -76,6 +72,4 @@ int main(void)
io("both", MESSAGE, MESSAGE MESSAGE);

timeout();

return 0;
}
2 changes: 0 additions & 2 deletions reproc/test/overflow.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,4 @@ int main(void)

reproc_destroy(process);
reproc_free(output);

return 0;
}
6 changes: 1 addition & 5 deletions reproc/test/stop.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#undef NDEBUG
#include <assert.h>

static int stop(REPROC_STOP action, int status)
static void stop(REPROC_STOP action, int status)
{
int r = -1;

Expand All @@ -22,14 +22,10 @@ static int stop(REPROC_STOP action, int status)
assert(r == status);

reproc_destroy(process);

return 0;
}

int main(void)
{
stop(REPROC_STOP_TERMINATE, REPROC_SIGTERM);
stop(REPROC_STOP_KILL, REPROC_SIGKILL);

return 0;
}
2 changes: 0 additions & 2 deletions reproc/test/working-directory.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,4 @@ int main(void)

reproc_destroy(process);
reproc_free(output);

return 0;
}

0 comments on commit 7296756

Please sign in to comment.