[libcxx-commits] [PATCH] D111138: [libcxx][pretty printers] Skip u16/u32 string printer tests

David Spickett via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Oct 5 05:35:23 PDT 2021


DavidSpickett added a subscriber: saugustine.
DavidSpickett added a comment.

You can reproduce by building the CI docker image with Focal instead of Bionic.

The default gdb 9.2 with python 3.8

  FAIL: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:196
  GDB printed:
     'u"\\xd800\\xdd96\\x20ac\\243$"'
  Value should match:
     'u"𐆖€£$"'
  PASS: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:198
  PASS: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:200
  PASS: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:206
  FAIL: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:209
  GDB printed:
     'U"\\x1d552\\x1d553\\x1d554\\x1d555\\x1d556\\x1d557"'
  Value should match:
     'U"𝕒𝕓𝕔𝕕𝕖𝕗"'
  FAIL: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:213
  GDB printed:
     'U"\\x4f60\\x597d"'
  Value should match:
     'U"你好"'

A gdb-10.1 using python 2.7.18 that I built myself:

  FAIL: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:196
  GDB printed:
     u'u"\\xd800\\xdd96\\x20ac\\243$"'
  Value should match:
     u'u"\U00010196\u20ac\xa3$"'
  PASS: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:198
  PASS: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:200
  PASS: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:206
  FAIL: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:209
  GDB printed:
     u'U"\\x1d552\\x1d553\\x1d554\\x1d555\\x1d556\\x1d557"'
  Value should match:
     u'U"\U0001d552\U0001d553\U0001d554\U0001d555\U0001d556\U0001d557"'
  FAIL: /llvm/libcxx/test/libcxx/gdb/gdb_pretty_printer_test.sh.cpp:213
  GDB printed:
     u'U"\\x4f60\\x597d"'
  Value should match:
     u'U"\u4f60\u597d"'

You can see that Python2 is closer, putting `\x` instead of `\u` but I don't know where that points the blame. After some digging I still don't have a good idea what layer would be at fault there and if you could even fix it nicely.

@saugustine If you or others have an idea of where the problem might lie I'm happy to look into it more, rather than disabling them.

I should note that the `u16string` tests were never enabled but that was just a mistake I think. And that this test cannot run on a gdb <8.2 due to some of the API it uses. So that added to my confusion and maybe the reason I can't find any examples of it passing.

At Linaro we're looking to move all of our bots to Focal and when you move CI you'll hit the same issue.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D111138/new/

https://reviews.llvm.org/D111138



More information about the libcxx-commits mailing list