int main() { int ret, status = 0; char *script, *ltproot; ltproot = getenv("LTPROOT"); if (! ltproot) { printf("LTPROOT env variable is not set\n"); printf("Please set LTPROOT and re-run the test.. Thankyou\n"); return -1; } script = malloc (FILENAME_MAX); if (script == NULL) { printf("FAIL: error while allocating mem"); exit(1); } sprintf(script, "%s/testcases/bin/parent_share.sh" , ltproot); /* Parent should be able to view child sysfs and vice versa */ ret = system(script); status = WEXITSTATUS(ret); if (ret == -1 || status != 0) { printf("Error while executing the script %s\n", script); fflush(stdout); exit(1); } status = create_net_namespace("parent_view.sh","child_propagate.sh"); return status; }
int main(void) { int status; setup(); status = create_net_namespace("netns_delchild.sh", "netns_rename_net.sh"); if (status == 0) tst_resm(TPASS, "create_net_namespace"); else tst_resm(TFAIL, "create_net_namespace"); tst_exit(); }
int main() { int status; /* * The argument files contain the code to be run in the parent and * child network namespace container respectively */ status = create_net_namespace("runallnetworktests_parent.sh", "runallnetworktests_child.sh"); printf("Execution of all the network testcases under network" " namespace done. return value is %d\n", status); return status; }
int main() { int status; status = create_net_namespace("par_ftp.sh", "ch_ftp.sh"); return status; }
int main(void) { int status; status = create_net_namespace("delchild.sh", "rename_net.sh"); return status; }