Commit a38c2e6f by Stéphane Graber

tests: Fix startone

- Fix cgroup test to work on multi-core systems - Drop user interaction Signed-off-by: 's avatarStéphane Graber <stgraber@ubuntu.com>
parent 52d21d40
...@@ -158,12 +158,6 @@ int main(int argc, char *argv[]) ...@@ -158,12 +158,6 @@ int main(int argc, char *argv[])
goto out; goto out;
} }
printf("hit return to start container");
char mychar;
ret = scanf("%c", &mychar);
if (ret < 0)
goto out;
if (!lxc_container_get(c)) { if (!lxc_container_get(c)) {
fprintf(stderr, "%d: failed to get extra ref to container\n", __LINE__); fprintf(stderr, "%d: failed to get extra ref to container\n", __LINE__);
exit(1); exit(1);
...@@ -196,7 +190,7 @@ int main(int argc, char *argv[]) ...@@ -196,7 +190,7 @@ int main(int argc, char *argv[])
} }
len = c->get_cgroup_item(c, "cpuset.cpus", buf, 200); len = c->get_cgroup_item(c, "cpuset.cpus", buf, 200);
if (len <= 0 || strcmp(buf, "0\n")) { if (len <= 0 || strncmp(buf, "0", 1)) {
fprintf(stderr, "%d: not able to get cpuset.cpus (len %d buf %s)\n", __LINE__, len, buf); fprintf(stderr, "%d: not able to get cpuset.cpus (len %d buf %s)\n", __LINE__, len, buf);
goto out; goto out;
} }
...@@ -217,10 +211,6 @@ int main(int argc, char *argv[]) ...@@ -217,10 +211,6 @@ int main(int argc, char *argv[])
c->set_cgroup_item(c, "freezer.state", "THAWED"); c->set_cgroup_item(c, "freezer.state", "THAWED");
printf("hit return to finish");
ret = scanf("%c", &mychar);
if (ret < 0)
goto out;
c->stop(c); c->stop(c);
/* feh - multilib has moved the lxc-init crap */ /* feh - multilib has moved the lxc-init crap */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment