Extend scanf testing (RHEL-46726)
Resolves: RHEL-46726
This commit is contained in:
parent
44f7d061cb
commit
462dd9fada
15927
glibc-RHEL-46726-1.patch
Normal file
15927
glibc-RHEL-46726-1.patch
Normal file
File diff suppressed because it is too large
Load Diff
451
glibc-RHEL-46726-10.patch
Normal file
451
glibc-RHEL-46726-10.patch
Normal file
@ -0,0 +1,451 @@
|
|||||||
|
commit 50576060c8bf88a3c64c9ab1cdd516974ffb2690
|
||||||
|
Author: Maciej W. Rozycki <macro@redhat.com>
|
||||||
|
Date: Fri Mar 28 12:35:52 2025 +0000
|
||||||
|
|
||||||
|
stdio-common: Add tests for formatted fscanf input specifiers
|
||||||
|
|
||||||
|
Wire fscanf into test infrastructure for formatted scanf input
|
||||||
|
specifiers.
|
||||||
|
|
||||||
|
Reviewed-by: Joseph Myers <josmyers@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
|
||||||
|
index 15525a0f768244c6..74d5e02c7206cabc 100644
|
||||||
|
--- a/stdio-common/Makefile
|
||||||
|
+++ b/stdio-common/Makefile
|
||||||
|
@@ -52,7 +52,7 @@ nonfmt-xprintf-stems := \
|
||||||
|
xprintf-stems := $(sort $(fmt-xprintf-stems) $(nonfmt-xprintf-stems))
|
||||||
|
|
||||||
|
# List of markers for scanf family function tests.
|
||||||
|
-xscanf-funcs := s
|
||||||
|
+xscanf-funcs := s f
|
||||||
|
|
||||||
|
# List of data types and formats for individual per-conversion scanf tests.
|
||||||
|
# Further conversions are provided by sysdeps.
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-c.c b/stdio-common/tst-scanf-format-f-c.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..75ce3cd7c314faee
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-c.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for the character conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-character.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-c.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-char.c b/stdio-common/tst-scanf-format-f-char.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..ee5fbe9e1fc9c0aa
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-char.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for signed char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-char.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-double.c b/stdio-common/tst-scanf-format-f-double.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..1fb25b56b2d27ce5
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-double.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-double.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-float.c b/stdio-common/tst-scanf-format-f-float.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..b5a6ae4b1e957bd3
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-float.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for float conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-float.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-int.c b/stdio-common/tst-scanf-format-f-int.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..961d66bfa0a842b8
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-int.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-int.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-ldouble.c b/stdio-common/tst-scanf-format-f-ldouble.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..6198d35041584402
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-ldouble.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for long double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ldouble.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-llong.c b/stdio-common/tst-scanf-format-f-llong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..1af672f9c2e1484c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-llong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for long long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-llong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-long.c b/stdio-common/tst-scanf-format-f-long.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..fc908111d973ddfa
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-long.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-long.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-short.c b/stdio-common/tst-scanf-format-f-short.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..61697e25987f6281
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-short.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-short.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-uchar.c b/stdio-common/tst-scanf-format-f-uchar.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..b4b8af38e6124c77
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-uchar.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for unsigned char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uchar.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-uint.c b/stdio-common/tst-scanf-format-f-uint.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..af226b0d1044cc8b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-uint.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for unsigned int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uint.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-ullong.c b/stdio-common/tst-scanf-format-f-ullong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..50ea8123bbe52c60
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-ullong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for unsigned long long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ullong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-ulong.c b/stdio-common/tst-scanf-format-f-ulong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..673e7703264756dd
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-ulong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for unsigned long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ulong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f-ushort.c b/stdio-common/tst-scanf-format-f-ushort.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..413ba670e9782984
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f-ushort.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'fscanf' input for unsigned short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-f.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ushort.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-f.h b/stdio-common/tst-scanf-format-f.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..9a4caeeb16f87801
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-f.h
|
||||||
|
@@ -0,0 +1,29 @@
|
||||||
|
+/* Test feature wrapper for formatted 'fscanf' input.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include <stdio.h>
|
||||||
|
+
|
||||||
|
+#define scanf_under_test(...) \
|
||||||
|
+({ \
|
||||||
|
+ int result = fscanf (stdin, __VA_ARGS__); \
|
||||||
|
+ if (ferror (stdin)) \
|
||||||
|
+ result = INPUT_ERROR; \
|
||||||
|
+ else if (result == EOF) \
|
||||||
|
+ result = INPUT_EOF; \
|
||||||
|
+ result; \
|
||||||
|
+})
|
495
glibc-RHEL-46726-11.patch
Normal file
495
glibc-RHEL-46726-11.patch
Normal file
@ -0,0 +1,495 @@
|
|||||||
|
commit bf6ac302cde4aef55ded7e5340f16e6cd8b8e874
|
||||||
|
Author: Maciej W. Rozycki <macro@redhat.com>
|
||||||
|
Date: Fri Mar 28 12:35:52 2025 +0000
|
||||||
|
|
||||||
|
stdio-common: Add tests for formatted sscanf input specifiers
|
||||||
|
|
||||||
|
Wire sscanf into test infrastructure for formatted scanf input
|
||||||
|
specifiers.
|
||||||
|
|
||||||
|
Reviewed-by: Joseph Myers <josmyers@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
|
||||||
|
index 74d5e02c7206cabc..3e165685af09a1c3 100644
|
||||||
|
--- a/stdio-common/Makefile
|
||||||
|
+++ b/stdio-common/Makefile
|
||||||
|
@@ -52,7 +52,7 @@ nonfmt-xprintf-stems := \
|
||||||
|
xprintf-stems := $(sort $(fmt-xprintf-stems) $(nonfmt-xprintf-stems))
|
||||||
|
|
||||||
|
# List of markers for scanf family function tests.
|
||||||
|
-xscanf-funcs := s f
|
||||||
|
+xscanf-funcs := s f ss
|
||||||
|
|
||||||
|
# List of data types and formats for individual per-conversion scanf tests.
|
||||||
|
# Further conversions are provided by sysdeps.
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-c.c b/stdio-common/tst-scanf-format-ss-c.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..58a7ce8f63398f22
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-c.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for the character conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-character.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-c.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-char.c b/stdio-common/tst-scanf-format-ss-char.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..66eb04c0d620126d
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-char.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for signed char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-char.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-double.c b/stdio-common/tst-scanf-format-ss-double.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..2a9fd8afb552fa96
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-double.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-double.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-float.c b/stdio-common/tst-scanf-format-ss-float.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..640e35dbebd2e459
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-float.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for float conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-float.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-int.c b/stdio-common/tst-scanf-format-ss-int.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..c01a0a3f1f1a530d
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-int.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-int.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-ldouble.c b/stdio-common/tst-scanf-format-ss-ldouble.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..3e57ab568f45a741
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-ldouble.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for long double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ldouble.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-llong.c b/stdio-common/tst-scanf-format-ss-llong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..9c1603c869b7f5dc
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-llong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for long long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-llong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-long.c b/stdio-common/tst-scanf-format-ss-long.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..003cfac55282b3cc
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-long.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-long.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-short.c b/stdio-common/tst-scanf-format-ss-short.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..ba1a58289cd7bd1d
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-short.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-short.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-uchar.c b/stdio-common/tst-scanf-format-ss-uchar.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..1db14241dcab6d89
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-uchar.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for unsigned char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uchar.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-uint.c b/stdio-common/tst-scanf-format-ss-uint.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..a296fb48c9c9500a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-uint.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for unsigned int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uint.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-ullong.c b/stdio-common/tst-scanf-format-ss-ullong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..885d5709be386471
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-ullong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for unsigned long long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ullong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-ulong.c b/stdio-common/tst-scanf-format-ss-ulong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..8a2f24dc5ce7d8d8
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-ulong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for unsigned long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ulong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss-ushort.c b/stdio-common/tst-scanf-format-ss-ushort.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..40618889ac34e910
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss-ushort.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'sscanf' input for unsigned short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-ss.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ushort.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-ss.h b/stdio-common/tst-scanf-format-ss.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..2fb1ca20deb845df
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-ss.h
|
||||||
|
@@ -0,0 +1,73 @@
|
||||||
|
+/* Test feature wrapper for formatted 'scanf' input.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include <stddef.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+
|
||||||
|
+#include <support/support.h>
|
||||||
|
+
|
||||||
|
+static char *sscanf_buf;
|
||||||
|
+static size_t sscanf_buf_size;
|
||||||
|
+
|
||||||
|
+static void __attribute__ ((destructor))
|
||||||
|
+scanf_under_test_fini (void)
|
||||||
|
+{
|
||||||
|
+ free (sscanf_buf);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#define scanf_under_test(...) \
|
||||||
|
+({ \
|
||||||
|
+ __label__ out; \
|
||||||
|
+ size_t i = 0; \
|
||||||
|
+ int result; \
|
||||||
|
+ int ch; \
|
||||||
|
+ \
|
||||||
|
+ do \
|
||||||
|
+ { \
|
||||||
|
+ ch = read_input (); \
|
||||||
|
+ if (ch < 0) \
|
||||||
|
+ { \
|
||||||
|
+ result = ch; \
|
||||||
|
+ goto out; \
|
||||||
|
+ } \
|
||||||
|
+ if (i == sscanf_buf_size) \
|
||||||
|
+ { \
|
||||||
|
+ sscanf_buf_size += SIZE_CHUNK; \
|
||||||
|
+ /* Add an extra byte for the terminating null character. */ \
|
||||||
|
+ sscanf_buf = xrealloc (sscanf_buf, sscanf_buf_size + 1); \
|
||||||
|
+ } \
|
||||||
|
+ sscanf_buf[i++] = ch; \
|
||||||
|
+ } \
|
||||||
|
+ while (ch != ':'); \
|
||||||
|
+ sscanf_buf[i++] = '\0'; \
|
||||||
|
+ \
|
||||||
|
+ ch = ungetc (ch, stdin); \
|
||||||
|
+ if (ch == EOF) \
|
||||||
|
+ { \
|
||||||
|
+ result = INPUT_ERROR; \
|
||||||
|
+ goto out; \
|
||||||
|
+ } \
|
||||||
|
+ \
|
||||||
|
+ result = sscanf (sscanf_buf, __VA_ARGS__); \
|
||||||
|
+ if (result == EOF) \
|
||||||
|
+ result = INPUT_EOF; \
|
||||||
|
+ \
|
||||||
|
+out: \
|
||||||
|
+ result; \
|
||||||
|
+})
|
458
glibc-RHEL-46726-12.patch
Normal file
458
glibc-RHEL-46726-12.patch
Normal file
@ -0,0 +1,458 @@
|
|||||||
|
commit 63c81fa0dbf741b33bbac03bf204d896ee8e4694
|
||||||
|
Author: Maciej W. Rozycki <macro@redhat.com>
|
||||||
|
Date: Fri Mar 28 12:35:52 2025 +0000
|
||||||
|
|
||||||
|
stdio-common: Add tests for formatted vscanf input specifiers
|
||||||
|
|
||||||
|
Wire vscanf into test infrastructure for formatted scanf input
|
||||||
|
specifiers.
|
||||||
|
|
||||||
|
Reviewed-by: Joseph Myers <josmyers@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
|
||||||
|
index 3e165685af09a1c3..3a09b5bfbc930b45 100644
|
||||||
|
--- a/stdio-common/Makefile
|
||||||
|
+++ b/stdio-common/Makefile
|
||||||
|
@@ -52,7 +52,7 @@ nonfmt-xprintf-stems := \
|
||||||
|
xprintf-stems := $(sort $(fmt-xprintf-stems) $(nonfmt-xprintf-stems))
|
||||||
|
|
||||||
|
# List of markers for scanf family function tests.
|
||||||
|
-xscanf-funcs := s f ss
|
||||||
|
+xscanf-funcs := s f ss v
|
||||||
|
|
||||||
|
# List of data types and formats for individual per-conversion scanf tests.
|
||||||
|
# Further conversions are provided by sysdeps.
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-c.c b/stdio-common/tst-scanf-format-v-c.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..0e2c000ce0218e92
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-c.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for the character conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-character.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-c.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-char.c b/stdio-common/tst-scanf-format-v-char.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..be3a56c663b457ee
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-char.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for signed char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-char.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-double.c b/stdio-common/tst-scanf-format-v-double.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..91886318e800f274
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-double.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-double.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-float.c b/stdio-common/tst-scanf-format-v-float.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..5d289d3e8be7a640
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-float.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for float conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-float.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-int.c b/stdio-common/tst-scanf-format-v-int.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..770a686bb1a355fa
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-int.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-int.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-ldouble.c b/stdio-common/tst-scanf-format-v-ldouble.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..8215ea7ecb4f785a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-ldouble.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for long double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ldouble.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-llong.c b/stdio-common/tst-scanf-format-v-llong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..2a1ef02844fc7c27
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-llong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for long long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-llong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-long.c b/stdio-common/tst-scanf-format-v-long.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..8376032bd459d253
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-long.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-long.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-short.c b/stdio-common/tst-scanf-format-v-short.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..23b9c568874d89bb
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-short.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-short.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-uchar.c b/stdio-common/tst-scanf-format-v-uchar.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..861db22fbafe508e
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-uchar.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for unsigned char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uchar.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-uint.c b/stdio-common/tst-scanf-format-v-uint.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..30e58c591723d719
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-uint.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for unsigned int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uint.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-ullong.c b/stdio-common/tst-scanf-format-v-ullong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..ee2914d3e932e5cf
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-ullong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for unsigned long long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ullong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-ulong.c b/stdio-common/tst-scanf-format-v-ulong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..f7864dd57636c6b2
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-ulong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for unsigned long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ulong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v-ushort.c b/stdio-common/tst-scanf-format-v-ushort.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..79ca16b4e8f953d0
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v-ushort.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vscanf' input for unsigned short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-v.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ushort.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-v.h b/stdio-common/tst-scanf-format-v.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..bf19877670d7aea3
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-v.h
|
||||||
|
@@ -0,0 +1,36 @@
|
||||||
|
+/* Test feature wrapper for formatted 'vscanf' input.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include <stdarg.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+scanf_under_test (const char *restrict fmt, ...)
|
||||||
|
+{
|
||||||
|
+ va_list ap;
|
||||||
|
+ int result;
|
||||||
|
+
|
||||||
|
+ va_start (ap, fmt);
|
||||||
|
+ result = vscanf (fmt, ap);
|
||||||
|
+ va_end (ap);
|
||||||
|
+ if (ferror (stdin))
|
||||||
|
+ result = INPUT_ERROR;
|
||||||
|
+ else if (result == EOF)
|
||||||
|
+ result = INPUT_EOF;
|
||||||
|
+ return result;
|
||||||
|
+}
|
458
glibc-RHEL-46726-13.patch
Normal file
458
glibc-RHEL-46726-13.patch
Normal file
@ -0,0 +1,458 @@
|
|||||||
|
commit 53ee7ede430b92fcefd31fc00bfd3fa9acec5846
|
||||||
|
Author: Maciej W. Rozycki <macro@redhat.com>
|
||||||
|
Date: Fri Mar 28 12:35:53 2025 +0000
|
||||||
|
|
||||||
|
stdio-common: Add tests for formatted vfscanf input specifiers
|
||||||
|
|
||||||
|
Wire vfscanf into test infrastructure for formatted scanf input
|
||||||
|
specifiers.
|
||||||
|
|
||||||
|
Reviewed-by: Joseph Myers <josmyers@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
|
||||||
|
index 3a09b5bfbc930b45..13c50f07ccfc86c3 100644
|
||||||
|
--- a/stdio-common/Makefile
|
||||||
|
+++ b/stdio-common/Makefile
|
||||||
|
@@ -52,7 +52,7 @@ nonfmt-xprintf-stems := \
|
||||||
|
xprintf-stems := $(sort $(fmt-xprintf-stems) $(nonfmt-xprintf-stems))
|
||||||
|
|
||||||
|
# List of markers for scanf family function tests.
|
||||||
|
-xscanf-funcs := s f ss v
|
||||||
|
+xscanf-funcs := s f ss v vf
|
||||||
|
|
||||||
|
# List of data types and formats for individual per-conversion scanf tests.
|
||||||
|
# Further conversions are provided by sysdeps.
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-c.c b/stdio-common/tst-scanf-format-vf-c.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..307bfe82c3875245
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-c.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for the character conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-character.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-c.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-char.c b/stdio-common/tst-scanf-format-vf-char.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..602899b2bcd5b7eb
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-char.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for signed char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-char.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-double.c b/stdio-common/tst-scanf-format-vf-double.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..8b58bbe10b3e8622
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-double.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-double.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-float.c b/stdio-common/tst-scanf-format-vf-float.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..81dad06ebe389438
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-float.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for float conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-float.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-int.c b/stdio-common/tst-scanf-format-vf-int.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..8038791f1411d579
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-int.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-int.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-ldouble.c b/stdio-common/tst-scanf-format-vf-ldouble.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..ec9a7c4632968966
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-ldouble.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for long double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ldouble.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-llong.c b/stdio-common/tst-scanf-format-vf-llong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..adc4b125de23cd3c
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-llong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for long long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-llong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-long.c b/stdio-common/tst-scanf-format-vf-long.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..5f26d6c9ce69e08f
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-long.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-long.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-short.c b/stdio-common/tst-scanf-format-vf-short.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..0e081ead780b6882
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-short.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-short.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-uchar.c b/stdio-common/tst-scanf-format-vf-uchar.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..2e879f52ce705646
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-uchar.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for unsigned char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uchar.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-uint.c b/stdio-common/tst-scanf-format-vf-uint.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..4874f86ef21cf5fe
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-uint.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for unsigned int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uint.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-ullong.c b/stdio-common/tst-scanf-format-vf-ullong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..dde09018c46128a5
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-ullong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for unsigned long long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ullong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-ulong.c b/stdio-common/tst-scanf-format-vf-ulong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..81023061ef66f824
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-ulong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for unsigned long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ulong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf-ushort.c b/stdio-common/tst-scanf-format-vf-ushort.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..cb8eb4bdcf5e3abc
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf-ushort.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vfscanf' input for unsigned short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vf.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ushort.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vf.h b/stdio-common/tst-scanf-format-vf.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..6037e63921aa4ba3
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vf.h
|
||||||
|
@@ -0,0 +1,36 @@
|
||||||
|
+/* Test feature wrapper for formatted 'vfscanf' input.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include <stdarg.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+scanf_under_test (const char *restrict fmt, ...)
|
||||||
|
+{
|
||||||
|
+ va_list ap;
|
||||||
|
+ int result;
|
||||||
|
+
|
||||||
|
+ va_start (ap, fmt);
|
||||||
|
+ result = vfscanf (stdin, fmt, ap);
|
||||||
|
+ va_end (ap);
|
||||||
|
+ if (ferror (stdin))
|
||||||
|
+ result = INPUT_ERROR;
|
||||||
|
+ else if (result == EOF)
|
||||||
|
+ result = INPUT_EOF;
|
||||||
|
+ return result;
|
||||||
|
+}
|
499
glibc-RHEL-46726-14.patch
Normal file
499
glibc-RHEL-46726-14.patch
Normal file
@ -0,0 +1,499 @@
|
|||||||
|
commit 47076b3163ce645f791d5c8f80080e9811733347
|
||||||
|
Author: Maciej W. Rozycki <macro@redhat.com>
|
||||||
|
Date: Fri Mar 28 12:35:53 2025 +0000
|
||||||
|
|
||||||
|
stdio-common: Add tests for formatted vsscanf input specifiers
|
||||||
|
|
||||||
|
Wire vsscanf into test infrastructure for formatted scanf input
|
||||||
|
specifiers.
|
||||||
|
|
||||||
|
Reviewed-by: Joseph Myers <josmyers@redhat.com>
|
||||||
|
|
||||||
|
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
|
||||||
|
index 13c50f07ccfc86c3..1aefe3702800bd73 100644
|
||||||
|
--- a/stdio-common/Makefile
|
||||||
|
+++ b/stdio-common/Makefile
|
||||||
|
@@ -52,7 +52,7 @@ nonfmt-xprintf-stems := \
|
||||||
|
xprintf-stems := $(sort $(fmt-xprintf-stems) $(nonfmt-xprintf-stems))
|
||||||
|
|
||||||
|
# List of markers for scanf family function tests.
|
||||||
|
-xscanf-funcs := s f ss v vf
|
||||||
|
+xscanf-funcs := s f ss v vf vs
|
||||||
|
|
||||||
|
# List of data types and formats for individual per-conversion scanf tests.
|
||||||
|
# Further conversions are provided by sysdeps.
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-c.c b/stdio-common/tst-scanf-format-vs-c.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..2df5aa7acbecf851
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-c.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for the character conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-character.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-c.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-char.c b/stdio-common/tst-scanf-format-vs-char.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..ae4d8e0d0a06b549
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-char.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for signed char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-char.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-double.c b/stdio-common/tst-scanf-format-vs-double.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..cd459a8506d4a1e1
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-double.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-double.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-float.c b/stdio-common/tst-scanf-format-vs-float.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..7872afef5a49c515
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-float.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for float conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-float.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-int.c b/stdio-common/tst-scanf-format-vs-int.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..e67b4be6c1ffffb4
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-int.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-int.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-ldouble.c b/stdio-common/tst-scanf-format-vs-ldouble.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..4d299c29eeee5202
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-ldouble.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for long double conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-real.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ldouble.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-llong.c b/stdio-common/tst-scanf-format-vs-llong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..06c8cc921f40bcab
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-llong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for long long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-llong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-long.c b/stdio-common/tst-scanf-format-vs-long.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..575a6cb36a20385d
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-long.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for long conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-long.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-short.c b/stdio-common/tst-scanf-format-vs-short.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..5473471996bfad9b
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-short.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-short.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-uchar.c b/stdio-common/tst-scanf-format-vs-uchar.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..5a29b9b944f7df31
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-uchar.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for unsigned char conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uchar.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-uint.c b/stdio-common/tst-scanf-format-vs-uint.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..b9486b1488270d7a
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-uint.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for unsigned int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-uint.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-ullong.c b/stdio-common/tst-scanf-format-vs-ullong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..5396a7812fc13c39
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-ullong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for unsigned long long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ullong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-ulong.c b/stdio-common/tst-scanf-format-vs-ulong.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..3dbc14206dea3176
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-ulong.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for unsigned long int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ulong.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs-ushort.c b/stdio-common/tst-scanf-format-vs-ushort.c
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..0f28b36dee83ddbe
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs-ushort.c
|
||||||
|
@@ -0,0 +1,22 @@
|
||||||
|
+/* Test for formatted 'vsscanf' input for unsigned short int conversions.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include "tst-scanf-format-skeleton.h"
|
||||||
|
+#include "tst-scanf-format-vs.h"
|
||||||
|
+#include "tst-scanf-format-integer.h"
|
||||||
|
+#include "tst-scanf-format-skeleton-ushort.c"
|
||||||
|
diff --git a/stdio-common/tst-scanf-format-vs.h b/stdio-common/tst-scanf-format-vs.h
|
||||||
|
new file mode 100644
|
||||||
|
index 0000000000000000..d49690daa00bb954
|
||||||
|
--- /dev/null
|
||||||
|
+++ b/stdio-common/tst-scanf-format-vs.h
|
||||||
|
@@ -0,0 +1,77 @@
|
||||||
|
+/* Test feature wrapper for formatted 'vsscanf' input.
|
||||||
|
+ Copyright (C) 2025 Free Software Foundation, Inc.
|
||||||
|
+ This file is part of the GNU C Library.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is free software; you can redistribute it and/or
|
||||||
|
+ modify it under the terms of the GNU Lesser General Public
|
||||||
|
+ License as published by the Free Software Foundation; either
|
||||||
|
+ version 2.1 of the License, or (at your option) any later version.
|
||||||
|
+
|
||||||
|
+ The GNU C Library is distributed in the hope that it will be useful,
|
||||||
|
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
+ Lesser General Public License for more details.
|
||||||
|
+
|
||||||
|
+ You should have received a copy of the GNU Lesser General Public
|
||||||
|
+ License along with the GNU C Library; if not, see
|
||||||
|
+ <https://www.gnu.org/licenses/>. */
|
||||||
|
+
|
||||||
|
+#include <stdarg.h>
|
||||||
|
+#include <stddef.h>
|
||||||
|
+#include <stdio.h>
|
||||||
|
+#include <stdlib.h>
|
||||||
|
+
|
||||||
|
+#include <support/support.h>
|
||||||
|
+
|
||||||
|
+static char *sscanf_buf;
|
||||||
|
+static size_t sscanf_buf_size;
|
||||||
|
+
|
||||||
|
+static void __attribute__ ((destructor))
|
||||||
|
+scanf_under_test_fini (void)
|
||||||
|
+{
|
||||||
|
+ free (sscanf_buf);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static int
|
||||||
|
+scanf_under_test (const char *restrict fmt, ...)
|
||||||
|
+{
|
||||||
|
+ size_t i = 0;
|
||||||
|
+ va_list ap;
|
||||||
|
+ int result;
|
||||||
|
+ int ch;
|
||||||
|
+
|
||||||
|
+ do
|
||||||
|
+ {
|
||||||
|
+ ch = read_input ();
|
||||||
|
+ if (ch < 0)
|
||||||
|
+ {
|
||||||
|
+ result = ch;
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+ if (i == sscanf_buf_size)
|
||||||
|
+ {
|
||||||
|
+ sscanf_buf_size += SIZE_CHUNK;
|
||||||
|
+ /* Add an extra byte for the terminating null character. */
|
||||||
|
+ sscanf_buf = xrealloc (sscanf_buf, sscanf_buf_size + 1);
|
||||||
|
+ }
|
||||||
|
+ sscanf_buf[i++] = ch;
|
||||||
|
+ }
|
||||||
|
+ while (ch != ':');
|
||||||
|
+ sscanf_buf[i++] = '\0';
|
||||||
|
+
|
||||||
|
+ ch = ungetc (ch, stdin);
|
||||||
|
+ if (ch == EOF)
|
||||||
|
+ {
|
||||||
|
+ result = INPUT_ERROR;
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ va_start (ap, fmt);
|
||||||
|
+ result = vsscanf (sscanf_buf, fmt, ap);
|
||||||
|
+ va_end (ap);
|
||||||
|
+ if (result == EOF)
|
||||||
|
+ result = INPUT_EOF;
|
||||||
|
+
|
||||||
|
+out:
|
||||||
|
+ return result;
|
||||||
|
+}
|
32483
glibc-RHEL-46726-15.patch
Normal file
32483
glibc-RHEL-46726-15.patch
Normal file
File diff suppressed because it is too large
Load Diff
9159
glibc-RHEL-46726-2.patch
Normal file
9159
glibc-RHEL-46726-2.patch
Normal file
File diff suppressed because it is too large
Load Diff
9223
glibc-RHEL-46726-3.patch
Normal file
9223
glibc-RHEL-46726-3.patch
Normal file
File diff suppressed because it is too large
Load Diff
5032
glibc-RHEL-46726-4.patch
Normal file
5032
glibc-RHEL-46726-4.patch
Normal file
File diff suppressed because it is too large
Load Diff
5035
glibc-RHEL-46726-5.patch
Normal file
5035
glibc-RHEL-46726-5.patch
Normal file
File diff suppressed because it is too large
Load Diff
4911
glibc-RHEL-46726-6.patch
Normal file
4911
glibc-RHEL-46726-6.patch
Normal file
File diff suppressed because one or more lines are too long
5116
glibc-RHEL-46726-7.patch
Normal file
5116
glibc-RHEL-46726-7.patch
Normal file
File diff suppressed because it is too large
Load Diff
4984
glibc-RHEL-46726-8.patch
Normal file
4984
glibc-RHEL-46726-8.patch
Normal file
File diff suppressed because it is too large
Load Diff
4953
glibc-RHEL-46726-9.patch
Normal file
4953
glibc-RHEL-46726-9.patch
Normal file
File diff suppressed because one or more lines are too long
20
glibc.spec
20
glibc.spec
@ -157,7 +157,7 @@ end \
|
|||||||
Summary: The GNU libc libraries
|
Summary: The GNU libc libraries
|
||||||
Name: glibc
|
Name: glibc
|
||||||
Version: %{glibcversion}
|
Version: %{glibcversion}
|
||||||
Release: 183%{?dist}
|
Release: 184%{?dist}
|
||||||
|
|
||||||
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
|
# In general, GPLv2+ is used by programs, LGPLv2+ is used for
|
||||||
# libraries.
|
# libraries.
|
||||||
@ -1166,6 +1166,21 @@ Patch858: glibc-RHEL-44920-5.patch
|
|||||||
Patch859: glibc-RHEL-44920-6.patch
|
Patch859: glibc-RHEL-44920-6.patch
|
||||||
Patch860: glibc-RHEL-44920-7.patch
|
Patch860: glibc-RHEL-44920-7.patch
|
||||||
Patch861: glibc-RHEL-44920-8.patch
|
Patch861: glibc-RHEL-44920-8.patch
|
||||||
|
Patch862: glibc-RHEL-46726-1.patch
|
||||||
|
Patch863: glibc-RHEL-46726-2.patch
|
||||||
|
Patch864: glibc-RHEL-46726-3.patch
|
||||||
|
Patch865: glibc-RHEL-46726-4.patch
|
||||||
|
Patch866: glibc-RHEL-46726-5.patch
|
||||||
|
Patch867: glibc-RHEL-46726-6.patch
|
||||||
|
Patch868: glibc-RHEL-46726-7.patch
|
||||||
|
Patch869: glibc-RHEL-46726-8.patch
|
||||||
|
Patch870: glibc-RHEL-46726-9.patch
|
||||||
|
Patch871: glibc-RHEL-46726-10.patch
|
||||||
|
Patch872: glibc-RHEL-46726-11.patch
|
||||||
|
Patch873: glibc-RHEL-46726-12.patch
|
||||||
|
Patch874: glibc-RHEL-46726-13.patch
|
||||||
|
Patch875: glibc-RHEL-46726-14.patch
|
||||||
|
Patch876: glibc-RHEL-46726-15.patch
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Continued list of core "glibc" package information:
|
# Continued list of core "glibc" package information:
|
||||||
@ -3159,6 +3174,9 @@ update_gconv_modules_cache ()
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Apr 2 2025 Florian Weimer <fweimer@redhat.com> - 2.34-184
|
||||||
|
- Extend scanf testing (RHEL-46726)
|
||||||
|
|
||||||
* Mon Mar 31 2025 Frédéric Bérat <fberat@redhat.com> - 2.34-183
|
* Mon Mar 31 2025 Frédéric Bérat <fberat@redhat.com> - 2.34-183
|
||||||
- Fortify inet_ntop and inet_pton (RHEL-44920)
|
- Fortify inet_ntop and inet_pton (RHEL-44920)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user