From: Serge Hallyn Date: Sat, 14 Sep 2013 17:54:46 +0000 (-0500) Subject: concurrent: take lxc template to use as argument X-Git-Tag: lxc-1.0.0.alpha2~117 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=103a2fc0729727d74470a366a1ea942d2cda2326;p=thirdparty%2Flxc.git concurrent: take lxc template to use as argument Signed-off-by: Serge Hallyn --- diff --git a/src/tests/concurrent.c b/src/tests/concurrent.c index 7faf34cb6..7cf86c459 100644 --- a/src/tests/concurrent.c +++ b/src/tests/concurrent.c @@ -22,6 +22,8 @@ #define NTHREADS 5 +char *template = "busybox"; + struct thread_args { int thread_id; int return_code; @@ -40,7 +42,7 @@ void * concurrent(void *arguments) { args->return_code = 1; if (strcmp(args->mode, "create") == 0) { if (!c->is_defined(c)) { - if (!c->create(c, "busybox", NULL, NULL, 1, NULL)) { + if (!c->create(c, template, NULL, NULL, 1, NULL)) { fprintf(stderr, "Creating the container (%s) failed...\n", name); goto out; } @@ -91,6 +93,9 @@ int main(int argc, char *argv[]) { char *modes[] = {"create", "start", "stop", "destroy", NULL}; + if (argc > 1) + template = argv[1]; + pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);