[Lldb-commits] [PATCH] D146058: [lldb][gnustep] Add basic test and infrastructure for GNUstep ObjC runtime

Jim Ingham via lldb-commits lldb-commits at lists.llvm.org
Tue Mar 14 14:46:06 PDT 2023



> On Mar 14, 2023, at 12:10 PM, Stefan Gränitz via Phabricator via lldb-commits <lldb-commits at lists.llvm.org> wrote:
> 
> sgraenitz marked 2 inline comments as done.
> sgraenitz added a comment.
> 
> Soo, @DavidSpickett
> 
> In D146058#4193446 <https://reviews.llvm.org/D146058#4193446>, @DavidSpickett wrote:
> 
>> I am not familiar with Objective C, especially beyond Apple platforms. Are you aiming to run all the existing Objective C test cases with this different runtime or will it be mainly new tests?
>> (would be very neat if you got all the existing stuff for free)
> 
> It would be great to get all the existing Objective C test coverage for free, but I guess it'd take a while to support all of the Apple runtime features. Literally all existing ObjC tests are API tests and when running locally, they are all `UNSUPPORTED` for me on Linux and Windows. I didn't manage to get them running quickly and thus, I went for a Shell test here. My impression was that API tests are LLDB legacy and new tests would usually be Shell. It might still be worth getting (some of) the API tests to work with GNUstep as well, but I might need some advice on how to do that.

That is not true.  The shell tests are generally less accurate than the API tests - it's much easier to make a test that isn't doing what you thought because they match something unintended.  If the test goes wrong, they are also harder to debug.  We use them for things where you really do want the terminal type interaction or where they are testing very simple stuff.  For anything more complicated than that, the API tests are generally a better way to go, and if you're on the fence, I at least always suggest API tests.

Jim


> 
> In D146058#4193470 <https://reviews.llvm.org/D146058#4193470>, @DavidSpickett wrote:
> 
>> Myself and Omair both work on Linaro's bots. We run lldb checks on linux arm/aarch64 and Windows on Arm. We could look at installing it.
> 
> I suspect `lldb-arm-ubuntu` means 32-bit ARM. This should work, but it's not a priority for us right now. We could still give it a try and see if it works out-of-the-box!
> 
> As a side-note: Could the AArch64 bot https://lab.llvm.org/buildbot/#/builders/219 pass `LLVM_LIT_ARGS="-v"` as well so the log tells us which tests actually ran? That would be great!
> 
> 
> 
> ================
> Comment at: lldb/test/CMakeLists.txt:32
> +  set(gnustep_info lib/libobjc.so)
> +elseif (WIN32 AND EXISTS "C:/Program Files (x86)/libobjc/lib/objc.dll"
> +              AND EXISTS "C:/Program Files (x86)/libobjc/include/objc/runtime.h")
> ----------------
> DavidSpickett wrote:
>> Does this library work on Windows on Arm (AArch64 Windows)?
>> 
>> Fine not to handle that in this change, just curious. We (Linaro) do have an lldb bot for it, so it could be added at some point.
> Not yet: https://github.com/gnustep/libobjc2/issues/227
> 
> 
> ================
> Comment at: lldb/test/Shell/lit.cfg.py:27
> # by individual lit.local.cfg files in the test subdirectories.
> -config.suffixes = ['.test', '.cpp', '.s']
> +config.suffixes = ['.test', '.cpp', '.s', '.m']
> 
> ----------------
> sgraenitz wrote:
>> DavidSpickett wrote:
>>> There are a couple of .m files in the Shell dir already, I assume the related tests still pass for those?
>> Interesting, it's exactly one .m and one .mm outside `Input` directories right? Let me double-check that.
>> ```
>> SymbolFile/DWARF/clang-ast-from-dwarf-objc-property.m
>> SymbolFile/DWARF/x86/module-ownership.mm
>> ```
> These have been running ever since, because https://github.com/llvm/llvm-project/blob/release/16.x/lldb/test/Shell/SymbolFile/DWARF/lit.local.cfg Anyway, thanks for your note!
> 
> 
> Repository:
>  rG LLVM Github Monorepo
> 
> CHANGES SINCE LAST ACTION
>  https://reviews.llvm.org/D146058/new/
> 
> https://reviews.llvm.org/D146058
> 
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits



More information about the lldb-commits mailing list