ZTS: resolve two possible divide by zero errors in tests
Resolve two divide by zero errors observed by the CI. Change
how random picking to ensure no divide by zero, and also keep
same semantics.
Reviewed-by: Tony Hutter <hutter2 at llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1 at llnl.gov>
Reviewed-by: George Melikov <mail at gmelikov.ru>
Signed-off-by: tiehexue <tiehexue at hotmail.com>
Closes #19078
ZTS: do not leave a suspended pool behind in the mmp tests
The mmp tests destroy their pool from cleanup through
datasetexists $TESTPOOL && destroy_pool $TESTPOOL
and datasetexists() asks zfs, which cannot open a pool whose I/O is
suspended:
# zfs get name msus
cannot open 'msus': pool I/O is currently suspended
MMP suspends the pool by itself once its writes have not succeeded for
long enough, which is exactly the state a failing mmp test tends to
leave behind, so the guard says the pool is gone, cleanup destroys
nothing, and the pool stays imported. Every mmp test that runs after
it then fails on its own zpool create:
/dev/loop0 is part of active pool 'testpool'
[31 lines not shown]
sysutils/py-saltext.freebsd: new port
This is a Salt extension for interacting with various FreeBSD-specific
commands. The bsd.shadow module, used by all BSDs, is also included.
The modules herein used to be part of Salt, in version 3006, but are now
developed in a separate repository.
PR: 296290
Reviewed by: krion
Approved by: krion (ports)
Sponsored by: ConnectWise
sysutils/py-saltext.zfs: ZFS extensions for Salt 3008
This port contains modules and states that were previously builtin to
Salt 3006, but must now be installed separately.
It includes two patches used internally at Connectwise.
PR: 296290
Reviewed by: krion
Approved by: krion (ports)
Sponsored by: ConnectWise
sysutils/py-salt: 3008.2
Version 3008.1 version works with Python 3.12+. However, it lacks many
states included in Salt 3006, for example ZFS.
Version 3008.2 fixes a regression in the pkg.installed state, though it
wasn't mentioned in Salt's changelog.
PR: 296290
Approved by: krion (maintainer)
Sponsored by: ConnectWise
NAS-142772 / 26.0.0-RC.1 / krb5.conf: alias realm case variants and fix domain_realm (by anodos325) (#19589)
MIT krb5 matches [realms] sections case-sensitively, and we set
dns_lookup_kdc = false whenever KDCs are pinned. Samba reconnects as the
machine account after creating it, kiniting as
MACHINE$@<dns_domain_name>, and that name comes from
lsa_QueryInfoPolicy2 in lower case. The lookup misses our upper-case
realm section, has no DNS fallback, and fails with KRB5_REALM_UNKNOWN.
SPNEGO normally falls back to NTLMSSP and the join survives. With the
GPOS STIG enabled smb.conf carries client use kerberos = required,
leaving no other mechanism, so every fresh AD join fails with
WERR_GEN_FAILURE.
Emit each realm under both case spellings sharing the same pinned KDCs,
and take default_domain from the canonical name.
Also rename [domain_realms] to [domain_realm]. MIT krb5 only reads the
singular form, so the section was parsing cleanly and being ignored.
[5 lines not shown]
NAS-142772 / 26.0.0 / krb5.conf: alias realm case variants and fix domain_realm (by anodos325) (#19588)
MIT krb5 matches [realms] sections case-sensitively, and we set
dns_lookup_kdc = false whenever KDCs are pinned. Samba reconnects as the
machine account after creating it, kiniting as
MACHINE$@<dns_domain_name>, and that name comes from
lsa_QueryInfoPolicy2 in lower case. The lookup misses our upper-case
realm section, has no DNS fallback, and fails with KRB5_REALM_UNKNOWN.
SPNEGO normally falls back to NTLMSSP and the join survives. With the
GPOS STIG enabled smb.conf carries client use kerberos = required,
leaving no other mechanism, so every fresh AD join fails with
WERR_GEN_FAILURE.
Emit each realm under both case spellings sharing the same pinned KDCs,
and take default_domain from the canonical name.
Also rename [domain_realms] to [domain_realm]. MIT krb5 only reads the
singular form, so the section was parsing cleanly and being ignored.
[5 lines not shown]
[Clang][Sema] Make _Imag int/float LValue not assignable (#218270)
Clang accepts `__real int/float` as an LValue because it's equal to the
scalar value itself, so the assignment will work fine, but it's not the
case for `__imag` because, for int and float, there is no imaginary part
to assign a value to it, so in the sema we can reject this case, similar
to GCC.
Fixes: #119498
LinuxKPI: Add tgid to task_struct under sched.h
The amdkfd driver requires the `tgid` to be a part of the `task_struct`.
This patch introduces the `tgid` member to `task_struct`.
Reviewed by: bz
Sponsored By: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D58228
NAS-143382 / 26.0.0 / Fix rsync extra arguments quoting (#19655)
https://github.com/truenas/middleware/pull/19496 introduced a
regression: the user had `--rsync-path="sudo rsync"` in their `extra`
args, and the argument value was used literally, causing `bash: line 1:
sudo rsync: command not found` error (it tried to launch `sudo rsync`
binary which didn't exist).
This is a 25.10.7 bug that didn't exist in 25.10.6, so, if we're ever
publishing 25.10.8, it should be backported there.
[AMDGPU] Update REV Opcode DPP Combine test to have True16 and Fake16 runs (#222217)
DPP is not implemented for VGPR16 operands, so we also need runs with
True16 disabled to verify that combining into opcodes that might use
them is being properly guarded.
[flang][cuda] Emit Mcuda_compiled sentinel for CUDA Fortran objects (#222421)
Objects compiled as CUDA Fortran now declare an undefined Mcuda_compiled
symbol from CUFAddConstructor when emit-cuda-compiled is set. Linking
without the CUDA Fortran runtime then fails with a clear undefined
reference instead of only _FortranACUFInit, which is limited to PROGRAM
units.
The CUDA Fortran runtime defines the symbol so linking with the CUDA
Fortran runtime still succeeds.
[CIR][AMDGPU] Add support for AMDGCN fract builtins (#222185)
Adds codegen for the following AMDGCN fract builtins:
* __builtin_amdgcn_fract (double)
* __builtin_amdgcn_fractf (float)
* __builtin_amdgcn_fracth (half)
These are lowered to the corresponding `llvm.amdgcn.fract` intrinsics.
[CIR][AMDGPU] Add support for AMDGCN bitfield extract builtins (#222186)
Adds codegen for the following AMDGCN bitfield extract builtins:
* __builtin_amdgcn_ubfe (unsigned)
* __builtin_amdgcn_sbfe (signed)
These are lowered to the corresponding `llvm.amdgcn.ubfe` and
`llvm.amdgcn.sbfe` intrinsics.
ZTS: judge mmap_sync by a concurrent fsync, not by a fixed bound
mmap_sync fails whenever one msync() takes longer than two seconds,
and in CI it does, on machines that are merely loaded:
slow msync: 2318.177000 ms
slow msync: 4043.686000 ms
The bound was raised once already, in c4d1a19b3 ("ZTS: increase
timeout of mmap_sync_001_pos"), and the ctime_001_pos failure fixed in
8486ea36f shows the same CI stalling a creat() for twelve seconds, so
no fixed bound is going to hold there.
An msync() goes through zpl_fsync(): since a18c9edda ("Linux: sync:
remove async/sync accounting") it writes the dirty pages out with
zfs_putpage() and ends in zil_commit(), and it never waits for page
writeback. So what the bound really measures is the ZIL commit, which
is the disk. Sampling the kernel stacks of mmap_sync under an IO load
in a VM confirms it: the time goes into zil_commit_impl() waiting for
[28 lines not shown]
[NFC][analyzer] Cleanup checker calls in `ExprEngine::ProcessStmt`, `ExprEngine::Visit*` (#218691)
Begin standardizing how `PreStmt` checkers and `PostStmt` checkers are
called by the analyzer engine. Previously, checkers were called either
from `ExprEngine::Visit` or the visit method of the statement. Now this
logic was hoisted out into `ExprEngine::ProcessStmt` and most of the
checker calls happen from there.
There are several statement kinds that do not call checkers at all or
only call `PreVisit` or only call `PostVisit` checkers. There are also
statement kinds whose visit code does not easily lend itself to the
`PreVisit`, `Visit`, `PostVisit` scheme, so those have been left
unmodified and will be refactored in a separate patch. The checker
calling status of statement kinds have been documented in the function
`shouldJustCallCheckers`.
NAS-143505 / 27.0.0-BETA.1 / Let the S3 protocol create and delete buckets (by anodos325) (#19670)
An S3 client creating a bucket sends a name and nothing about placement,
so something has to decide where the dataset goes. That decision is this
service's: the S3 daemon holds no ZFS layout, and a daemon that composed
a dataset name would be holding half of a policy whose other half it
cannot see.
The S3 service gains managed_root_dataset and sharing.s3.create's
dataset becomes optional. Omitted, the dataset is created under that
root and named after the bucket. Empty is the default and refuses a
bucket that named no dataset, which is what an appliance whose
administrator has not chosen a location should do rather than picking
one. The root must exist and is never created: a service that made a
dataset out of a string typed into its configuration would make one out
of a typo just as readily. It is checked at s3.update, because a create
is the wrong place to learn the service is misconfigured - the client
that provoked it can do nothing about it.
[44 lines not shown]