Guest User

Untitled

a guest
Oct 23rd, 2017
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.61 KB | None | 0 0
  1. go test -parallel=1 -race -v parallel_test.go
  2. === RUN TestOne
  3. === PAUSE TestOne
  4. === RUN TestTwo
  5. === PAUSE TestTwo
  6. === CONT TestTwo
  7. === CONT TestOne
  8. --- PASS: TestTwo (0.00s)
  9. --- PASS: TestOne (0.00s)
  10. PASS
  11. ok command-line-arguments 1.020s
  12.  
  13. go test -parallel=2 -race -v parallel_test.go
  14. === RUN TestOne
  15. === PAUSE TestOne
  16. === RUN TestTwo
  17. === PAUSE TestTwo
  18. === CONT TestTwo
  19. === CONT TestOne
  20. ==================
  21. WARNING: DATA RACE
  22. Write at 0x00c420088240 by goroutine 6:
  23. runtime.mapassign_faststr()
  24. /Users/vasko/code/go/src/runtime/hashmap_fast.go:534 +0x0
  25. command-line-arguments.TestOne()
  26. /Users/vasko/tmp/parallel_test.go:9 +0x91
  27. testing.tRunner()
  28. /Users/vasko/code/go/src/testing/testing.go:769 +0x169
  29.  
  30. Previous write at 0x00c420088240 by goroutine 7:
  31. runtime.mapassign_faststr()
  32. /Users/vasko/code/go/src/runtime/hashmap_fast.go:534 +0x0
  33. command-line-arguments.TestTwo()
  34. /Users/vasko/tmp/parallel_test.go:20 +0x91
  35. testing.tRunner()
  36. /Users/vasko/code/go/src/testing/testing.go:769 +0x169
  37.  
  38. Goroutine 6 (running) created at:
  39. testing.(*T).Run()
  40. /Users/vasko/code/go/src/testing/testing.go:812 +0x535
  41. testing.runTests.func1()
  42. /Users/vasko/code/go/src/testing/testing.go:1036 +0xa4
  43. testing.tRunner()
  44. /Users/vasko/code/go/src/testing/testing.go:769 +0x169
  45. testing.runTests()
  46. /Users/vasko/code/go/src/testing/testing.go:1034 +0x4c7
  47. testing.(*M).Run()
  48. /Users/vasko/code/go/src/testing/testing.go:954 +0x271
  49. main.main()
  50. b001/_testmain.go:44 +0x228
  51.  
  52. Goroutine 7 (running) created at:
  53. testing.(*T).Run()
  54. /Users/vasko/code/go/src/testing/testing.go:812 +0x535
  55. testing.runTests.func1()
  56. /Users/vasko/code/go/src/testing/testing.go:1036 +0xa4
  57. testing.tRunner()
  58. /Users/vasko/code/go/src/testing/testing.go:769 +0x169
  59. testing.runTests()
  60. /Users/vasko/code/go/src/testing/testing.go:1034 +0x4c7
  61. testing.(*M).Run()
  62. /Users/vasko/code/go/src/testing/testing.go:954 +0x271
  63. main.main()
  64. b001/_testmain.go:44 +0x228
  65. ==================
  66. ==================
  67. WARNING: DATA RACE
  68. Write at 0x00c4200c2088 by goroutine 6:
  69. command-line-arguments.TestOne()
  70. /Users/vasko/tmp/parallel_test.go:9 +0xa4
  71. testing.tRunner()
  72. /Users/vasko/code/go/src/testing/testing.go:769 +0x169
  73.  
  74. Previous write at 0x00c4200c2088 by goroutine 7:
  75. command-line-arguments.TestTwo()
  76. /Users/vasko/tmp/parallel_test.go:20 +0xa4
  77. testing.tRunner()
  78. /Users/vasko/code/go/src/testing/testing.go:769 +0x169
  79.  
  80. Goroutine 6 (running) created at:
  81. testing.(*T).Run()
  82. /Users/vasko/code/go/src/testing/testing.go:812 +0x535
  83. testing.runTests.func1()
  84. /Users/vasko/code/go/src/testing/testing.go:1036 +0xa4
  85. testing.tRunner()
  86. /Users/vasko/code/go/src/testing/testing.go:769 +0x169
  87. testing.runTests()
  88. /Users/vasko/code/go/src/testing/testing.go:1034 +0x4c7
  89. testing.(*M).Run()
  90. /Users/vasko/code/go/src/testing/testing.go:954 +0x271
  91. main.main()
  92. b001/_testmain.go:44 +0x228
  93.  
  94. Goroutine 7 (running) created at:
  95. testing.(*T).Run()
  96. /Users/vasko/code/go/src/testing/testing.go:812 +0x535
  97. testing.runTests.func1()
  98. /Users/vasko/code/go/src/testing/testing.go:1036 +0xa4
  99. testing.tRunner()
  100. /Users/vasko/code/go/src/testing/testing.go:769 +0x169
  101. testing.runTests()
  102. /Users/vasko/code/go/src/testing/testing.go:1034 +0x4c7
  103. testing.(*M).Run()
  104. /Users/vasko/code/go/src/testing/testing.go:954 +0x271
  105. main.main()
  106. b001/_testmain.go:44 +0x228
  107. ==================
  108. --- FAIL: TestOne (0.00s)
  109. testing.go:722: race detected during execution of test
  110. --- FAIL: TestTwo (0.00s)
  111. FAIL
  112. exit status 1
  113. FAIL command-line-arguments 0.018s
Add Comment
Please, Sign In to add comment