diff --git a/.github/workflows/ci-pipeline.yml b/.github/workflows/ci-pipeline.yml index 6161fc1c..99bd9130 100644 --- a/.github/workflows/ci-pipeline.yml +++ b/.github/workflows/ci-pipeline.yml @@ -78,6 +78,7 @@ jobs: projects: ${{ matrix.project }} build: true # we need to build due to xUnitv3 restore: true # we need to restore since we disabled caching + verbosity-level: diagnostic test_windows: name: call-test-windows @@ -96,6 +97,7 @@ jobs: test-arguments: -- RunConfiguration.DisableAppDomain=true build: true # we need to build for .net48 restore: true # apparently we need to restore for .net48 + verbosity-level: diagnostic integration_test: name: ⚗️ Integration Test @@ -133,13 +135,92 @@ jobs: - name: Fix Linux test apphost permissions run: | - echo "Ensuring xUnit v3 test apphosts are executable on Linux..." - echo "Configuration: ${{ matrix.configuration }}" - # Dump a bit of info for debugging - find . -path "*/bin/${{ matrix.configuration }}/net*/*" -maxdepth 1 -type f -name "*Tests*" -print || true - # Actually fix permissions - find . -path "*/bin/${{ matrix.configuration }}/net*/*" -type f -name "*Tests*" -exec chmod +x {} + - echo "Permissions fixed." + set -euo pipefail + + echo "=== Context ===" + echo "Runner: $RUNNER_OS / $RUNNER_ARCH" + echo "Configuration: ${{ inputs.configuration }}" + echo "Workspace: $GITHUB_WORKSPACE" + echo "PWD: $(pwd)" + echo "Event: $GITHUB_EVENT_NAME" + echo "Ref: $GITHUB_REF" + echo "SHA: $GITHUB_SHA" + echo + + echo "=== .NET info ===" + dotnet --info || true + echo + + echo "=== Git state ===" + git rev-parse HEAD || true + git status --porcelain || true + git rev-parse --is-shallow-repository || true + echo + + # Paths we care about + BIN_GLOB="*/bin/${{ inputs.configuration }}/net*/*" + OBJ_GLOB="*/obj/${{ inputs.configuration }}/net*/*" + + echo "=== Brute-force chmod (bin + obj) ===" + find . -type f \( -path "$BIN_GLOB" -o -path "$OBJ_GLOB" \) -exec chmod a+x {} + 2>/dev/null || true + echo "chmod completed (errors ignored)." + echo + + echo "=== Mount options (look for noexec) ===" + # If binaries live on a noexec mount, chmod won't help. + mount | sed -n '1,200p' || true + echo + + echo "=== Candidate executables (top 200) ===" + # Show what we might execute; exclude obvious managed files + find . -type f -path "$BIN_GLOB" \ + ! -name "*.dll" ! -name "*.pdb" ! -name "*.json" ! -name "*.xml" \ + -printf "%m %u:%g %s %p\n" | head -n 200 || true + echo + + echo "=== Likely xUnit / test hosts (if present) ===" + # These names vary; do not rely on just *Tests* + find . -type f -path "$BIN_GLOB" \( \ + -name "testhost*" -o \ + -name "*xunit*" -o \ + -name "*Tests*" -o \ + -name "*.runsettings" \ + \) -printf "%m %u:%g %s %p\n" | head -n 200 || true + echo + + echo "=== Deep diagnostics for any 'testhost' or apphost candidates ===" + # For each likely executable, show the facts that explain 'permission denied' vs 'exec format error' + while IFS= read -r f; do + echo "--- $f ---" + ls -la "$f" || true + + # Identify file type and architecture + file -L "$f" || true + + # If it's an ELF binary, show its dynamic interpreter and linked libs (exec format errors often show up here) + if file -L "$f" | grep -q "ELF"; then + echo "readelf -l (interpreter):" + readelf -l "$f" 2>/dev/null | sed -n '1,80p' || true + echo "ldd (dependencies):" + ldd "$f" 2>/dev/null || true + fi + + # If it's a script, CRLF in the shebang can cause 'Exec format error' + if head -c 2 "$f" 2>/dev/null | grep -q "#!"; then + echo "shebang:" + head -n 1 "$f" | cat -A || true + fi + + echo + done < <( + find . -type f -path "$BIN_GLOB" \( \ + -name "testhost*" -o \ + -name "*xunit*" -o \ + -name "*Tests*" \ + \) | head -n 50 + ) || true + + echo "=== Done diagnostics step ===" shell: bash - name: Test with ${{ matrix.configuration }} build