]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
Test bigendian interop.
authorDarren Tucker <dtucker@dtucker.net>
Sat, 2 Nov 2024 07:05:41 +0000 (18:05 +1100)
committerDarren Tucker <dtucker@dtucker.net>
Fri, 8 Nov 2024 05:27:05 +0000 (16:27 +1100)
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.

.github/workflows/selfhosted.yml

index 0a66f9b142a8cf75c5396e8efd4c05619fa63f96..50606af5dd475fe26c11d0c3ae0358638efe45a3 100644 (file)
@@ -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
@@ -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 }
@@ -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:
@@ -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