umovestr3.test: extend test coverage
* tests/umovestr3.c: Include <sys/param.h>. (main): Test with each number between PATH_MAX-1 and 0.
This commit is contained in:
parent
81f1b1689a
commit
af09d4f4fa
@ -28,21 +28,22 @@
|
||||
#include "tests.h"
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
(void) tail_alloc(1);
|
||||
const unsigned int size = 8;
|
||||
const char *const p = tail_alloc(size);
|
||||
const unsigned int size = PATH_MAX - 1;
|
||||
const char *p = tail_alloc(size);
|
||||
const char *const efault = p + size;
|
||||
(void) tail_alloc(1);
|
||||
(void) tail_alloc(1);
|
||||
|
||||
int rc = chdir(p);
|
||||
printf("chdir(%p) = %d %s (%m)\n", p, rc, errno2name());
|
||||
|
||||
rc = chdir(efault);
|
||||
printf("chdir(%p) = %d %s (%m)\n", efault, rc, errno2name());
|
||||
for (; p <= efault; ++p) {
|
||||
int rc = chdir(p);
|
||||
printf("chdir(%p) = %d %s (%m)\n", p, rc, errno2name());
|
||||
}
|
||||
|
||||
puts("+++ exited with 0 +++");
|
||||
return 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user