Skip to content

Commit

Permalink
Test bigendian interop.
Browse files Browse the repository at this point in the history
Where our test target is a bigendian system, do an additional build on
the runner host (which is little endian) and test interop between the two.
Should hopefully catch obvious endianness bugs.
  • Loading branch information
daztucker committed Nov 8, 2024
1 parent dd416f5 commit 9e528e6
Showing 1 changed file with 52 additions and 1 deletion.
53 changes: 52 additions & 1 deletion .github/workflows/selfhosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
REMOTE: ${{ startsWith(matrix.host, 'remote') }}
VM: ${{ startsWith(matrix.host, 'libvirt') || startsWith(matrix.host, 'persist') }}
SSHFS: ${{ startsWith(matrix.host, 'libvirt') || startsWith(matrix.host, 'persist') || startsWith(matrix.host, 'remote') }}
BIGENDIAN: ${{ matrix.target == 'aix51' || matrix.target == 'fbsd14-ppc64' || matrix.target == 'openwrt-mips' }}
strategy:
fail-fast: false
# We use a matrix in two parts: firstly all of the VMs are tested with the
Expand Down Expand Up @@ -62,6 +63,7 @@ jobs:
include:
# Long-running/slow tests have access to high priority runners.
- { target: aix51, config: default, host: libvirt-hipri }
- { target: fbsd14-ppc64, config: default, host: libvirt-hipri }
- { target: openindiana, config: pam, host: libvirt-hipri }
- { target: sol10, config: default, host: libvirt-hipri }
- { target: sol10, config: pam, host: libvirt-hipri }
Expand Down Expand Up @@ -96,7 +98,6 @@ jobs:
- { target: ARM64, config: pam, host: ARM64 }
# Physical hosts with remote runners.
- { target: debian-riscv64, config: default, host: remote-debian-riscv64 }

- { target: openwrt-mips, config: default, host: remote-openwrt-mips }
- { target: openwrt-mipsel, config: default, host: remote-openwrt-mipsel }
steps:
Expand Down Expand Up @@ -147,6 +148,56 @@ jobs:
if: always() && env.SSHFS == 'true'
run: fusermount -u ${GITHUB_WORKSPACE} || true
working-directory: ${{ runner.temp }}

- name: bigendian interop - mount regress
if: env.SSHFS == 'true' && env.BIGENDIAN == 'true'
run: |
set -x
vmrun sudo chown -R $LOGNAME ~/$(basename ${GITHUB_WORKSPACE})
vmrun "cd $(basename ${GITHUB_WORKSPACE}/regress) && sudo make clean"
sshfs_mount regress
vmrun "sudo mkdir -p $(dirname ${GITHUB_WORKSPACE})"
vmrun "sudo ln -s ~/$(basename ${GITHUB_WORKSPACE}) ${GITHUB_WORKSPACE}"
working-directory: ${{ runner.temp }}

- name: bigendian interop - host build
if: env.SSHFS == 'true' && env.BIGENDIAN == 'true'
run: |
set -x
./.github/configure.sh ${{ matrix.config }}
pwd
ls -ld regress || true
ls -l regress/check-perm || true
make clean
make
- name: bigendian interop - test
if: env.SSHFS == 'true' && env.BIGENDIAN == 'true'
env:
TEST_SSH_UNSAFE_PERMISSIONS: 1
run: |
set -x
echo "#!/bin/sh" >remote_sshd
echo "exec /usr/bin/ssh ${TARGET_DOMAIN} exec /home/builder/$(basename ${GITHUB_WORKSPACE})/sshd "'$@' >>remote_sshd
chmod 755 remote_sshd
make t-exec TEST_SSH_SSHD=`pwd`/remote_sshd LTESTS="try-ciphers kextype"
- name: bigendian interop - save logs
if: failure() && env.BIGENDIAN == 'true'
uses: actions/upload-artifact@main
with:
name: ${{ matrix.target }}-${{ matrix.config }}-interop-logs
path: |
config.h
config.log
regress/*.log
regress/log/*
- name: bigendian interop - unmount regress
if: always() && env.SSHFS == 'true' && env.BIGENDIAN == 'true'
run: fusermount -u ${GITHUB_WORKSPACE}/regress || true
working-directory: ${{ runner.temp }}

- name: shutdown VM
if: always() && env.VM == 'true'
run: vmshutdown

0 comments on commit 9e528e6

Please sign in to comment.