aboutsummaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
authorjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2021-08-26 10:02:19 -0700
committerGitHub <noreply@github.com>2021-08-26 10:02:19 -0700
commitb30e4f47278150175f1d1073adf674bc96bb3a9a (patch)
treeb53638d35c94e39a2b2377a91a48549a251460d7 /infra
parent03d18372d5712c786126378277e58c51e3d09e87 (diff)
downloadoss-fuzz-b30e4f47278150175f1d1073adf674bc96bb3a9a.tar.gz
[cifuzz] Handle upgrade to Ubuntu 20.04 (#6249)
Handle upgrade to Ubuntu 20.04 1. Don't do any special handling for MSAN anymore. It isn't needed. 2. Don't do any special handling for msan-libs-builder it doesn't exist anymore. Related: https://github.com/google/oss-fuzz/issues/6180
Diffstat (limited to 'infra')
-rw-r--r--infra/cifuzz/build_fuzzers.py32
-rw-r--r--infra/cifuzz/build_fuzzers_test.py11
-rw-r--r--infra/cifuzz/docker.py1
-rw-r--r--infra/cifuzz/run_fuzzers_entrypoint.py1
4 files changed, 0 insertions, 45 deletions
diff --git a/infra/cifuzz/build_fuzzers.py b/infra/cifuzz/build_fuzzers.py
index 94478fdc2..3d6c2eb13 100644
--- a/infra/cifuzz/build_fuzzers.py
+++ b/infra/cifuzz/build_fuzzers.py
@@ -85,11 +85,6 @@ class Builder: # pylint: disable=too-many-instance-attributes
docker_args.extend(
_get_docker_build_fuzzers_args_not_container(self.host_repo_path))
- if self.config.sanitizer == 'memory':
- docker_args.extend(
- _get_docker_build_fuzzers_args_msan(self.workspace.work))
- self.handle_msan_prebuild(docker_container)
-
docker_args.extend([
docker.get_project_image_name(self.config.oss_fuzz_project_name),
'/bin/bash',
@@ -107,8 +102,6 @@ class Builder: # pylint: disable=too-many-instance-attributes
logging.error('Building fuzzers failed.')
return False
- if self.config.sanitizer == 'memory':
- self.handle_msan_postbuild(docker_container)
return True
def upload_build(self):
@@ -119,23 +112,6 @@ class Builder: # pylint: disable=too-many-instance-attributes
return True
- def handle_msan_postbuild(self, container):
- """Post-build step for MSAN builds. Patches the build to use MSAN
- libraries."""
- helper.docker_run([
- '--volumes-from', container, '-e', f'WORK={self.workspace.work}',
- docker.MSAN_LIBS_BUILDER_TAG, 'patch_build.py', '/out'
- ])
-
- def handle_msan_prebuild(self, container):
- """Pre-build step for MSAN builds. Copies MSAN libs to |msan_libs_dir| and
- returns docker arguments to use that directory for MSAN libs."""
- logging.info('Copying MSAN libs.')
- helper.docker_run([
- '--volumes-from', container, docker.MSAN_LIBS_BUILDER_TAG, 'bash', '-c',
- f'cp -r /msan {self.workspace.work}'
- ])
-
def build(self):
"""Builds the image, checkouts the source (if needed), builds the fuzzers
and then removes the unaffectted fuzzers. Returns True on success."""
@@ -226,11 +202,3 @@ def _get_docker_build_fuzzers_args_not_container(host_repo_path):
|host_repo_path| when the host of the OSS-Fuzz builder container is not
another container."""
return ['-v', f'{host_repo_path}:{host_repo_path}']
-
-
-def _get_docker_build_fuzzers_args_msan(work_dir):
- """Returns arguments to the docker build command that are needed to use
- MSAN."""
- # TODO(metzman): MSAN is broken, fix.
- msan_libs_path = os.path.join(work_dir, 'msan')
- return ['-e', f'MSAN_LIBS_PATH={msan_libs_path}']
diff --git a/infra/cifuzz/build_fuzzers_test.py b/infra/cifuzz/build_fuzzers_test.py
index 19ac22c4a..4e0004a7f 100644
--- a/infra/cifuzz/build_fuzzers_test.py
+++ b/infra/cifuzz/build_fuzzers_test.py
@@ -369,16 +369,5 @@ class GetDockerBuildFuzzersArgsNotContainerTest(unittest.TestCase):
self.assertEqual(result, expected_result)
-class GetDockerBuildFuzzersArgsMsanTest(unittest.TestCase):
- """Tests that _get_docker_build_fuzzers_args_msan works as intended."""
-
- def test_get_docker_build_fuzzers_args_msan(self):
- """Tests that _get_docker_build_fuzzers_args_msan works as intended."""
- work_dir = '/work_dir'
- result = build_fuzzers._get_docker_build_fuzzers_args_msan(work_dir)
- expected_result = ['-e', 'MSAN_LIBS_PATH=/work_dir/msan']
- self.assertEqual(result, expected_result)
-
-
if __name__ == '__main__':
unittest.main()
diff --git a/infra/cifuzz/docker.py b/infra/cifuzz/docker.py
index d0bad5d05..a4227b651 100644
--- a/infra/cifuzz/docker.py
+++ b/infra/cifuzz/docker.py
@@ -23,7 +23,6 @@ import constants
import utils
BASE_BUILDER_TAG = 'gcr.io/oss-fuzz-base/base-builder'
-MSAN_LIBS_BUILDER_TAG = 'gcr.io/oss-fuzz-base/msan-libs-builder'
PROJECT_TAG_PREFIX = 'gcr.io/oss-fuzz/'
# Default fuzz configuration.
diff --git a/infra/cifuzz/run_fuzzers_entrypoint.py b/infra/cifuzz/run_fuzzers_entrypoint.py
index f8f6c417d..c1167f045 100644
--- a/infra/cifuzz/run_fuzzers_entrypoint.py
+++ b/infra/cifuzz/run_fuzzers_entrypoint.py
@@ -36,7 +36,6 @@ def delete_unneeded_docker_images(config):
project_image = docker.get_project_image_name(config.oss_fuzz_project_name)
images = [
project_image,
- docker.MSAN_LIBS_BUILDER_TAG,
]
docker.delete_images(images)