[all-commits] [llvm/llvm-project] 678f19: [Support] Report EISDIR when opening a directory (...

azhan92 via All-commits all-commits at lists.llvm.org
Wed Apr 17 14:57:04 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 678f19f08296fec299438130cf5943714c590b7e
      https://github.com/llvm/llvm-project/commit/678f19f08296fec299438130cf5943714c590b7e
  Author: azhan92 <alisonxzhang at gmail.com>
  Date:   2024-04-17 (Wed, 17 Apr 2024)

  Changed paths:
    M llvm/lib/Support/Unix/Path.inc
    M llvm/test/tools/llvm-symbolizer/input-file-err.test
    M llvm/unittests/Support/CommandLineTest.cpp
    M llvm/unittests/Support/Path.cpp

  Log Message:
  -----------
  [Support] Report EISDIR when opening a directory (#79880)

The test `llvm/unittests/Support/CommandLineTest.cpp` that handles
errors in expansion of response files was previously disabled for AIX.
Originally the code was dependent on `read` returning `EISDIR` which
occurs on platforms such as Linux. However, other platforms such as AIX
allow use of `read` on file descriptors for directories. This change
updates `readNativeFile` to produce `EISDIR` on AIX and z/OS when used
on a directory (instead of relying on the call to `read` to do so).

---------

Co-authored-by: Alison Zhang <alisonzhang at ibm.com>
Co-authored-by: James Henderson <46713263+jh7370 at users.noreply.github.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