diff --git a/docker/fc34/basic-setup.sh b/docker/fc34/basic-setup.sh index b7c5d56..bba9b25 100755 --- a/docker/fc34/basic-setup.sh +++ b/docker/fc34/basic-setup.sh @@ -69,4 +69,5 @@ cat < /etc/sysctl.d/hugepages.conf vm.nr_hugepages=2 EOF -rpm -U /opt/rpms/*.rpm +#rpm -U /opt/rpms/*.rpm +rpm -U --force /opt/rpms/*.rpm diff --git a/docker/fc34/kvm.Dockerfile b/docker/fc34/kvm.Dockerfile index d67c77a..a08fab0 100644 --- a/docker/fc34/kvm.Dockerfile +++ b/docker/fc34/kvm.Dockerfile @@ -61,6 +61,14 @@ RUN \ unzip \ valgrind \ wget \ + autoconf \ + automake \ + libtool \ + g++ \ + vim \ + iperf \ + crash \ + zstd \ && dnf clean dbcache packages COPY --from=rpms /opt/rpms /opt/rpms @@ -69,4 +77,6 @@ ADD sshd_config ssh_host_rsa_key /etc/ssh/ ADD basic-setup.sh kvm-setup.sh /root/ -RUN /root/basic-setup.sh && /root/kvm-setup.sh +RUN /root/basic-setup.sh + +RUN /root/kvm-setup.sh diff --git a/docker/fc34/support-simx.sh b/docker/fc34/support-simx.sh index 25e7254..a6d59d5 100644 --- a/docker/fc34/support-simx.sh +++ b/docker/fc34/support-simx.sh @@ -1,7 +1,7 @@ #!/bin/bash # --- -# git_url: http://l-gerrit.mtl.labs.mlnx:8080/simx -# git_commit: 41f602dc05b3c115b176ac3f7869e8bd390cbd92 +# git_url: /global/home/users/ztiffany/test/simx +# git_commit: 3f3c2c9338f3bbb73cf3bd298152e020e394086f cat < mlx-simx.spec %global debug_package %{nil} @@ -18,7 +18,7 @@ From simx.git %build ./mlnx_infra/config.status.mlnx --target=x86 --prefix=/opt/simx make %{?_smp_mflags} -make %{?_smp_mflags} -C mellanox/ +make %{?_smp_mflags} -C mellanox/ SIMX_PROJECT=mlx5 #%install make DESTDIR=%{buildroot} install diff --git a/docker/fc34/support-smatch.sh b/docker/fc34/support-smatch.sh index e7da706..bbe397d 100644 --- a/docker/fc34/support-smatch.sh +++ b/docker/fc34/support-smatch.sh @@ -1,7 +1,7 @@ #!/bin/bash # --- -# git_url: git://repo.or.cz/smatch.git -# git_commit: 9bb66fa2d7c73b3338a27fd6b38d7d509b2a1c1b +# git_url: /global/home/users/artemp/scratch/.cache/mellanox/mkt/smatch.git +# git_commit: 72c21a144a812cadbe349801da1b24bc331af256 cat < smatch.spec Name: smatch diff --git a/docker/fc34/support-sparse.sh b/docker/fc34/support-sparse.sh index 68fa129..4eba456 100644 --- a/docker/fc34/support-sparse.sh +++ b/docker/fc34/support-sparse.sh @@ -1,7 +1,7 @@ #!/bin/bash # --- -# git_url: git://git.kernel.org/pub/scm/devel/sparse/sparse.git -# git_commit: 8af2432923486c753ab52cae70b94ee684121080 +# git_url: /global/home/users/artemp/scratch/.cache/mellanox/mkt/sparse.git +# git_commit: 49c98aa3ed1b315ed2f4fbe44271ecd5bdd9cbc7 cat < sparse.spec Name: sparse diff --git a/docker/fc34/support.Dockerfile b/docker/fc34/support.Dockerfile index aa8e4e3..a9de941 100644 --- a/docker/fc34/support.Dockerfile +++ b/docker/fc34/support.Dockerfile @@ -59,4 +59,7 @@ RUN dnf install -y \ uuid-devel \ valgrind-devel \ zlib-devel \ + autoconf \ + automake \ + libtool \ && dnf clean dbcache packages diff --git a/plugins/do-build.py b/plugins/do-build.py index 069c32e..79b4836 100644 --- a/plugins/do-build.py +++ b/plugins/do-build.py @@ -42,6 +42,12 @@ def make_simx(args): subprocess.call(cmd + ['-j%d' %(args.num_jobs)]) +def make_rdmo_app(args): + if args.clean: + subprocess.check_output(['rm', '-rf', 'build']) + return + subprocess.call(['./build.sh']) + def switch_to_user(args): with open("/etc/passwd","a") as F: F.write(args.passwd + "\n"); @@ -79,9 +85,13 @@ def setup_from_pickle(args, pickle_params): subprocess.check_output(['make', 'headers_install', 'INSTALL_HDR_PATH=/usr'], cwd=args.kernel) +if not os.path.isdir('/images/ztiffany/ccache'): + subprocess.check_output(['mkdir', '/images/ztiffany/ccache']) + subprocess.check_output(['chmod', '0777', '/images/ztiffany/ccache']) + switch_to_user(args) -if os.path.isdir('/ccache'): - os.environ['CCACHE_DIR'] = '/ccache' +if os.path.isdir('/images/ztiffany/ccache'): + os.environ['CCACHE_DIR'] = '/images/ztiffany/ccache' if args.shell: os.execvp('/bin/bash', ['/bin/bash']) @@ -97,3 +107,5 @@ def setup_from_pickle(args, pickle_params): make_rdma_core(args) if args.project == "simx": make_simx(args) +if args.project == "rdmo-app": + make_rdmo_app(args) diff --git a/plugins/do-kvm.py b/plugins/do-kvm.py index 6b4c306..2dbcb76 100644 --- a/plugins/do-kvm.py +++ b/plugins/do-kvm.py @@ -64,11 +64,17 @@ def remove_mounts(): def is_passable_mount(v): + print ("Checking mount: {}".format(v)) if v[2] == "nfs" or v[2] == "nfs4": + return False + if v[1].startswith("/images/"): + print ("YES!!!") + return True + if v[1].startswith("/plugins"): + print ("YES!!!") return True if not v[0].startswith("/"): - return False - if v[1] == "/lab_tools": + print ("NOT START WITH") return False return True @@ -106,8 +112,10 @@ def setup_fs(): # Copy over local bind mounts, eg from docker -v cnt = 0 for dfn, v in get_mtab().items(): + print ("Evaluating: {}".format(v[1])); if not is_passable_mount(v): continue + print ("Passing: {}".format(v[1])); qemu_args["-fsdev"].add( "local,id=host_bind_fs%u,security_model=passthrough,path=%s" % diff --git a/utils/build.py b/utils/build.py index c4a15bb..73eacbe 100644 --- a/utils/build.py +++ b/utils/build.py @@ -67,6 +67,7 @@ def run_ci_cmd(self, supos): "rdma": "iproute2", "kernel": "kernel", "mlnx_infra": "simx", + "rdmo-app": "rdmo-app", } def build_list(): @@ -78,6 +79,7 @@ def set_args_project(args, section): # "custom" project can't be sensed and must be provided explicitly for key, value in project_marks.items(): + print("comparing {} and {}".format(key, args.project)) if os.path.isdir(key): args.project = value diff --git a/utils/cmdline.py b/utils/cmdline.py index 87cb203..b30b438 100644 --- a/utils/cmdline.py +++ b/utils/cmdline.py @@ -27,7 +27,7 @@ def get_cache_fn(fn): an impact on the operation of mkt - at worst it will run slower.""" global cache_dir if cache_dir is None: - cache_dir = os.path.expanduser("~/.cache/mellanox/mkt/") + cache_dir = '/images/ztiffany/.cache/mellanox/mkt/' # In MTL network, user home directories are located on /labhome # and doesn't have enough space to build cache efficiently. # Do nasty hack and replace labhome with swgwork