Overwrite target for x86_64_v2
Update patch-git.lua to handle AlmaLinux branches correctly
This commit is contained in:
commit
3c4a24ff0f
57
glibc-RHEL-151711-1.patch
Normal file
57
glibc-RHEL-151711-1.patch
Normal file
@ -0,0 +1,57 @@
|
||||
commit 652c36b3ea917093bf60ad2a345987530c192821
|
||||
Author: Matteo Croce <teknoraver@meta.com>
|
||||
Date: Sat Jun 14 11:59:03 2025 +0200
|
||||
|
||||
fstatat: extend tests and documentation
|
||||
|
||||
Document the fstatat behaviour leading to a ENOENT errno, and extend
|
||||
tests to test the case where filename does not exist.
|
||||
|
||||
Signed-off-by: Matteo Croce <teknoraver@meta.com>
|
||||
|
||||
diff --git a/io/tst-stat-time64.c b/io/tst-stat-time64.c
|
||||
index 2d751a814ddc4706..bf5b0b4fb994167c 100644
|
||||
--- a/io/tst-stat-time64.c
|
||||
+++ b/io/tst-stat-time64.c
|
||||
@@ -52,6 +52,12 @@ fstat_check (int fd, const char *path, struct stat *st)
|
||||
static void
|
||||
fstatat_check (int fd, const char *path, struct stat *st)
|
||||
{
|
||||
+ TEST_COMPARE (fstatat (fd, "", st, 0), -1);
|
||||
+ TEST_COMPARE (errno, ENOENT);
|
||||
+
|
||||
+ TEST_COMPARE (fstatat (AT_FDCWD, "_non_existing_file", st, 0), -1);
|
||||
+ TEST_COMPARE (errno, ENOENT);
|
||||
+
|
||||
TEST_COMPARE (fstatat (fd, path, st, 0), 0);
|
||||
}
|
||||
|
||||
diff --git a/io/tst-stat.c b/io/tst-stat.c
|
||||
index d11b25ec0921b1e2..d6f5e83aa06a5fbe 100644
|
||||
--- a/io/tst-stat.c
|
||||
+++ b/io/tst-stat.c
|
||||
@@ -56,6 +56,9 @@ fstatat_check (int fd, const char *path, struct stat *st)
|
||||
TEST_COMPARE (fstatat (fd, "", st, 0), -1);
|
||||
TEST_COMPARE (errno, ENOENT);
|
||||
|
||||
+ TEST_COMPARE (fstatat (AT_FDCWD, "_non_existing_file", st, 0), -1);
|
||||
+ TEST_COMPARE (errno, ENOENT);
|
||||
+
|
||||
TEST_COMPARE (fstatat (fd, path, st, 0), 0);
|
||||
}
|
||||
|
||||
diff --git a/manual/filesys.texi b/manual/filesys.texi
|
||||
index f21f21804251e480..d0ced84bf6bdbf8e 100644
|
||||
--- a/manual/filesys.texi
|
||||
+++ b/manual/filesys.texi
|
||||
@@ -2395,6 +2395,10 @@ The @var{flags} argument is not valid for this function.
|
||||
@item ENOTDIR
|
||||
The descriptor @var{filedes} is not associated with a directory, and
|
||||
@var{filename} is a relative file name.
|
||||
+
|
||||
+@item ENOENT
|
||||
+The file named by @var{filename} does not exist, or @var{filename} is an
|
||||
+empty string and @var{flags} does not contain @code{AT_EMPTY_PATH}.
|
||||
@end table
|
||||
|
||||
When the sources are compiled with @code{_FILE_OFFSET_BITS == 64} this
|
||||
80
glibc-RHEL-151711-2.patch
Normal file
80
glibc-RHEL-151711-2.patch
Normal file
@ -0,0 +1,80 @@
|
||||
commit 521b4d6c4d5a7c84efd2742e0aac6311eaef005b
|
||||
Author: Matteo Croce <teknoraver@meta.com>
|
||||
Date: Tue Jun 24 18:40:13 2025 +0200
|
||||
|
||||
fstat: add test and documentation for an edge case.
|
||||
|
||||
The fstatat behaviour when the target is a dangling symlink is different
|
||||
if flags contains AT_SYMLINK_NOFOLLOW or not.
|
||||
Add a test for this and document it.
|
||||
|
||||
diff --git a/io/tst-stat.c b/io/tst-stat.c
|
||||
index d6f5e83aa06a5fbe..b0f3d003c1d7127a 100644
|
||||
--- a/io/tst-stat.c
|
||||
+++ b/io/tst-stat.c
|
||||
@@ -62,12 +62,23 @@ fstatat_check (int fd, const char *path, struct stat *st)
|
||||
TEST_COMPARE (fstatat (fd, path, st, 0), 0);
|
||||
}
|
||||
|
||||
+static void
|
||||
+fstatat_link (const char *path, struct stat *st)
|
||||
+{
|
||||
+ TEST_COMPARE (fstatat (AT_FDCWD, path, st, 0), -1);
|
||||
+ TEST_COMPARE (errno, ENOENT);
|
||||
+
|
||||
+ TEST_COMPARE (fstatat (AT_FDCWD, path, st, AT_SYMLINK_NOFOLLOW), 0);
|
||||
+ TEST_COMPARE (!S_ISLNK(st->st_mode), 0);
|
||||
+}
|
||||
+
|
||||
typedef void (*test_t)(int, const char *path, struct stat *);
|
||||
|
||||
static int
|
||||
do_test (void)
|
||||
{
|
||||
char *path;
|
||||
+ const char *linkame = "tst-fstat.linkname";
|
||||
int fd = create_temp_file ("tst-fstat.", &path);
|
||||
TEST_VERIFY_EXIT (fd >= 0);
|
||||
support_write_file_string (path, "abc");
|
||||
@@ -81,13 +92,13 @@ do_test (void)
|
||||
printf ("warning: timestamp with nanoseconds not supported\n");
|
||||
|
||||
struct statx stx;
|
||||
+ struct stat st;
|
||||
TEST_COMPARE (statx (fd, path, 0, STATX_BASIC_STATS, &stx), 0);
|
||||
|
||||
test_t tests[] = { stat_check, lstat_check, fstat_check, fstatat_check };
|
||||
|
||||
for (int i = 0; i < array_length (tests); i++)
|
||||
{
|
||||
- struct stat st;
|
||||
tests[i](fd, path, &st);
|
||||
|
||||
TEST_COMPARE (stx.stx_dev_major, major (st.st_dev));
|
||||
@@ -111,6 +122,10 @@ do_test (void)
|
||||
}
|
||||
}
|
||||
|
||||
+ TEST_COMPARE (symlink ("tst-fstat.target", linkame), 0);
|
||||
+ add_temp_file (linkame);
|
||||
+ fstatat_link (linkame, &st);
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
|
||||
diff --git a/manual/filesys.texi b/manual/filesys.texi
|
||||
index d0ced84bf6bdbf8e..4406201dab9ca3fb 100644
|
||||
--- a/manual/filesys.texi
|
||||
+++ b/manual/filesys.texi
|
||||
@@ -2397,8 +2397,9 @@ The descriptor @var{filedes} is not associated with a directory, and
|
||||
@var{filename} is a relative file name.
|
||||
|
||||
@item ENOENT
|
||||
-The file named by @var{filename} does not exist, or @var{filename} is an
|
||||
-empty string and @var{flags} does not contain @code{AT_EMPTY_PATH}.
|
||||
+The file named by @var{filename} does not exist, it's a dangling symbolic link
|
||||
+and @var{flags} does not contain @code{AT_SYMLINK_NOFOLLOW}, or @var{filename}
|
||||
+is an empty string and @var{flags} does not contain @code{AT_EMPTY_PATH}.
|
||||
@end table
|
||||
|
||||
When the sources are compiled with @code{_FILE_OFFSET_BITS == 64} this
|
||||
52
glibc-RHEL-151711-3.patch
Normal file
52
glibc-RHEL-151711-3.patch
Normal file
@ -0,0 +1,52 @@
|
||||
commit 55e85c1e48c2aae71c0b5907fd22a3e9b978b6e8
|
||||
Author: H.J. Lu <hjl.tools@gmail.com>
|
||||
Date: Fri Jul 18 17:03:04 2025 -0700
|
||||
|
||||
io/tst-stat.c: Use a temporary directory for symlink test
|
||||
|
||||
Call support_create_temp_directory to create a temporary directory for
|
||||
symlink test, instead of a fixed file in the glibc source tree, to avoid
|
||||
the race condition when there are more than one glibc tests running at the
|
||||
same time with the same glibc source tree. This fixes BZ #33178.
|
||||
|
||||
Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
|
||||
Reviewed-by: Andreas K. Huettel <dilfridge@gentoo.org>
|
||||
|
||||
diff --git a/io/tst-stat.c b/io/tst-stat.c
|
||||
index b0f3d003c1d7127a..ea368e4f81e0fb4d 100644
|
||||
--- a/io/tst-stat.c
|
||||
+++ b/io/tst-stat.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <sys/sysmacros.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
static void
|
||||
stat_check (int fd, const char *path, struct stat *st)
|
||||
@@ -78,7 +79,8 @@ static int
|
||||
do_test (void)
|
||||
{
|
||||
char *path;
|
||||
- const char *linkame = "tst-fstat.linkname";
|
||||
+ char *tempdir = support_create_temp_directory ("tst-stat-");
|
||||
+ char *linkname = xasprintf ("%s/tst-fstat.linkname", tempdir);
|
||||
int fd = create_temp_file ("tst-fstat.", &path);
|
||||
TEST_VERIFY_EXIT (fd >= 0);
|
||||
support_write_file_string (path, "abc");
|
||||
@@ -122,9 +124,12 @@ do_test (void)
|
||||
}
|
||||
}
|
||||
|
||||
- TEST_COMPARE (symlink ("tst-fstat.target", linkame), 0);
|
||||
- add_temp_file (linkame);
|
||||
- fstatat_link (linkame, &st);
|
||||
+ TEST_COMPARE (symlink ("tst-fstat.target", linkname), 0);
|
||||
+ add_temp_file (linkname);
|
||||
+ fstatat_link (linkname, &st);
|
||||
+
|
||||
+ free (linkname);
|
||||
+ free (tempdir);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -2357,7 +2357,7 @@ update_gconv_modules_cache ()
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Feb 18 2026 Eduard Abdullin <eabdullin@almalinux.org> - 2.39-114.alma.1
|
||||
* Tue Mar 03 2026 Eduard Abdullin <eabdullin@almalinux.org> - 2.39-115.alma.1
|
||||
- Overwrite target for x86_64_v2
|
||||
- Update patch-git.lua to handle AlmaLinux branches correctly
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user