Project

General

Profile

Bug #10852

TestObjSpace#test_dump_flags sometimes fails on mswin-CI

Added by usa (Usaku NAKAMURA) over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Target version:
-
[ruby-dev:48864]

Description

mswinのCIで、以下のfailureが時々(2割くらい?)出るのですが、何がまずいのでしょうか?
2.2だと頻度はぐっと下がりますが、出ないわけではないようです。

'''
1) Failure:
TestObjSpace#test_dump_flags [D:/tmp/mswin-build20150213-6324-8fqgzk/ruby/test/objspace/test_objspace.rb:199]:
Expected /"wb_protected":true, "old":true, "long_lived":true, "marked":true/ to match "{\"address\":\"0x00000001f5cfe8\", \"type\":\"STRING\", \"class\":\"0x00000000db8ee0\", \"frozen\":true, \"embedded\":true, \"fstring\":true, \"bytesize\":3, \"value\":\"foo\", \"encoding\":\"UTF-8\", \"memsize\":40, \"flags\":{\"wb_protected\":true, \"old\":true}}\n".
'''

Associated revisions

Revision cbffea05
Added by ko1 (Koichi Sasada) over 4 years ago

add ref to [Bug #10852].

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50915 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50915
Added by ko1 (Koichi Sasada) over 4 years ago

add ref to [Bug #10852].

Revision 50915
Added by ko1 (Koichi Sasada) over 4 years ago

add ref to [Bug #10852].

Revision 50915
Added by ko1 (Koichi Sasada) over 4 years ago

add ref to [Bug #10852].

Revision 50915
Added by ko1 (Koichi Sasada) over 4 years ago

add ref to [Bug #10852].

Revision 50915
Added by ko1 (Koichi Sasada) over 4 years ago

add ref to [Bug #10852].

Revision b9f5a6c2
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) 50914,50915: [Backport #10852]

    * test/objspace/test_objspace.rb (test_dump_flags): relax pattern
      because long_lived flag and marked flag can be false at major GC.
      [Bug #10852]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@50923 b2dd03c8-39d4-4d8f-98ff-823fe69b080e

Revision 50923
Added by nagachika (Tomoyuki Chikanaga) over 4 years ago

merge revision(s) 50914,50915: [Backport #10852]

* test/objspace/test_objspace.rb (test_dump_flags): relax pattern
  because long_lived flag and marked flag can be false at major GC.
  [Bug #10852]

History

Updated by ko1 (Koichi Sasada) over 4 years ago

これ、ずっと考えてたんですが、
よく見ると major gc の時、old であっても、long_lived":true が外れることがあることがわかりました(それで正常)。

なので、テストを修正しようと思います。

trunk (2.3) と 2.2 では、微妙に違うので、2.2 についてはパッチ案を出そうと思います。

Updated by ko1 (Koichi Sasada) over 4 years ago

  • Status changed from Assigned to Closed

r50914 で trunk は修正しました(ref 忘れた)。

以下は、2.2 向けです。

Index: ChangeLog
===================================================================
--- ChangeLog   (revision 50914)
+++ ChangeLog   (working copy)
@@ -1,3 +1,8 @@
+Tue Jun 16 17:39:41 2015  Koichi Sasada  <ko1@atdot.net>
+
+   * test/objspace/test_objspace.rb (test_dump_flags): relax pattern
+     because long_lived flag and marked flag can be false at major GC.
+
 Mon Jun 15 03:24:23 2015  Koichi Sasada  <ko1@atdot.net>

    * vm_insnhelper.c (lep_svar_set): add WBs.
Index: test/objspace/test_objspace.rb
===================================================================
--- test/objspace/test_objspace.rb  (revision 50914)
+++ test/objspace/test_objspace.rb  (working copy)
@@ -196,7 +196,7 @@

   def test_dump_flags
     info = ObjectSpace.dump("foo".freeze)
-    assert_match /"wb_protected":true, "old":true, "long_lived":true, "marked":true/, info
+    assert_match /"wb_protected":true, "old":true/, info
     assert_match /"fstring":true/, info
   end

Updated by nagachika (Tomoyuki Chikanaga) over 4 years ago

  • Backport changed from 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: REQUIRED to 2.0.0: DONTNEED, 2.1: DONTNEED, 2.2: DONE

ruby_2_2 向けパッチありがとうございます。 r50923 で適用しました。が手違いで test_objspace.rb に関係ない変更を混ぜてしまったので r50924 でその部分を revert しています。

Also available in: Atom PDF