Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1324 from Random-Liu/stdout-non-block
Browse files Browse the repository at this point in the history
Avoid O_NONBLOCK on stdout in the windows test.
  • Loading branch information
Random-Liu authored Oct 25, 2019
2 parents 8ce2ad6 + 132a359 commit a7c5a65
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/windows/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,12 @@ retry_on_permission_error "${scp[@]}" "${node_name}":"C:/test.log" "${ARTIFACTS}
retry_on_permission_error "${scp[@]}" --recurse "${node_name}":"C:/_artifacts/*" "${ARTIFACTS}"

log "Test output:"

# Make sure stdout is not in O_NONBLOCK mode.
# See https://github.com/kubernetes/test-infra/issues/14938 for more details.
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); print(flags&os.O_NONBLOCK);'
python -c 'import os,sys,fcntl; flags = fcntl.fcntl(sys.stdout, fcntl.F_GETFL); fcntl.fcntl(sys.stdout, fcntl.F_SETFL, flags&~os.O_NONBLOCK);'

cat "${ARTIFACTS}/test.log"

exit_code="$(cat "${ARTIFACTS}/exitcode")"
Expand Down

0 comments on commit a7c5a65

Please sign in to comment.