[all-commits] [llvm/llvm-project] 4097ec: [libc][test] Fix getcwd test for symlinked paths (...

Elio via All-commits all-commits at lists.llvm.org
Thu Apr 16 03:05:52 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4097ec7720f4888f5efe14f3627a6ce0f3b7fc89
      https://github.com/llvm/llvm-project/commit/4097ec7720f4888f5efe14f3627a6ce0f3b7fc89
  Author: Elio <xiongzile at bytedance.com>
  Date:   2026-04-16 (Thu, 16 Apr 2026)

  Changed paths:
    M libc/test/integration/src/unistd/CMakeLists.txt
    M libc/test/integration/src/unistd/getcwd_test.cpp

  Log Message:
  -----------
  [libc][test] Fix getcwd test for symlinked paths (#191426)

The test compared getcwd() with getenv("PWD"), which is not reliable
under symlinked paths: PWD may preserve the logical path while getcwd()
returns the physical path.

Use stat(2) to verify directory identity instead.

Co-authored-by: Zile Xiong <xiongzile99 at gmail.com>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list