1 // commit 543787039098c121917cb5f3e129d84b61afa61b 2013-10-04
2 // setenv should not crash on oom
12 if (t_vmfill(0,0,0) < 0)
13 t_error("vmfill failed: %s\n", strerror(errno));
15 memset(buf, 'x', sizeof buf);
16 buf[sizeof buf - 1] = 0;
19 if (setenv("TESTVAR", buf, 1) != -1)
20 t_error("setenv was successful\n");
22 t_error("expected ENOMEM, got %s\n", strerror(errno));