diff mbox series

doc: Document struct-layout-1.exp for ABI checks

Message ID 20240908054857.2169625-1-dimitar@dinux.eu
State New
Headers show
Series doc: Document struct-layout-1.exp for ABI checks | expand

Commit Message

Dimitar Dimitrov Sept. 8, 2024, 5:48 a.m. UTC
This test helped discover PR116621, so it is worth being documented.

gcc/ChangeLog:

	* doc/sourcebuild.texi: Document struct-layout-1.exp.

Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
---
 gcc/doc/sourcebuild.texi | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

Comments

Dimitar Dimitrov Sept. 29, 2024, 9:25 a.m. UTC | #1
On Sun, Sep 08, 2024 at 08:48:57AM +0300, Dimitar Dimitrov wrote:
> This test helped discover PR116621, so it is worth being documented.
> 
> gcc/ChangeLog:
> 
> 	* doc/sourcebuild.texi: Document struct-layout-1.exp.
> 
> Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
> ---
>  gcc/doc/sourcebuild.texi | 18 +++++++++++++++++-
>  1 file changed, 17 insertions(+), 1 deletion(-)
> 


Ping.

Regards,
Dimitar
Jakub Jelinek Sept. 29, 2024, 9:47 a.m. UTC | #2
On Sun, Sep 08, 2024 at 08:48:57AM +0300, Dimitar Dimitrov wrote:
> This test helped discover PR116621, so it is worth being documented.
> 
> gcc/ChangeLog:
> 
> 	* doc/sourcebuild.texi: Document struct-layout-1.exp.
> 
> Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>

LGTM.

	Jakub
diff mbox series

Patch

diff --git a/gcc/doc/sourcebuild.texi b/gcc/doc/sourcebuild.texi
index 6ba72fd44a2..6623f46ca71 100644
--- a/gcc/doc/sourcebuild.texi
+++ b/gcc/doc/sourcebuild.texi
@@ -4161,7 +4161,7 @@  compiler options from @env{COMPAT_OPTIONS}.  When
 the compiler under test but with combinations of the options from
 @env{COMPAT_OPTIONS}.
 
-To run only the C++ compatibility suite using the compiler under test
+To run only the basic C++ compatibility suite using the compiler under test
 and another version of GCC using specific compiler options, do the
 following from @file{@var{objdir}/gcc}:
 
@@ -4174,6 +4174,22 @@  make -k \
   RUNTESTFLAGS="compat.exp"
 @end smallexample
 
+The file @file{struct-layout-1.exp} provides a few more test cases
+exercising pseudo-randomly generated structure layouts.
+Defining @env{RUN_ALL_COMPAT_TESTS} would increase the number of
+generated tests to yield even more coverage.  As an example, to modify
+the above test command to run the maximum number of ABI tests for C++, do:
+
+@smallexample
+rm site.exp
+make -k \
+  ALT_CXX_UNDER_TEST=$@{alt_prefix@}/bin/g++ \
+  COMPAT_OPTIONS="@var{lists as shown above}" \
+  check-c++ \
+  RUNTESTFLAGS="compat.exp struct-layout-1.exp" \
+  RUN_ALL_COMPAT_TESTS=1
+@end smallexample
+
 A test that fails when the source files are compiled with different
 compilers, but passes when the files are compiled with the same
 compiler, demonstrates incompatibility of the generated code or