CI/GCC: Add Fedora 44, fix build errors and threadsappend

- Add Fedora 44 to CI tests
- Fix build issues from the newer compiler. These are mostly 'char *'
  to 'const char *' conversions.
- Fix threadsappend.c test waiting for the same thread TID twice.
  This caused the test to hang on F44 (but strangely not other OSs?)

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alexander Motin <alexander.motin@TrueNAS.com>
Signed-off-by: Tony Hutter <hutter2@llnl.gov>
Closes #18478
This commit is contained in:
Tony Hutter
2026-05-02 09:57:15 -07:00
parent 65b4a5c551
commit 7534fa4df7
16 changed files with 54 additions and 43 deletions
+10 -8
View File
@@ -708,7 +708,7 @@ zfs_open(libzfs_handle_t *hdl, const char *path, int types)
{
zfs_handle_t *zhp;
char errbuf[ERRBUFLEN];
char *bookp;
const char *bookp;
(void) snprintf(errbuf, sizeof (errbuf),
dgettext(TEXT_DOMAIN, "cannot open '%s'"), path);
@@ -3129,7 +3129,7 @@ userquota_propname_decode(const char *propname, boolean_t zoned,
zfs_userquota_prop_t *typep, char *domain, int domainlen, uint64_t *ridp)
{
zfs_userquota_prop_t type;
char *cp;
const char *cp;
boolean_t isuser;
boolean_t isgroup;
boolean_t isproject;
@@ -4470,12 +4470,13 @@ zfs_rename(zfs_handle_t *zhp, const char *target, renameflags_t flags)
{
int ret = 0;
zfs_cmd_t zc = {"\0"};
char *delim;
prop_changelist_t *cl = NULL;
char parent[ZFS_MAX_DATASET_NAME_LEN];
char property[ZFS_MAXPROPLEN];
libzfs_handle_t *hdl = zhp->zfs_hdl;
char errbuf[ERRBUFLEN];
const char *delim;
char *delim2;
/* if we have the same exact name, just return success */
if (strcmp(zhp->zfs_name, target) == 0)
@@ -4500,11 +4501,11 @@ zfs_rename(zfs_handle_t *zhp, const char *target, renameflags_t flags)
*/
(void) strlcpy(parent, zhp->zfs_name,
sizeof (parent));
delim = strchr(parent, '@');
delim2 = strchr(parent, '@');
if (strchr(target, '@') == NULL)
*(++delim) = '\0';
*(++delim2) = '\0';
else
*delim = '\0';
*delim2 = '\0';
(void) strlcat(parent, target, sizeof (parent));
target = parent;
} else {
@@ -4525,6 +4526,7 @@ zfs_rename(zfs_handle_t *zhp, const char *target, renameflags_t flags)
if (!zfs_validate_name(hdl, target, zhp->zfs_type, B_TRUE))
return (zfs_error(hdl, EZFS_INVALIDNAME, errbuf));
} else {
if (flags.recursive) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"recursive rename must be a snapshot"));
@@ -4580,8 +4582,8 @@ zfs_rename(zfs_handle_t *zhp, const char *target, renameflags_t flags)
}
if (flags.recursive) {
char *parentname = zfs_strdup(zhp->zfs_hdl, zhp->zfs_name);
delim = strchr(parentname, '@');
*delim = '\0';
delim2 = strchr(parentname, '@');
*delim2 = '\0';
zfs_handle_t *zhrp = zfs_open(zhp->zfs_hdl, parentname,
ZFS_TYPE_DATASET);
free(parentname);
+2 -2
View File
@@ -550,8 +550,8 @@ get_snapshot_names(differ_info_t *di, const char *fromsnap,
const char *tosnap)
{
libzfs_handle_t *hdl = di->zhp->zfs_hdl;
char *atptrf = NULL;
char *atptrt = NULL;
const char *atptrf = NULL;
const char *atptrt = NULL;
int fdslen, fsnlen;
int tdslen, tsnlen;
+1 -1
View File
@@ -581,7 +581,7 @@ zpool_valid_proplist(libzfs_handle_t *hdl, const char *poolname,
prop = zpool_name_to_prop(propname);
if (prop == ZPOOL_PROP_INVAL && zpool_prop_feature(propname)) {
int err;
char *fname = strchr(propname, '@') + 1;
const char *fname = strchr(propname, '@') + 1;
err = zfeature_lookup_name(fname, NULL);
if (err != 0) {
+1 -1
View File
@@ -2684,7 +2684,7 @@ zfs_send_one_cb_impl(zfs_handle_t *zhp, const char *from, int fd,
char bookname[ZFS_MAX_DATASET_NAME_LEN];
nvlist_t *redact_snaps;
zfs_handle_t *book_zhp;
char *at, *pound;
const char *at, *pound;
int dsnamelen;
pound = strchr(redactbook, '#');
+9 -7
View File
@@ -218,7 +218,8 @@ zfs_get_pci_slots_sys_path(const char *dev_name)
char *address2 = NULL;
char *path = NULL;
char buf[MAXPATHLEN];
char *tmp;
const char *tmp;
char *tmp2;
/* If they preface 'dev' with a path (like "/dev") then strip it off */
tmp = strrchr(dev_name, '/');
@@ -240,9 +241,9 @@ zfs_get_pci_slots_sys_path(const char *dev_name)
* be "0000:01:00.0" while /sys/bus/pci/slots/0/address will be
* "0000:01:00". Just NULL terminate at the '.' so they match.
*/
tmp = strrchr(address1, '.');
if (tmp != NULL)
*tmp = '\0';
tmp2 = strrchr(address1, '.');
if (tmp2 != NULL)
*tmp2 = '\0';
dp = opendir("/sys/bus/pci/slots/");
if (dp == NULL) {
@@ -311,6 +312,7 @@ zfs_get_enclosure_sysfs_path(const char *dev_name)
DIR *dp = NULL;
struct dirent *ep;
char buf[MAXPATHLEN];
const char *tmp0;
char *tmp1 = NULL;
char *tmp2 = NULL;
char *tmp3 = NULL;
@@ -322,9 +324,9 @@ zfs_get_enclosure_sysfs_path(const char *dev_name)
return (NULL);
/* If they preface 'dev' with a path (like "/dev") then strip it off */
tmp1 = strrchr(dev_name, '/');
if (tmp1 != NULL)
dev_name = tmp1 + 1; /* +1 since we want the chr after '/' */
tmp0 = strrchr(dev_name, '/');
if (tmp0 != NULL)
dev_name = tmp0 + 1; /* +1 since we want the chr after '/' */
tmpsize = asprintf(&tmp1, "/sys/block/%s/device", dev_name);
if (tmpsize == -1 || tmp1 == NULL) {