tools/test/stress2/misc: Add msdosfs tests (currently failing)
Test msdos22.sh creates 1000 files with long random names consisting
of only ASCII characters. The mount is performed without -L option,
therefore no use of iconv to convert between character sets.
Test msdos23.sh mixes some non-ASCII characters into the file names.
The file system is therefore mounted with -L C.UTF-8 to include tests
of the conversions between UTF-8 and UTF-16.
Test msdos24.sh adds emojis to the names to test the (not yet
committed) support of UTF-16 surrogate pairs in filenames.
All 3 tests succeed with a small number of files (e.g., 10), but fail
most of the time when testing with 1000 files.
The tests have been added to all.exclude since they are expected to
fail. They shall be enabled as regression tests, when the msdosfs code
has been fixed.
[AMDGPU][MIRFormatter] S_WAIT_LOADCNT_DSCNT human-readable mask (#200059)
This patch implements a printer and parser for the S_WAIT_LOADCNT_DSCNT
mask. It prints the mask in a human-readable format, showing the counter
values like: `Loadcnt_<NUM>_Dscnt_<NUM>`.
The format matches the printing style of S_WAITCNT_DEPCTR. For example:
```
S_WAIT_LOADCNT_DSCNT .Loadcnt_0_Dsccnt_0
S_WAIT_LOADCNT_DSCNT .Dsccnt_2
S_WAIT_LOADCNT_DSCNT .AllOff
```
Counters at their maximum value (meaning "don't wait") are omitted. When
all counters are at max, `.AllOff` is printed.
[lit] Make MetricValue a proper abstract base class (#200187)
Currently, `MetricValue` signals abstract methods by raising
`RuntimeError("abstract method")` at runtime. This means a subclass that
forgets to implement `format()` or `todata()` is only caught when the
method is actually called.
This change makes `MetricValue` inherit from `abc.ABC` and decorates
`format` and `todata` with `@abc.abstractmethod`. All three existing
subclasses (`IntMetricValue`, `RealMetricValue`, `JSONMetricValue`)
already implement both methods. No change in behavior.
Signed-off-by: Prasoon Kumar <prasoonkumar054 at gmail.com>
[llubi] Map tags into provenances (#200236)
This patch adjusts https://github.com/llvm/llvm-project/pull/185977 to
generate tags for provenances (i.e., pointer components excluding
addresses), instead of memory objects. This allows us to distinguish
between `read_provenance` and `provenance`. See the original comment in
https://github.com/llvm/llvm-project/pull/185977#discussion_r3310861793.
Currently, tags are only generated for those pointer components
associated with a known memory object. We may need some special tags for
`capture(address)`-only pointers and the result of inttoptr (wildcard
provenance) in the future.
[CIR]Fix CIR Test failures after unnamed_addr removed from vtables (#200435)
See #200108 and #197855 for the cause. We weren't generating this
anywhere in our code, so it is only OGCG check lines that got changed.
[RegAlloc][LiveRegMatrix] Added validity check between VRM and LRM.
Check that every VRM-assigned vreg with a non-empty live interval
must have its segments in the Matrix for its assigned physical reg.
Assisted-by: Cursor/Claude Opus
sys: Renumber MTE SEGV codes
Some third party software expects these to not conflict. As the MTE
support isn't fully in the tree, and these values aren't in a release
we can renumber them without any backwards compatibility issues.
Sponsored by: Arm Ltd
Revert "kern_time: Honor the precise option when counting diff"
This will not work because this kernel version does not support a
precise option. We handle the clock uniformly in all cases.
This reverts commit 3886f1b488e47eba98e1523f85cb570694e97385.
[lldb] Avoid trie prefix recompuation (NFC) (#200026)
Avoid O(depth) string concatenations for every symbol in the Mach-O
exports trie.
This change uses a string to track the current trie prefix, instead of a
vector of substrings. Instead of pushing and popping on the vector, the
string is appended and truncated.
Assisted-by: claude
Ignore `!guid` metadata when merging globals or constants (#200323)
Follow up from PR #184065. Since globals or constants would now have
their GUID pre-calculated and affixed with metadata, we need to tolerate
its presence when merging. To that effect, we rename (and change
accordingly) `GlobalObject::hasMetadataOtherThanDebugLoc` to
`...AndGuid`.
In the case of Constants, they are merged into one of them, which then
keeps its guid, while the rest are erased. In the case of
GlobalVariables, a new one is created, and we will give it its own guid.
Add NVPTX DW_AT_LLVM_language_dialect emission. (#200003)
This PR makes use of the recently introduced DW_AT_LLVM_language_dialect
attribute. Currently, no other targets emit this compile unit DWARF
attribute ; however, this PR changes that. NVPTX can optionally emit a
dialect based on the type of input being compiled (e.g., from a Tile
frontend or traditional CUDA (SIMT) frontend).
- DwarfDebug: add finishTargetUnitAttributes virtual hook so backends
can finalize per-CU attributes.
- NVPTX: override the hook to emit DW_AT_LLVM_language_dialect
(DW_FORM_data1) for the simt and tile dialects, suppressing emission and
warning (per-CU deduplicated) for unknown values.
(Co-developed via LLM)
MAC/do: Add consistency tests
Test that:
1. Concurrent changes to different parameters on the same jail are
independent/atomic.
2. Inheritance works.
3. Relaxing only parent jail rules does not leak to a subjail thanks to
sequential consistency.
4. Sysctl knobs and jail parameters stay consistent.
Some of these tests may be extended in the future with several layers of
jails (there is only a single subjail currently).
Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
MAC/do: Tests: Add support for exec paths, jail parameters, subjails
And also allow configuration of the mdo(1) executable path.
This commit only contains new or modified infrastructure. No functional
change intended at this point.
Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
MAC/do: Tests: Quote the source directory
In a standard test suite installation, this is not necessary, but be
bullet-proof to custom ones, however improbable.
Reviewed by: bapt
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
MAC/do: Tests: Fix copyrights
No comma needed after a single year. Add SPDX.
Reviewed by: bapt
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
MAC/do: Tests: Remove shebang lines
They are automatically added by <bsd.test.mk>.
Reviewed by: bapt
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
mac_do.4: Document executable paths, default jail values and consistency
While here, fix the bug of mentioning 'enable' as a possible value for
the 'mac.do' jail parameter whereas it is 'new' instead.
Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
[InstCombine] Replace undef with poison in a test (#199757)
This is intended as part of the effort to deprecate undef. The
additional wrap-flags are due to the fact that the add can no longer
overflow with poison, but could overflow with undef.
Alive2 proof: https://alive2.llvm.org/ce/z/qiRYcQ
MAC/do: Update copyright
Update years for the Foundation.
While here, remove the initial '/*-' which has been useless for a long
time.
While here, add a missing space on bapt@'s copyright line (approved by
him).
Reviewed by: bapt
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
[WebAssembly] Avoid crash in LateEHPrepare with empty cleanup pads (#200322)
WebAssemblyLateEHPrepare::addCatchRefsAndThrowRefs was using
Catch->getIterator()->getNextNode() to find the insertion position
after the CATCH (or CATCH_ALL) instruction in an EH pad.
If the CATCH/CATCH_ALL instruction is the last instruction in the basic
block, getNextNode() returns nullptr, which causees a crash when passed
to BuildMI. This patch fixes it by using std::next(Catch->getIterator())
which returns MBB.end() if the catch is the last instruction, and the
overload of BuildMI that takes an iterator correctly handles BB.end().
Fixes #197077
Assisted-By: Gemini
MAC/do: Do not skip blanks when parsing executable paths
The kind of tolerance we apply to parsing rules, whose format we have
defined, cannot be applied to paths since blank characters are allowed
there.
There is still the limitation that no escape character is currently
supported, and so it is not possible to configure a path having a ':'
character.
Reviewed by: bapt
Fixes: 9818224174c4 ("MAC/do: Executable paths feature (GSoC 2025's final state)")
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/38
MAC/do: Serialize installing/modifying some jail's configuration
See the immediately preceding commit for explanations on what this is
fixing.
When setting 'mac.do' to 'inherit' on a jail with 'mac.do.rules' and
'mac.do.exec_paths' also specified in the same call, ensure that the
check that these passed parameters are the same as those to be inherited
is atomic with respect to enabling the inheritance (i.e., removing the
jail's 'struct conf' object). (See previous commit "MAC/do: Fix the
recent logic to set jail parameters, make it more tolerant" as for why
this check exists.)
Because we currently only modify a single configuration object per
transaction, we introduce the parse_and_commit_conf() wrapper around
parse_and_set_conf() to remove duplicated code that would ensue from
calling the latter directly, namely, releasing the 'mac_do_rwl' lock and
freeing the old configuration object (if any).
[9 lines not shown]
MAC/do: Support for atomically modifying configurations
As mentioned in previous commits "MAC/do: parse_and_set_conf(): Require
the model configuration" and "MAC/do: Sequential consistency for
configuration retrieval", the introduction of the "executable path"
feature, more fundamentally, the fact that there is now more than one
per-jail parameter and that parameters can be independently modified or
copied, causes an atomicity problem in case of concurrent accesses to of
a jail's applicable configuration.
Partially modifying a configuration is indeed akin to
a read-modify-write operation, where the read is either to the current
or an inherited configuration. More precisely, once pointed to by
a jail, a configuration object is immutable, and changing the jail's
configuration means making the jail point to another configuration
object. To change a jail's configuration, a new configuration object is
thus built, and if only some parameters have been explicitly specified,
those that have not been are set by copying the corresponding values
from an existing configuration object (in case of partial modification
[34 lines not shown]