Skip to content

Commit

Permalink
Merge pull request #1068 from sm00th/integration_pass
Browse files Browse the repository at this point in the history
Integration test stabilization
  • Loading branch information
jpoimboe committed Jan 24, 2020
2 parents 866faf5 + 272761d commit fd8209a
Show file tree
Hide file tree
Showing 17 changed files with 47 additions and 25 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ sudo debuginfo-install kernel-${UNAME%.*}
sudo yum install gcc-plugin-devel

# optional, but highly recommended
sudo yum install https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/c/ccache-3.3.4-1.el7.x86_64.rpm
sudo yum install "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
sudo yum install ccache
sudo yum remove -y epel-release # If you no longer want epel repos
ccache --max-size=5G
```

Expand Down
2 changes: 1 addition & 1 deletion test/integration/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ quick: clean
cached:
./kpatch-test -d $(PATCH_DIR) --cached $(PATCHES)

vagrant: vagrant_quick
vagrant: vagrant-quick

vagrant-quick:
./test-vagrant
Expand Down
10 changes: 7 additions & 3 deletions test/integration/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ kpatch_rhel_dependencies()
[ "${arch}" == "x86_64" ] && sudo yum install -y pesign
[ "${arch}" == "ppc64le" ] && sudo yum install -y gcc-plugin-devel

sudo yum install -y "https://dl.fedoraproject.org/pub/epel/7/${arch}/Packages/c/ccache-3.3.4-1.el7.${arch}.rpm"
sudo yum install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
sudo yum install -y ccache
sudo yum remove -y epel-release
}

kpatch_centos_dependencies()
Expand All @@ -84,7 +86,9 @@ kpatch_centos_dependencies()
sudo yum-builddep -y "kernel-${kernel_version%.*}"
sudo debuginfo-install -y "kernel-${kernel_version%.*}"

sudo yum install -y "https://dl.fedoraproject.org/pub/epel/7/${arch}/Packages/c/ccache-3.3.4-1.el7.${arch}.rpm"
sudo yum install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"
sudo yum install -y ccache
sudo yum remove -y epel-release
}

kpatch_dependencies()
Expand Down Expand Up @@ -269,7 +273,7 @@ kpatch_integration_tests_vagrant_distro()

vagrant up || { vagrant destroy -f; exit 1; }

local test_cmd="bash /vagrant/runtest.sh"
local test_cmd="KPATCH_GIT=${KPATCH_GIT} KPATCH_REV=${KPATCH_REV} bash /vagrant/runtest.sh"
if [ "${slowtest}" == "1" ]; then
test_cmd="${test_cmd} --slow"
fi
Expand Down
25 changes: 15 additions & 10 deletions test/integration/rhel-7.6/module-call-external.patch
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
Index: kernel-rhel7/fs/nfsd/export.c
===================================================================
--- kernel-rhel7.orig/fs/nfsd/export.c
+++ kernel-rhel7/fs/nfsd/export.c
@@ -1184,6 +1184,8 @@ static void exp_flags(struct seq_file *m
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 27459a453bb8..2247255877be 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1184,7 +1184,13 @@ static void exp_flags(struct seq_file *m, int flag, int fsid,
}
}

+extern char *kpatch_string(void);
+
+#ifdef CONFIG_PPC64
+static int __attribute__((optimize("-fno-optimize-sibling-calls"))) e_show(struct seq_file *m, void *p)
+#else
static int e_show(struct seq_file *m, void *p)
+#endif
{
struct cache_head *cp = p;
@@ -1193,6 +1195,7 @@ static int e_show(struct seq_file *m, vo
struct svc_export *exp = container_of(cp, struct svc_export, h);
@@ -1193,6 +1199,7 @@ static int e_show(struct seq_file *m, void *p)
if (p == SEQ_START_TOKEN) {
seq_puts(m, "# Version 1.1\n");
seq_puts(m, "# Path Client(Flags) # IPs\n");
+ seq_puts(m, kpatch_string());
return 0;
}

Index: kernel-rhel7/net/netlink/af_netlink.c
===================================================================
--- kernel-rhel7.orig/net/netlink/af_netlink.c
+++ kernel-rhel7/net/netlink/af_netlink.c
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 592f64643491..21b87cb948c9 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2568,4 +2568,9 @@ panic:
panic("netlink_init: Cannot allocate nl_table\n");
}
Expand Down
25 changes: 15 additions & 10 deletions test/integration/rhel-7.7/module-call-external.patch
Original file line number Diff line number Diff line change
@@ -1,28 +1,33 @@
Index: kernel/fs/nfsd/export.c
===================================================================
--- kernel.orig/fs/nfsd/export.c
+++ kernel/fs/nfsd/export.c
@@ -1184,6 +1184,8 @@ static void exp_flags(struct seq_file *m
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index 27459a453bb8..2247255877be 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -1184,7 +1184,13 @@ static void exp_flags(struct seq_file *m, int flag, int fsid,
}
}

+extern char *kpatch_string(void);
+
+#ifdef CONFIG_PPC64
+static int __attribute__((optimize("-fno-optimize-sibling-calls"))) e_show(struct seq_file *m, void *p)
+#else
static int e_show(struct seq_file *m, void *p)
+#endif
{
struct cache_head *cp = p;
@@ -1193,6 +1195,7 @@ static int e_show(struct seq_file *m, vo
struct svc_export *exp = container_of(cp, struct svc_export, h);
@@ -1193,6 +1199,7 @@ static int e_show(struct seq_file *m, void *p)
if (p == SEQ_START_TOKEN) {
seq_puts(m, "# Version 1.1\n");
seq_puts(m, "# Path Client(Flags) # IPs\n");
+ seq_puts(m, kpatch_string());
return 0;
}

Index: kernel/net/netlink/af_netlink.c
===================================================================
--- kernel.orig/net/netlink/af_netlink.c
+++ kernel/net/netlink/af_netlink.c
diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index 592f64643491..21b87cb948c9 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2568,4 +2568,9 @@ panic:
panic("netlink_init: Cannot allocate nl_table\n");
}
Expand Down
6 changes: 6 additions & 0 deletions test/integration/vm-integration-run
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ if [[ -d "${HOME}/src" && -f "${HOME}/src/version" ]]; then
mv "${HOME}/src" "${HOME}/.kpatch/"
fi

source /etc/os-release

if [[ "${NAME}" == "Fedora" ]] && [[ "${VERSION_ID}" -lt 30 ]]; then
export BUILDMOD=yes
fi

if [ ${KPATCH_SLOW} -eq 1 ]; then
make integration-slow 2>&1
else
Expand Down

0 comments on commit fd8209a

Please sign in to comment.