Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/checkpoint-restore/criu.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2019-08-08 21:09:05 +0300
committerAndrei Vagin <avagin@gmail.com>2019-09-07 15:59:56 +0300
commit5f91f920a8756e565d4a93a2542ba13865cc5733 (patch)
treec1a27d2b634bd4c621b2f471c424dcfe3e9c0c7e /test
parente5bdcbbd1d975f088df3e5766f1ddda4a29c3cb1 (diff)
test: bring the lo interface up in each network namespace
This is needed to workaround the problem with "ip route save": (00.113153) Running ip route save Error: ipv4: FIB table does not exist. Signed-off-by: Andrei Vagin <avagin@gmail.com>
Diffstat (limited to 'test')
-rw-r--r--test/zdtm/static/netns_sub.c4
-rw-r--r--test/zdtm/static/netns_sub.desc6
-rw-r--r--test/zdtm/static/netns_sub_veth.c2
-rw-r--r--test/zdtm/static/netns_sub_veth.desc2
4 files changed, 12 insertions, 2 deletions
diff --git a/test/zdtm/static/netns_sub.c b/test/zdtm/static/netns_sub.c
index 6515057d8..9f77bf96b 100644
--- a/test/zdtm/static/netns_sub.c
+++ b/test/zdtm/static/netns_sub.c
@@ -104,6 +104,8 @@ int main(int argc, char **argv)
pr_perror("unshare");
return 1;
}
+ if (system("ip link set up dev lo"))
+ return 1;
sk = create_socket(1);
if (sk < 0)
return 1;
@@ -166,6 +168,8 @@ int main(int argc, char **argv)
pr_perror("unshare");
return 1;
}
+ if (system("ip link set up dev lo"))
+ return 1;
sk = create_socket(2);
if (sk < 0)
return 1;
diff --git a/test/zdtm/static/netns_sub.desc b/test/zdtm/static/netns_sub.desc
index 7657ba45c..1f12518d2 100644
--- a/test/zdtm/static/netns_sub.desc
+++ b/test/zdtm/static/netns_sub.desc
@@ -1 +1,5 @@
-{'flavor': 'ns uns', 'flags': 'suid'}
+{
+ 'deps': ['/bin/sh', '/sbin/ip|/bin/ip'],
+ 'flavor': 'ns uns',
+ 'flags': 'suid'
+}
diff --git a/test/zdtm/static/netns_sub_veth.c b/test/zdtm/static/netns_sub_veth.c
index 927827199..eedbb15c3 100644
--- a/test/zdtm/static/netns_sub_veth.c
+++ b/test/zdtm/static/netns_sub_veth.c
@@ -50,6 +50,8 @@ int main(int argc, char **argv)
if (unshare(CLONE_NEWNET))
return 1;
+ if (system("ip link set up dev lo"))
+ return 1;
task_waiter_complete(&lock, i);
test_waitsig();
diff --git a/test/zdtm/static/netns_sub_veth.desc b/test/zdtm/static/netns_sub_veth.desc
index ea9e15c8a..18f81a880 100644
--- a/test/zdtm/static/netns_sub_veth.desc
+++ b/test/zdtm/static/netns_sub_veth.desc
@@ -1,5 +1,5 @@
{
- 'deps': ['/sbin/ip', '/bin/sh'],
+ 'deps': ['/sbin/ip|/bin/ip', '/bin/sh'],
'flags': 'suid',
'flavor': 'ns uns',
'feature': 'link_nsid',