1 // commit 543787039098c121917cb5f3e129d84b61afa61b 2013-10-04
2 // setenv should not crash on oom
4 #include <sys/resource.h>
14 t_error("memfill failed\n");
16 memset(buf
, 'x', sizeof buf
);
17 buf
[sizeof buf
- 1] = 0;
20 if (setenv("TESTVAR", buf
, 1) != -1)
21 t_error("setenv was successful\n");
23 t_error("expected ENOMEM, got %s\n", strerror(errno
));