Unverified Commit 65883989 by 0x0916 Committed by Stéphane Graber

testcase: define a network before checks

Signed-off-by: 's avatar0x0916 <w@laoqinren.net>
parent 6b63ef7c
...@@ -209,6 +209,22 @@ int main(int argc, char *argv[]) ...@@ -209,6 +209,22 @@ int main(int argc, char *argv[])
} }
printf("%d: get_config_item(lxc.network) returned %d %s\n", __LINE__, ret, v2); printf("%d: get_config_item(lxc.network) returned %d %s\n", __LINE__, ret, v2);
if (!c->set_config_item(c, "lxc.network.type", "veth")) {
fprintf(stderr, "%d: failed to set network.type\n", __LINE__);
goto out;
}
if (!c->set_config_item(c, "lxc.network.link", "lxcbr0")) {
fprintf(stderr, "%d: failed to set network.link\n", __LINE__);
goto out;
}
if (!c->set_config_item(c, "lxc.network.flags", "up")) {
fprintf(stderr, "%d: failed to set network.flags\n", __LINE__);
goto out;
}
if (!c->set_config_item(c, "lxc.network.hwaddr", "00:16:3e:xx:xx:xx")) {
fprintf(stderr, "%d: failed to set network.hwaddr\n", __LINE__);
goto out;
}
if (!c->set_config_item(c, "lxc.network.ipv4", "10.2.3.4")) { if (!c->set_config_item(c, "lxc.network.ipv4", "10.2.3.4")) {
fprintf(stderr, "%d: failed to set ipv4\n", __LINE__); fprintf(stderr, "%d: failed to set ipv4\n", __LINE__);
goto out; goto out;
......
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