From 639485d7620f333c362e310f9af358287f12a433 Mon Sep 17 00:00:00 2001 From: wfurt Date: Mon, 28 Feb 2022 17:08:00 -0800 Subject: [PATCH 01/12] attemp to fix up EnterpriseTests --- .../EnterpriseTests/setup/linuxclient/test-webserver.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh index 2afd01f34335cf..c57b165d1ec0ec 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh @@ -4,3 +4,10 @@ kdestroy echo password | kinit user1 curl --verbose --negotiate -u: http://apacheweb.linux.contoso.com kdestroy + +nslookup github.com +if [ $? -ne 0 ]; then + # try to fix-up DNS adding public server + echo nameserver 8.8.8.8 >> /etc/resolv.conf +fi +nslookup github.com From 9f6f6590bc97427361b8bda0c522bf2a0b7aded7 Mon Sep 17 00:00:00 2001 From: wfurt Date: Mon, 28 Feb 2022 17:09:29 -0800 Subject: [PATCH 02/12] fix text --- .../Net/EnterpriseTests/setup/linuxclient/test-webserver.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh index c57b165d1ec0ec..daa6b2152b2121 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh @@ -7,7 +7,7 @@ kdestroy nslookup github.com if [ $? -ne 0 ]; then - # try to fix-up DNS adding public server + # try to fix-up DNS by adding public server echo nameserver 8.8.8.8 >> /etc/resolv.conf fi nslookup github.com From d6fb959e30d0def9cedd594c371a2c73965be60a Mon Sep 17 00:00:00 2001 From: wfurt Date: Mon, 28 Feb 2022 18:28:28 -0800 Subject: [PATCH 03/12] increase timoeout on build step --- eng/pipelines/libraries/enterprise/linux.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index fdf003536a6116..82aa667cfb3880 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -1,6 +1,7 @@ # Disable pipeline for ordinary pushes to the branches trigger: none +timeoutInMinutes: 180 # To reduce load on the pipeline, enable it only for PRs that affect critical networking code pr: @@ -55,6 +56,7 @@ steps: - bash: | docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci /p:NativeOptimizationDataSupported=false' displayName: Build product sources + timeoutInMinutes: 180 - bash: | docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj From 41f4b0cf27832244ee52a23c2d8ff86b699ce328 Mon Sep 17 00:00:00 2001 From: wfurt Date: Mon, 28 Feb 2022 22:29:00 -0800 Subject: [PATCH 04/12] fix temeout --- eng/pipelines/libraries/enterprise/linux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index 82aa667cfb3880..747924bdd346e6 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -1,7 +1,6 @@ # Disable pipeline for ordinary pushes to the branches trigger: none -timeoutInMinutes: 180 # To reduce load on the pipeline, enable it only for PRs that affect critical networking code pr: From 7dcec6ed39651e07f4269b25b3d1a578cd3d4ff7 Mon Sep 17 00:00:00 2001 From: wfurt Date: Wed, 2 Mar 2022 15:01:02 -0800 Subject: [PATCH 05/12] add jobs --- eng/pipelines/libraries/enterprise/linux.yml | 58 ++++++++++---------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index 747924bdd346e6..9dc905c9d9c0e0 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -20,10 +20,6 @@ pr: - src/libraries/System.Net.Http/* - src/libraries/System.Net.Security/* -pool: - name: NetCore1ESPool-Public - demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open - variables: - template: ../variables.yml - name: enterpriseTestsSetup @@ -33,34 +29,40 @@ variables: - name: containerLibrariesRoot value: /repo/src/libraries -steps: -- bash: | - cd $(enterpriseTestsSetup) - docker-compose build - displayName: Build test machine images - env: - DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) +jobs: +- job: Enterprise Linux tests + timeoutInMinutes: 180 + pool: + name: NetCore1ESPool-Public + demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open + steps: + - bash: | + cd $(enterpriseTestsSetup) + docker-compose build + displayName: Build test machine images + env: + DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) -- bash: | - cd $(enterpriseTestsSetup) - docker-compose up -d - displayName: Start test network and machines - env: - DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) + - bash: | + cd $(enterpriseTestsSetup) + docker-compose up -d + displayName: Start test network and machines + env: + DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) -- bash: | - docker exec linuxclient bash /setup/test-webserver.sh - displayName: Test linuxclient connection to web server + - bash: | + docker exec linuxclient bash /setup/test-webserver.sh + displayName: Test linuxclient connection to web server -- bash: | - docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci /p:NativeOptimizationDataSupported=false' - displayName: Build product sources - timeoutInMinutes: 180 + - bash: | + docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci /p:NativeOptimizationDataSupported=false' + displayName: Build product sources + timeoutInMinutes: 120 -- bash: | - docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj - docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj - displayName: Build and run tests + - bash: | + docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj + docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj + displayName: Build and run tests - bash: | cd $(enterpriseTestsSetup) From bc5234187688599096b19aaec887e08577ace176 Mon Sep 17 00:00:00 2001 From: wfurt Date: Wed, 2 Mar 2022 15:04:14 -0800 Subject: [PATCH 06/12] update job --- eng/pipelines/libraries/enterprise/linux.yml | 26 ++++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index 9dc905c9d9c0e0..48ab5523b280cb 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -64,17 +64,17 @@ jobs: docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj displayName: Build and run tests -- bash: | - cd $(enterpriseTestsSetup) - docker-compose down - displayName: Stop test network and machines - env: - DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) + - bash: | + cd $(enterpriseTestsSetup) + docker-compose down + displayName: Stop test network and machines + env: + DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) -- task: PublishTestResults@2 - inputs: - testRunner: 'xUnit' - testResultsFiles: '**/testResults.xml' - testRunTitle: 'Enterprise Tests' - mergeTestResults: true - failTaskOnFailedTests: true + - task: PublishTestResults@2 + inputs: + testRunner: 'xUnit' + testResultsFiles: '**/testResults.xml' + testRunTitle: 'Enterprise Tests' + mergeTestResults: true + failTaskOnFailedTests: true From 49857414e7abe0e65dfa7fa3c895371d66edaba7 Mon Sep 17 00:00:00 2001 From: wfurt Date: Wed, 2 Mar 2022 15:09:59 -0800 Subject: [PATCH 07/12] fix formating --- eng/pipelines/libraries/enterprise/linux.yml | 66 ++++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index 48ab5523b280cb..5608d551805069 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -36,45 +36,45 @@ jobs: name: NetCore1ESPool-Public demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open steps: - - bash: | - cd $(enterpriseTestsSetup) - docker-compose build - displayName: Build test machine images - env: - DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) + - bash: | + cd $(enterpriseTestsSetup) + docker-compose build + displayName: Build test machine images + env: + DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) - - bash: | - cd $(enterpriseTestsSetup) - docker-compose up -d - displayName: Start test network and machines - env: - DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) + - bash: | + cd $(enterpriseTestsSetup) + docker-compose up -d + displayName: Start test network and machines + env: + DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) - - bash: | - docker exec linuxclient bash /setup/test-webserver.sh - displayName: Test linuxclient connection to web server + - bash: | + docker exec linuxclient bash /setup/test-webserver.sh + displayName: Test linuxclient connection to web server - - bash: | - docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci /p:NativeOptimizationDataSupported=false' - displayName: Build product sources - timeoutInMinutes: 120 + - bash: | + docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci /p:NativeOptimizationDataSupported=false' + displayName: Build product sources + timeoutInMinutes: 120 - - bash: | - docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj - docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj - displayName: Build and run tests + - bash: | + docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj + docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj + displayName: Build and run tests - - bash: | - cd $(enterpriseTestsSetup) - docker-compose down + - bash: | + cd $(enterpriseTestsSetup) + docker-compose down displayName: Stop test network and machines env: DOTNET_RUNTIME_REPO_ROOT: $(Build.SourcesDirectory) - - task: PublishTestResults@2 - inputs: - testRunner: 'xUnit' - testResultsFiles: '**/testResults.xml' - testRunTitle: 'Enterprise Tests' - mergeTestResults: true - failTaskOnFailedTests: true + - task: PublishTestResults@2 + inputs: + testRunner: 'xUnit' + testResultsFiles: '**/testResults.xml' + testRunTitle: 'Enterprise Tests' + mergeTestResults: true + failTaskOnFailedTests: true From c98e4a4d5ee63d2467051a1475b677cb17d28e6c Mon Sep 17 00:00:00 2001 From: wfurt Date: Wed, 2 Mar 2022 15:12:35 -0800 Subject: [PATCH 08/12] fix name --- eng/pipelines/libraries/enterprise/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index 5608d551805069..5afb28d49f500d 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -30,7 +30,7 @@ variables: value: /repo/src/libraries jobs: -- job: Enterprise Linux tests +- job: EnterpriseLinuxTests timeoutInMinutes: 180 pool: name: NetCore1ESPool-Public From 42a31662639e478429b2b035341becb048c0b49b Mon Sep 17 00:00:00 2001 From: wfurt Date: Wed, 2 Mar 2022 19:16:48 -0800 Subject: [PATCH 09/12] update server check --- .../Net/EnterpriseTests/setup/linuxclient/test-webserver.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh index daa6b2152b2121..7eb4ea7312bbd5 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh @@ -9,5 +9,8 @@ nslookup github.com if [ $? -ne 0 ]; then # try to fix-up DNS by adding public server echo nameserver 8.8.8.8 >> /etc/resolv.conf + + nslookup github.com + curl --verbose http://apacheweb.linux.contoso.com fi -nslookup github.com + From f825262b8ab8c4f3d3794b748cb6b80dd7065efa Mon Sep 17 00:00:00 2001 From: wfurt Date: Wed, 2 Mar 2022 20:51:10 -0800 Subject: [PATCH 10/12] restore original resolver before tests --- eng/pipelines/libraries/enterprise/linux.yml | 6 ++++-- .../Net/EnterpriseTests/setup/linuxclient/test-webserver.sh | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index 5afb28d49f500d..e00ffc8b9ae478 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -31,7 +31,7 @@ variables: jobs: - job: EnterpriseLinuxTests - timeoutInMinutes: 180 + timeoutInMinutes: 120 pool: name: NetCore1ESPool-Public demands: ImageOverride -equals Build.Ubuntu.1804.Amd64.Open @@ -56,10 +56,12 @@ jobs: - bash: | docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci /p:NativeOptimizationDataSupported=false' + docker exec linuxclient bash -c '/repo/dotnet.sh build $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj' + docker exec linuxclient bash -c '/repo/dotnet.sh build $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj' displayName: Build product sources - timeoutInMinutes: 120 - bash: | + docker exec linuxclient bash -c 'if [ -f /erc/resolv.conf.ORI ]; then cp -f /erc/resolv.conf.ORI /etc/resolv.conf; fi' docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj docker exec linuxclient $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj displayName: Build and run tests diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh index 7eb4ea7312bbd5..8d4f8586be8fc7 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh @@ -7,6 +7,7 @@ kdestroy nslookup github.com if [ $? -ne 0 ]; then + cp /etc/resolv.conf /etc/resolv.conf.ORI # try to fix-up DNS by adding public server echo nameserver 8.8.8.8 >> /etc/resolv.conf From 96e82b56271465cc084ae615488200b50cb2a048 Mon Sep 17 00:00:00 2001 From: wfurt Date: Thu, 3 Mar 2022 00:00:22 -0800 Subject: [PATCH 11/12] fix path --- eng/pipelines/libraries/enterprise/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/libraries/enterprise/linux.yml b/eng/pipelines/libraries/enterprise/linux.yml index e00ffc8b9ae478..ca2ec8777146d6 100644 --- a/eng/pipelines/libraries/enterprise/linux.yml +++ b/eng/pipelines/libraries/enterprise/linux.yml @@ -57,7 +57,7 @@ jobs: - bash: | docker exec linuxclient bash -c '/repo/build.sh -subset clr+libs -runtimeconfiguration release -ci /p:NativeOptimizationDataSupported=false' docker exec linuxclient bash -c '/repo/dotnet.sh build $(containerLibrariesRoot)/System.Net.Http/tests/EnterpriseTests/System.Net.Http.Enterprise.Tests.csproj' - docker exec linuxclient bash -c '/repo/dotnet.sh build $(containerRunTestsCommand) $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj' + docker exec linuxclient bash -c '/repo/dotnet.sh build $(containerLibrariesRoot)/System.Net.Security/tests/EnterpriseTests/System.Net.Security.Enterprise.Tests.csproj' displayName: Build product sources - bash: | From 8b1fbfe978b199e4bb17858528330dabdc72c250 Mon Sep 17 00:00:00 2001 From: wfurt Date: Thu, 3 Mar 2022 00:13:51 -0800 Subject: [PATCH 12/12] experiment --- .../System/Net/EnterpriseTests/setup/docker-compose.yml | 3 +++ .../EnterpriseTests/setup/linuxclient/test-webserver.sh | 8 -------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/docker-compose.yml b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/docker-compose.yml index c54adfb7caaea3..0b524f35b381f1 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/docker-compose.yml +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/docker-compose.yml @@ -60,6 +60,9 @@ services: hostname: linuxclient domainname: linux.contoso.com dns_search: linux.contoso.com + privileged: true + dns: + - 8.8.8.8 volumes: - shared-volume:/SHARED - ${DOTNET_RUNTIME_REPO_ROOT}:/repo diff --git a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh index 8d4f8586be8fc7..058604296dc3b0 100644 --- a/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh +++ b/src/libraries/Common/tests/System/Net/EnterpriseTests/setup/linuxclient/test-webserver.sh @@ -6,12 +6,4 @@ curl --verbose --negotiate -u: http://apacheweb.linux.contoso.com kdestroy nslookup github.com -if [ $? -ne 0 ]; then - cp /etc/resolv.conf /etc/resolv.conf.ORI - # try to fix-up DNS by adding public server - echo nameserver 8.8.8.8 >> /etc/resolv.conf - - nslookup github.com - curl --verbose http://apacheweb.linux.contoso.com -fi