Skip to content

Commit

Permalink
zdtm: workaround ip route dump problem
Browse files Browse the repository at this point in the history
This is needed to workaround the problem with "ip route save":
(00.113153)     Running ip route save
Error: ipv4: FIB table does not exist.

checkpoint-restore/criu#747
https://jira.sw.ru/browse/PSBM-120728

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
  • Loading branch information
Snorch committed Dec 1, 2020
1 parent e262c99 commit 1c445d1
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 2 deletions.
3 changes: 3 additions & 0 deletions test/zdtm/static/detached_namespace_with_bindmount.c
Expand Up @@ -125,6 +125,9 @@ static int child(void *arg)
char ns_path[PATH_MAX], *net_bind = (char *)arg;
int ppid = getppid(), ret = 1, sk = -1;

if (system("ip link set up dev lo"))
goto err;

if (create_self_netns_bind(net_bind))
goto err;

Expand Down
7 changes: 6 additions & 1 deletion test/zdtm/static/detached_namespace_with_bindmount.desc
@@ -1 +1,6 @@
{'flavor': 'ns uns', 'flags': 'suid', 'ropts': '--no-mounts-compat'}
{
'deps': ['/sbin/ip|bin/ip', '/bin/sh'],
'flavor': 'ns uns',
'flags': 'suid',
'ropts': '--no-mounts-compat'
}
5 changes: 5 additions & 0 deletions test/zdtm/static/netns_sysfs.c
Expand Up @@ -34,6 +34,11 @@ static int netns_child(void *arg)
char ip_cmd[64];
char *path = (char *)arg;

if (system("ip link set up dev lo")) {
futex_set_and_wake(futex, EMERGENCY_ABORT);
return 1;
}

snprintf(ip_cmd, sizeof(ip_cmd), "ip link add name %s type bridge",
NETNS_SYSFS_ZDTMBR);

Expand Down
2 changes: 2 additions & 0 deletions test/zdtm/static/ns_file_bindmount.c
Expand Up @@ -20,6 +20,8 @@ TEST_OPTION(dirname, string, "directory name", 1);

static int child(void *unused)
{
system("ip link set up dev lo");

while (1)
sleep(1);
return 0;
Expand Down
7 changes: 6 additions & 1 deletion test/zdtm/static/ns_file_bindmount.desc
@@ -1 +1,6 @@
{'flavor': 'ns uns', 'flags': 'suid', 'ropts': '--no-mounts-compat'}
{
'deps': ['/sbin/ip|/bin/ip', '/bin/sh'],
'flavor': 'ns uns',
'flags': 'suid',
'ropts': '--no-mounts-compat'
}

0 comments on commit 1c445d1

Please sign in to comment.