string test alignment fix by Mahesh Bodapati
[libc-test.git] / src / regression / execle-env.c
blob21f296cd9a3171673737b4359d3fce2331e9e870
1 // commit 2b2aff37aced66e4a50a38a14607a9b1dc0ee001 2013-10-03
2 // execle should pass env properly
3 #include <string.h>
4 #include <errno.h>
5 #include <unistd.h>
6 #include "test.h"
8 int main(void)
10 char *env[] = {"VAR=abc", 0};
12 execle("/bin/sh", "sh", "-c",
13 "[ \"$VAR\" = abc ] || { echo '"__FILE__": env is not passed'; exit 1; }",
14 (char*)0, env);
16 t_error("execle failed: %s\n", strerror(errno));
17 return 1;