[all-commits] [llvm/llvm-project] 823e94: [compiler-rt][test] Expand and Rewrite Tests for l...

Harini0924 via All-commits all-commits at lists.llvm.org
Mon Aug 26 20:34:53 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 823e94299875e040dfde62776297333033f83dd2
      https://github.com/llvm/llvm-project/commit/823e94299875e040dfde62776297333033f83dd2
  Author: Harini0924 <79345568+Harini0924 at users.noreply.github.com>
  Date:   2024-08-26 (Mon, 26 Aug 2024)

  Changed paths:
    M compiler-rt/test/profile/Linux/counter_promo_for.c
    M compiler-rt/test/profile/Linux/counter_promo_nest.c
    M compiler-rt/test/profile/Linux/counter_promo_while.c
    M compiler-rt/test/profile/Linux/instrprof-debug-info-correlate.c

  Log Message:
  -----------
  [compiler-rt][test] Expand and Rewrite Tests for lit Internal Shell Compatibility (#106115)

This patch addresses compatibility issues with the lit internal shell by
expanding and rewriting test scripts in the compiler-rt subproject.
These changes were prompted by the FileNotFound unresolved errors
encountered during the testing process, specifically when running the
command `LIT_USE_INTERNAL_SHELL=1 ninja check compiler-rt`.

**Why the error occurred:**
The error occurred because the original test scripts used process
substitution `(<(...))` in their diff commands. Process substitution
creates temporary files or FIFOs to hold command output, and these are
then passed to `diff`. However, the lit internal shell, which is more
limited than a typical shell like `bash`, does not support process
substitution. When lit tries to execute these commands, it is unable to
create or access the temporary files or FIFOs generated by process
substitution. As a result, lit attempts to open a file or directory that
doesn't exist, leading to the `FileNotFoundError`.

**Changes Made:**

- Instead of using process substitution, the commands now explicitly
redirect the output of `llvm-profdata show` to temporary files before
performing the `diff` comparison. This ensures that the lit internal
shell can correctly find and open these files, resolving the
`FileNotFoundError`.

[This change is relevant [RFC] Enabling the lit internal shell by
Default](https://discourse.llvm.org/t/rfc-enabling-the-lit-internal-shell-by-default/80179)
fixes: #106111



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