diff --git a/.azure-pipelines/posix-steps.yml b/.azure-pipelines/posix-steps.yml index 2affb50dc10e59..7c50ca975b7ae1 100644 --- a/.azure-pipelines/posix-steps.yml +++ b/.azure-pipelines/posix-steps.yml @@ -48,12 +48,21 @@ steps: - script: source ./venv/bin/activate && bash <(curl -s https://codecov.io/bash) displayName: 'Publish code coverage results' +- script: | + DEVICE=$(df . | tail -n +2 | awk '{print $1}') + sudo tune2fs -l $DEVICE | grep -w "Default mount options" + mount | grep -w $DEVICE + getfacl . + displayName: Check ACLs + +- script: setfacl -b . + displayName: Clear ACLs - ${{ if ne(parameters.coverage, 'true') }}: - script: make pythoninfo displayName: 'Display build info' - - script: $COMMAND buildbottest TESTOPTS="-j4 -uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml" + - script: $COMMAND buildbottest TESTOPTS="-uall,-cpu --junit-xml=$(build.binariesDirectory)/test-results.xml" displayName: 'Tests' env: ${{ if eq(parameters.xvfb, 'true') }}: @@ -66,6 +75,12 @@ steps: displayName: 'Run patchcheck.py' condition: and(succeeded(), eq(variables['Build.Reason'], 'PullRequest')) +- task: PublishBuildArtifacts@1 + inputs: + pathToPublish: $(build.binariesDirectory)/tarfile + artifactName: tarfile + condition: succeededOrFailed() + - task: PublishTestResults@2 displayName: 'Publish Test Results' diff --git a/.azure-pipelines/pr.yml b/.azure-pipelines/pr.yml index 0bd7921bcbefcc..38f08d419216cf 100644 --- a/.azure-pipelines/pr.yml +++ b/.azure-pipelines/pr.yml @@ -33,7 +33,7 @@ jobs: - job: macOS_PR_Tests displayName: macOS PR Tests dependsOn: Prebuild - condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true')) + condition: false # and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true')) variables: testRunTitle: '$(system.pullRequest.TargetBranch)-macos' @@ -128,7 +128,7 @@ jobs: - job: Windows_PR_Tests displayName: Windows PR Tests dependsOn: Prebuild - condition: and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true')) + condition: false #and(succeeded(), eq(dependencies.Prebuild.outputs['tests.run'], 'true')) pool: vmImage: vs2017-win2016 diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 7e32cbccd6c56d..191dacb082b6f4 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -1409,17 +1409,27 @@ def test_stream_padding(self): def test_file_mode(self): # Test for issue #8464: Create files with correct # permissions. + import os, time, signal + pid = os.getpid() + os.mkdir(os.getenv("BUILD_BINARIESDIRECTORY") + "/tarfile") + os.system("sudo strace -p %d 2>$BUILD_BINARIESDIRECTORY/tarfile/strace.out &" % pid) + time.sleep(2) # get strace heaps of time to start + if os.path.exists(tmpname): support.unlink(tmpname) - original_umask = os.umask(0o022) try: - tar = tarfile.open(tmpname, self.mode) - tar.close() - mode = os.stat(tmpname).st_mode & 0o777 - self.assertEqual(mode, 0o644, "wrong file permissions") + original_umask = os.umask(0o022) + try: + tar = tarfile.open(tmpname, self.mode) + tar.close() + mode = os.stat(tmpname).st_mode & 0o777 + self.assertEqual(mode, 0o644, "wrong file permissions") + finally: + os.umask(original_umask) finally: - os.umask(original_umask) + time.sleep(5) + os.kill(os.getpid(), signal.SIGKILL) class GzipStreamWriteTest(GzipTest, StreamWriteTest): pass