Skip to content

Testing Issue 8649 2 #1

Testing Issue 8649 2

Testing Issue 8649 2 #1

Workflow file for this run

name: Testing Issue 8649 2
on:
workflow_dispatch:
jobs:
test-macos:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ 'macos-12', 'macos-13', 'macos-14']
try: ['0', '1', '2']
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Python
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: python.socket (before)
shell: python
run: |
print(
'Linux: Expecting gethostname to return the same as "hostname"'
' and the other interfaces to return the same as "hostname -f"'
'\n\n'
'Mac OS: Expect *ipv6.arpa addresses due to a longstanding'
' Python bug\n\n'
)
import socket
for expr in (
'socket.gethostname()',
'socket.getfqdn()',
'socket.getfqdn(socket.gethostname())',
'socket.getfqdn(socket.getfqdn())',
'socket.gethostbyname_ex(socket.gethostname())[0]',
'socket.gethostbyname_ex(socket.getfqdn())[0]'
):
try:
result = eval(expr)
except Exception as exc:
result = str(exc)
print(f'{expr:50}: {result}')
- name: Get value of /etc/hosts
run: |
sudo cat /etc/hosts