Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:9756] Fix permission of /tmp to unblock copp test #10004

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions tests/copp/copp_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,10 +221,11 @@ def _install_nano(dut, creds, syncd_docker_name):
http_proxy = creds.get('proxy_env', {}).get('http_proxy', '')
https_proxy = creds.get('proxy_env', {}).get('https_proxy', '')
check_cmd = "docker exec -i {} bash -c 'cat /etc/os-release'".format(syncd_docker_name)

# Change the permission of /tmp to 777 to workaround issue #16034
if "bullseye" in dut.shell(check_cmd)['stdout'].lower():
cmd = '''docker exec -e http_proxy={} -e https_proxy={} {} bash -c " \
rm -rf /var/lib/apt/lists/* \
chmod 777 /tmp \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get update \
&& apt-get install -y python3-pip build-essential libssl-dev libffi-dev \
python3-dev python-setuptools wget cmake python-is-python3 \
Expand All @@ -239,7 +240,8 @@ def _install_nano(dut, creds, syncd_docker_name):
" '''.format(http_proxy, https_proxy, syncd_docker_name)
else:
cmd = '''docker exec -e http_proxy={} -e https_proxy={} {} bash -c " \
rm -rf /var/lib/apt/lists/* \
chmod 777 /tmp \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get update \
&& apt-get install -y python-pip build-essential libssl-dev libffi-dev \
python-dev python-setuptools wget cmake \
Expand Down
Loading