/*
* Tests for the NSS cash module
*
- * Copyright (C) 2019 Simon Ruderich
+ * Copyright (C) 2019-2020 Simon Ruderich
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <sys/types.h>
+#include <sys/wait.h>
#include <unistd.h>
#include "../cash_nss.h"
int r;
FILE *fh;
- const char *nsscache_cmd = "../nsscash convert passwd "
+ const char *nsscash_cmd = "../nsscash convert passwd "
"tests/limits tests/limits.nsscash 2> /dev/null";
// Entries which will not fit in uint16_t, nsscash must abort
r = fclose(fh);
assert(r == 0);
- r = system(nsscache_cmd);
+ r = system(nsscash_cmd);
assert(r != -1);
assert(WIFEXITED(r) && WEXITSTATUS(r) == 1);
r = fclose(fh);
assert(r == 0);
- r = system(nsscache_cmd);
+ r = system(nsscash_cmd);
assert(r != -1);
assert(WIFEXITED(r) && WEXITSTATUS(r) == 1);
r = fclose(fh);
assert(r == 0);
- r = system(nsscache_cmd);
+ r = system(nsscash_cmd);
assert(r != -1);
assert(WIFEXITED(r) && WEXITSTATUS(r) == 0);