Message ID | 20220118104702.68142-1-po-hsu.lin@canonical.com |
---|---|
State | New |
Headers | show |
Series | [autotest-client-tests] UBUNTU: SAUCE: ubuntu_cve_kernel: merge test from ubuntu_cve2_kernel | expand |
+1 LGTM, Comments addressed during weds night sync up. On 1/18/22 5:47 AM, Po-Hsu Lin wrote: > BugLink: https://bugs.launchpad.net/bugs/1957153 > > Having these two tests altogether in our repo is a bit confusing, the > ubuntu_cve2_kernel was introduced because of the blacklist setting in > ubuntu_cve_kernel. Now with the blacklist setting improved, we can > merge test from ubuntu_cve2_kernel into ubuntu_cve_kernel. > > This can make it less confusing and save us some deployment time. > > Patch tested with: > * Impish 5.13 AMD64 > * Focal 5.4 PowerPC > * Bionic 4.15 ARM64 > * Tusty 3.13 AMD64 > > We can adjust our test plan in CKCT after this change. > > Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> > --- > ubuntu_cve2_kernel/Makefile | 16 --------- > ubuntu_cve2_kernel/control | 17 --------- > ubuntu_cve2_kernel/ubuntu_cve2_kernel.py | 36 ------------------- > ubuntu_cve_kernel/control | 1 + > .../cves}/CVE-2021-2736X/CVE-2021-2736X.c | 0 > .../cves}/CVE-2021-2736X/Makefile | 0 > .../cves}/CVE-2021-2736X/iscsi_if.h | 0 > 7 files changed, 1 insertion(+), 69 deletions(-) > delete mode 100644 ubuntu_cve2_kernel/Makefile > delete mode 100644 ubuntu_cve2_kernel/control > delete mode 100644 ubuntu_cve2_kernel/ubuntu_cve2_kernel.py > rename {ubuntu_cve2_kernel => ubuntu_cve_kernel/cves}/CVE-2021-2736X/CVE-2021-2736X.c (100%) > rename {ubuntu_cve2_kernel => ubuntu_cve_kernel/cves}/CVE-2021-2736X/Makefile (100%) > rename {ubuntu_cve2_kernel => ubuntu_cve_kernel/cves}/CVE-2021-2736X/iscsi_if.h (100%) > > diff --git a/ubuntu_cve2_kernel/Makefile b/ubuntu_cve2_kernel/Makefile > deleted file mode 100644 > index b1b2f314..00000000 > --- a/ubuntu_cve2_kernel/Makefile > +++ /dev/null > @@ -1,16 +0,0 @@ > -SUBDIRS = CVE-2021-2736X > - > -all: > - for subdir in $(SUBDIRS); do \ > - make -C $$subdir; \ > - done > - > -check: > - for subdir in $(SUBDIRS); do \ > - make -C $$subdir check; \ > - done > - > -clean: > - for subdir in $(SUBDIRS); do \ > - make -C $$subdir clean; \ > - done > diff --git a/ubuntu_cve2_kernel/control b/ubuntu_cve2_kernel/control > deleted file mode 100644 > index 6a4c0541..00000000 > --- a/ubuntu_cve2_kernel/control > +++ /dev/null > @@ -1,17 +0,0 @@ > -AUTHOR = 'cascardo@canonical.com (Thadeu Lima de Souza Cascardo)' > -NAME = 'ubuntu_cve2_kernel' > -TIME = 'SHORT' > -TEST_TYPE = 'client' > -TEST_CLASS = 'Kernel' > -TEST_CATEGORY = 'Functional' > -DOC = """ > -List of CVE tests to be tested on as many supported arches and series as possible. > - > -Right now, this includes a single test for these 3 related CVEs: > - > -CVE-2021-27363 > -CVE-2021-27364 > -CVE-2021-27365 > -""" > - > -result = job.run_test_detail('ubuntu_cve2_kernel') > diff --git a/ubuntu_cve2_kernel/ubuntu_cve2_kernel.py b/ubuntu_cve2_kernel/ubuntu_cve2_kernel.py > deleted file mode 100644 > index c933773b..00000000 > --- a/ubuntu_cve2_kernel/ubuntu_cve2_kernel.py > +++ /dev/null > @@ -1,36 +0,0 @@ > -# > -# > -import os > -from autotest.client import test, utils > - > -class ubuntu_cve2_kernel(test.test): > - version = 1 > - > - def install_required_pkgs(self): > - pkgs = [ > - 'gcc', 'sudo', 'make', > - ] > - cmd = 'DEBIAN_FRONTEND=noninteractive sudo apt-get install --yes --force-yes ' + ' '.join(pkgs) > - self.results = utils.system_output(cmd, retain_output=True) > - > - def build_source(self): > - cmd = "make" > - os.chdir(self.bindir) > - self.results = utils.system_output(cmd, retain_output=True) > - > - def initialize(self): > - pass > - > - def setup(self): > - self.install_required_pkgs() > - self.build_source() > - > - def run_once(self): > - > - os.chdir(self.bindir) > - cmd = "make check" > - self.results = utils.system_output(cmd, retain_output=True) > - > - print(self.results) > - > -# vi:set ts=4 sw=4 expandtab syntax=python: > diff --git a/ubuntu_cve_kernel/control b/ubuntu_cve_kernel/control > index b91f23de..cce8aa93 100644 > --- a/ubuntu_cve_kernel/control > +++ b/ubuntu_cve_kernel/control > @@ -22,6 +22,7 @@ CVES = {'CVE-2015-7550': {'arch-blacklist': []}, > 'CVE-2016-3134': {'arch-blacklist': []}, > 'CVE-2016-3135': {'arch-blacklist': []}, > 'CVE-2016-3672': {'arch-blacklist': ['aarch64', 'athlon', 'ppc64le', 'riscv64', 's390x']}, > + 'CVE-2021-2736X':{'arch-blacklist': []}, > } > > result = job.run_test_detail(name, test_name='setup', tag='setup', timeout=60*10) > diff --git a/ubuntu_cve2_kernel/CVE-2021-2736X/CVE-2021-2736X.c b/ubuntu_cve_kernel/cves/CVE-2021-2736X/CVE-2021-2736X.c > similarity index 100% > rename from ubuntu_cve2_kernel/CVE-2021-2736X/CVE-2021-2736X.c > rename to ubuntu_cve_kernel/cves/CVE-2021-2736X/CVE-2021-2736X.c > diff --git a/ubuntu_cve2_kernel/CVE-2021-2736X/Makefile b/ubuntu_cve_kernel/cves/CVE-2021-2736X/Makefile > similarity index 100% > rename from ubuntu_cve2_kernel/CVE-2021-2736X/Makefile > rename to ubuntu_cve_kernel/cves/CVE-2021-2736X/Makefile > diff --git a/ubuntu_cve2_kernel/CVE-2021-2736X/iscsi_if.h b/ubuntu_cve_kernel/cves/CVE-2021-2736X/iscsi_if.h > similarity index 100% > rename from ubuntu_cve2_kernel/CVE-2021-2736X/iscsi_if.h > rename to ubuntu_cve_kernel/cves/CVE-2021-2736X/iscsi_if.h
Applied and pushed. Thanks Sam
diff --git a/ubuntu_cve2_kernel/Makefile b/ubuntu_cve2_kernel/Makefile deleted file mode 100644 index b1b2f314..00000000 --- a/ubuntu_cve2_kernel/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -SUBDIRS = CVE-2021-2736X - -all: - for subdir in $(SUBDIRS); do \ - make -C $$subdir; \ - done - -check: - for subdir in $(SUBDIRS); do \ - make -C $$subdir check; \ - done - -clean: - for subdir in $(SUBDIRS); do \ - make -C $$subdir clean; \ - done diff --git a/ubuntu_cve2_kernel/control b/ubuntu_cve2_kernel/control deleted file mode 100644 index 6a4c0541..00000000 --- a/ubuntu_cve2_kernel/control +++ /dev/null @@ -1,17 +0,0 @@ -AUTHOR = 'cascardo@canonical.com (Thadeu Lima de Souza Cascardo)' -NAME = 'ubuntu_cve2_kernel' -TIME = 'SHORT' -TEST_TYPE = 'client' -TEST_CLASS = 'Kernel' -TEST_CATEGORY = 'Functional' -DOC = """ -List of CVE tests to be tested on as many supported arches and series as possible. - -Right now, this includes a single test for these 3 related CVEs: - -CVE-2021-27363 -CVE-2021-27364 -CVE-2021-27365 -""" - -result = job.run_test_detail('ubuntu_cve2_kernel') diff --git a/ubuntu_cve2_kernel/ubuntu_cve2_kernel.py b/ubuntu_cve2_kernel/ubuntu_cve2_kernel.py deleted file mode 100644 index c933773b..00000000 --- a/ubuntu_cve2_kernel/ubuntu_cve2_kernel.py +++ /dev/null @@ -1,36 +0,0 @@ -# -# -import os -from autotest.client import test, utils - -class ubuntu_cve2_kernel(test.test): - version = 1 - - def install_required_pkgs(self): - pkgs = [ - 'gcc', 'sudo', 'make', - ] - cmd = 'DEBIAN_FRONTEND=noninteractive sudo apt-get install --yes --force-yes ' + ' '.join(pkgs) - self.results = utils.system_output(cmd, retain_output=True) - - def build_source(self): - cmd = "make" - os.chdir(self.bindir) - self.results = utils.system_output(cmd, retain_output=True) - - def initialize(self): - pass - - def setup(self): - self.install_required_pkgs() - self.build_source() - - def run_once(self): - - os.chdir(self.bindir) - cmd = "make check" - self.results = utils.system_output(cmd, retain_output=True) - - print(self.results) - -# vi:set ts=4 sw=4 expandtab syntax=python: diff --git a/ubuntu_cve_kernel/control b/ubuntu_cve_kernel/control index b91f23de..cce8aa93 100644 --- a/ubuntu_cve_kernel/control +++ b/ubuntu_cve_kernel/control @@ -22,6 +22,7 @@ CVES = {'CVE-2015-7550': {'arch-blacklist': []}, 'CVE-2016-3134': {'arch-blacklist': []}, 'CVE-2016-3135': {'arch-blacklist': []}, 'CVE-2016-3672': {'arch-blacklist': ['aarch64', 'athlon', 'ppc64le', 'riscv64', 's390x']}, + 'CVE-2021-2736X':{'arch-blacklist': []}, } result = job.run_test_detail(name, test_name='setup', tag='setup', timeout=60*10) diff --git a/ubuntu_cve2_kernel/CVE-2021-2736X/CVE-2021-2736X.c b/ubuntu_cve_kernel/cves/CVE-2021-2736X/CVE-2021-2736X.c similarity index 100% rename from ubuntu_cve2_kernel/CVE-2021-2736X/CVE-2021-2736X.c rename to ubuntu_cve_kernel/cves/CVE-2021-2736X/CVE-2021-2736X.c diff --git a/ubuntu_cve2_kernel/CVE-2021-2736X/Makefile b/ubuntu_cve_kernel/cves/CVE-2021-2736X/Makefile similarity index 100% rename from ubuntu_cve2_kernel/CVE-2021-2736X/Makefile rename to ubuntu_cve_kernel/cves/CVE-2021-2736X/Makefile diff --git a/ubuntu_cve2_kernel/CVE-2021-2736X/iscsi_if.h b/ubuntu_cve_kernel/cves/CVE-2021-2736X/iscsi_if.h similarity index 100% rename from ubuntu_cve2_kernel/CVE-2021-2736X/iscsi_if.h rename to ubuntu_cve_kernel/cves/CVE-2021-2736X/iscsi_if.h
BugLink: https://bugs.launchpad.net/bugs/1957153 Having these two tests altogether in our repo is a bit confusing, the ubuntu_cve2_kernel was introduced because of the blacklist setting in ubuntu_cve_kernel. Now with the blacklist setting improved, we can merge test from ubuntu_cve2_kernel into ubuntu_cve_kernel. This can make it less confusing and save us some deployment time. Patch tested with: * Impish 5.13 AMD64 * Focal 5.4 PowerPC * Bionic 4.15 ARM64 * Tusty 3.13 AMD64 We can adjust our test plan in CKCT after this change. Signed-off-by: Po-Hsu Lin <po-hsu.lin@canonical.com> --- ubuntu_cve2_kernel/Makefile | 16 --------- ubuntu_cve2_kernel/control | 17 --------- ubuntu_cve2_kernel/ubuntu_cve2_kernel.py | 36 ------------------- ubuntu_cve_kernel/control | 1 + .../cves}/CVE-2021-2736X/CVE-2021-2736X.c | 0 .../cves}/CVE-2021-2736X/Makefile | 0 .../cves}/CVE-2021-2736X/iscsi_if.h | 0 7 files changed, 1 insertion(+), 69 deletions(-) delete mode 100644 ubuntu_cve2_kernel/Makefile delete mode 100644 ubuntu_cve2_kernel/control delete mode 100644 ubuntu_cve2_kernel/ubuntu_cve2_kernel.py rename {ubuntu_cve2_kernel => ubuntu_cve_kernel/cves}/CVE-2021-2736X/CVE-2021-2736X.c (100%) rename {ubuntu_cve2_kernel => ubuntu_cve_kernel/cves}/CVE-2021-2736X/Makefile (100%) rename {ubuntu_cve2_kernel => ubuntu_cve_kernel/cves}/CVE-2021-2736X/iscsi_if.h (100%)