dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PATCH: clean up whitespace in manual


From: Jacob Bachmeyer
Subject: PATCH: clean up whitespace in manual
Date: Mon, 10 Dec 2018 21:02:56 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090807 MultiZilla/1.8.3.4e SeaMonkey/1.1.17 Mnenhy/0.7.6.0

I finally got tired of Emacs complaining about irregular whitespace in dejagnu.texi (which is, of course, the reason that I left those warnings on) and cleaned up the various whitespace irregularities in the manual. This was more involved than a simple M-x whitespace-cleanup because several examples are expected to have certain indentations. I have also aligned the examples of DejaGnu output with the current output (looking at runtest.log from a recent run of the DejaGnu testsuite) with respect to spacing, but have not otherwise changed the actual text in this patch.

----
ChangeLog entry:
        * doc/dejagnu.texi: Clean up whitespace.  Some indented examples
        were changed to use the Texinfo "@ " command (yes, that really is
        a space character) to preserve correct indentation.  The "@ "
        command is treated as a single space by Tex and makeinfo, but
        prevents Emacs from complaining about indentation using spaces
        instead of tabs.  Several examples also had various indentation
        irregularities that appeared in the output; these are also fixed.
----
patch:
----
diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi
index b5dbc0a..8e1dae4 100644
--- a/doc/dejagnu.texi
+++ b/doc/dejagnu.texi
@@ -148,7 +148,7 @@ beginnings.

DejaGnu offers several advantages for testing:

address@hidden address@hidden

@item
The flexibility and consistency of the DejaGnu framework make it easy to
@@ -245,7 +245,7 @@ DejaGnu grew out of the internal needs of Cygnus Solutions 
(formerly
Cygnus Support). Cygnus maintained and enhanced a variety of free
programs in many different environments and needed a testing tool that:

address@hidden address@hidden

@item
was useful to developers while fixing bugs;
@@ -358,7 +358,7 @@ Here are some of the ways a test may wind up
@emph{UNRESOLVED}:
@end table

address@hidden address@hidden

@item
Execution of a test is interrupted.
@@ -841,28 +841,28 @@ option to select a different output directory.
@strong{Sample summary log}

@example
-       Test Run By bje on Sat Nov 14 21:04:30 AEDT 2015
-
-                === gdb tests ===
-
-       Running ./gdb.t00/echo.exp ...
-       PASS:   Echo test
-       Running ./gdb.all/help.exp ...
-       PASS:   help add-symbol-file
-       PASS:   help aliases
-       PASS:   help breakpoint "bre" abbreviation
-       FAIL:   help run "r" abbreviation
-       Running ./gdb.t10/crossload.exp ...
-       PASS:   m68k-elf (elf-big) explicit format; loaded
-       XFAIL:  mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types
-
-                === gdb Summary ===
-
-       # of expected passes 5
-       # of expected failures 1
-       # of unexpected failures 1
-       /usr/latest/bin/gdb version 4.6.5 -q
- +Test Run By bje on Sat Nov 14 21:04:30 AEDT 2015
+
+@                === gdb tests ===
+
+Running ./gdb.t00/echo.exp ...
+PASS:   Echo test
+Running ./gdb.all/help.exp ...
+PASS:   help add-symbol-file
+PASS:   help aliases
+PASS:   help breakpoint "bre" abbreviation
+FAIL:   help run "r" abbreviation
+Running ./gdb.t10/crossload.exp ...
+PASS:   m68k-elf (elf-big) explicit format; loaded
+XFAIL:  mips-ecoff (ecoff-bigmips) "ptype v_signed_char" signed C types
+
+@                === gdb Summary ===
+
+# of expected passes            5
+# of expected failures          1
+# of unexpected failures        1
+/usr/latest/bin/gdb version 4.6.5 -q
+
@end example

@node Detailed log file, Debug log file, Summary log file, Output Files
@@ -879,38 +879,38 @@ a different output directory.
@strong{Sample detailed log for g++ tests}

@example
-       Test Run By bje on Sat Nov 14 21:07:23 AEDT 2015
-
-                === g++ tests ===
-
-       Running ./g++.other/t01-1.exp ...
-        PASS:   operate delete
-
-       Running ./g++.other/t01-2.exp ...
-        FAIL:   i960 bug EOF
-       p0000646.C: In function `int  warn_return_1 ()':
-       p0000646.C:109: warning: control reaches end of non-void function
-       p0000646.C: In function `int  warn_return_arg (int)':
-       p0000646.C:117: warning: control reaches end of non-void function
-       p0000646.C: In function `int  warn_return_sum (int, int)':
-       p0000646.C:125: warning: control reaches end of non-void function
-       p0000646.C: In function `struct foo warn_return_foo ()':
-       p0000646.C:132: warning: control reaches end of non-void function
-       Running ./g++.other/t01-4.exp ...
-        FAIL:   abort
-       900403_04.C:8: zero width for bit-field `foo'
-       Running ./g++.other/t01-3.exp ...
-        FAIL:   segment violation
-       900519_12.C:9: parse error before `;'
-       900519_12.C:12: Segmentation violation
-       /usr/latest/bin/gcc: Internal compiler error: program cc1plus got fatal 
signal
-
-                === g++ Summary ===
-
-       # of expected passes 1
-       # of expected failures 3
-       /usr/latest/bin/g++ version cygnus-2.0.1
-       
+Test Run By bje on Sat Nov 14 21:07:23 AEDT 2015
+
+@                === g++ tests ===
+
+Running ./g++.other/t01-1.exp ...
+PASS:   operate delete
+
+Running ./g++.other/t01-2.exp ...
+FAIL:   i960 bug EOF
+p0000646.C: In function `int  warn_return_1 ()':
+p0000646.C:109: warning: control reaches end of non-void function
+p0000646.C: In function `int  warn_return_arg (int)':
+p0000646.C:117: warning: control reaches end of non-void function
+p0000646.C: In function `int  warn_return_sum (int, int)':
+p0000646.C:125: warning: control reaches end of non-void function
+p0000646.C: In function `struct foo warn_return_foo ()':
+p0000646.C:132: warning: control reaches end of non-void function
+Running ./g++.other/t01-4.exp ...
+FAIL:   abort
+900403_04.C:8: zero width for bit-field `foo'
+Running ./g++.other/t01-3.exp ...
+FAIL:   segment violation
+900519_12.C:9: parse error before `;'
+900519_12.C:12: Segmentation violation
+/usr/latest/bin/gcc: Internal compiler error: program cc1plus got fatal signal
+
+@                === g++ Summary ===
+
+# of expected passes            1
+# of expected failures          3
+/usr/latest/bin/g++ version cygnus-2.0.1
+
@end example

@node Debug log file, , Detailed log file, Output Files
@@ -926,8 +926,8 @@ compares with the tool output by each @code{expect} command.
The log messages begin with a message of the form:

@example
-       expect: does @{tool address@hidden (spawn_id n)
-          match pattern @{expected address@hidden
+expect: does @{tool address@hidden (spawn_id n)
+   match pattern @{expected address@hidden
@end example

For every unsuccessful match, Expect issues a @emph{no} after this
@@ -942,38 +942,38 @@ a successful match.
@strong{Example debug log file for a GDB test}

@example
-       send: sent @{break gdbme.c:address@hidden to spawn id 6
-       expect: does @address@hidden (spawn_id 6) match pattern 
@{Breakpoint.*at.* file
-       gdbme.c, line 34.*\(gdb\) address@hidden no
-       @{.*\(gdb\) address@hidden no
-       expect: does @address@hidden (spawn_id 0) match pattern @address@hidden 
? no
-       @{\(y or n\) @}? no
-       @address@hidden no
-       @address@hidden no
-       @address@hidden no
-       @address@hidden no
-       @address@hidden no
-       @address@hidden no
-       break gdbme.c:34
-       Breakpoint 8 at 0x23d8: file gdbme.c, line 34.
-       (gdb) expect: does @{break gdbme.c:34\r\nBreakpoint 8 at 0x23d8:
-       file gdbme.c, line 34.\r\n(gdb) @} (spawn_id 6) match pattern
-       @{Breakpoint.*at.* file gdbme.c, line 34.*\(gdb\) address@hidden yes
-       expect: set expect_out(0,start) @address@hidden
-       expect: set expect_out(0,end) @address@hidden
-       expect: set expect_out(0,string) @{Breakpoint 8 at 0x23d8: file
-       gdbme.c, line 34.\r\n(gdb) @}
-       epect: set expect_out(spawn_id) @address@hidden
-       expect: set expect_out(buffer) @{break gdbme.c:34\r\nBreakpoint 8
-       at 0x23d8: file gdbme.c, line 34.\r\n(gdb) @}
-        PASS:   70      0       breakpoint line number in file
-       
+send: sent @{break gdbme.c:address@hidden to spawn id 6
+expect: does @address@hidden (spawn_id 6) match pattern @{Breakpoint.*at.* file
+gdbme.c, line 34.*\(gdb\) address@hidden no
address@hidden(gdb\) address@hidden no
+expect: does @address@hidden (spawn_id 0) match pattern @address@hidden ? no
address@hidden(y or n\) @}? no
address@hidden@}? no
address@hidden@}? no
address@hidden@}? no
address@hidden@}? no
address@hidden@}? no
address@hidden@}? no
+break gdbme.c:34
+Breakpoint 8 at 0x23d8: file gdbme.c, line 34.
+(gdb) expect: does @{break gdbme.c:34\r\nBreakpoint 8 at 0x23d8:
+file gdbme.c, line 34.\r\n(gdb) @} (spawn_id 6) match pattern
address@hidden file gdbme.c, line 34.*\(gdb\) address@hidden yes
+expect: set expect_out(0,start) @address@hidden
+expect: set expect_out(0,end) @address@hidden
+expect: set expect_out(0,string) @{Breakpoint 8 at 0x23d8: file
+gdbme.c, line 34.\r\n(gdb) @}
+epect: set expect_out(spawn_id) @address@hidden
+expect: set expect_out(buffer) @{break gdbme.c:34\r\nBreakpoint 8
+at 0x23d8: file gdbme.c, line 34.\r\n(gdb) @}
+PASS:   70      0       breakpoint line number in file
+
@end example

This example exhibits three properties of Expect and DejaGnu that might
be surprising at first glance:

address@hidden address@hidden

@item
Empty output for the first attempted match.  The first set of attempted
@@ -1086,18 +1086,18 @@ verbose "Global config file: target_triplet is 
$target_triplet" 2
global target_list

case "$target_triplet" in @{
-    @{ "native" @} @{
-        set target_list "unix"
-    @}
-    @{ "sparc64-*elf" @} @{
-        set target_list "sparc64-sim"
-    @}
-    @{ "mips-*elf" @} @{
-        set target_list "mips-sim wilma barney"
-    @}
-    @{ "mips-lsi-elf" @} @{
-        set target_list "address@hidden,soft-float,address@hidden"
-    @}
+@    @{ "native" @} @{
+@        set target_list "unix"
+@    @}
+@    @{ "sparc64-*elf" @} @{
+@        set target_list "sparc64-sim"
+@    @}
+@    @{ "mips-*elf" @} @{
+@        set target_list "mips-sim wilma barney"
+@    @}
+@    @{ "mips-lsi-elf" @} @{
+@        set target_list "address@hidden,soft-float,address@hidden"
+@    @}
@}
@end example

@@ -1624,38 +1624,38 @@ RUNTESTFLAGS =

# Execute the tests
check: site.exp all
-        $(RUNTEST) $(RUNTESTFLAGS) --tool address@hidden@} --srcdir $(srcdir)
+@        $(RUNTEST) $(RUNTESTFLAGS) --tool address@hidden@} --srcdir $(srcdir)

# Make the local config file
site.exp: ./config.status Makefile
-       @@echo "Making a new config file..."
-        -@@rm -f ./tmp?
-        @@touch site.exp
-
-        -@@mv site.exp site.bak
-        @@echo "## these variables are automatically generated by make ##" > 
./tmp0
-       @@echo "# Do not edit here. If you wish to override these values" >> 
./tmp0
-        @@echo "# add them to the last section" >> ./tmp0
-        @@echo "set host_os address@hidden@}" >> ./tmp0
-        @@echo "set host_alias address@hidden@}" >> ./tmp0
-        @@echo "set host_cpu address@hidden@}" >> ./tmp0
-        @@echo "set host_vendor address@hidden@}" >> ./tmp0
-        @@echo "set target_os address@hidden@}" >> ./tmp0
-        @@echo "set target_alias address@hidden@}" >> ./tmp0
-        @@echo "set target_cpu address@hidden@}" >> ./tmp0
-        @@echo "set target_vendor address@hidden@}" >> ./tmp0
-        @@echo "set host_triplet address@hidden@}" >> ./tmp0
-        @@echo "set target_triplet address@hidden@}">>./tmp0
-        @@echo "set tool binutils" >> ./tmp0
-        @@echo "set srcdir address@hidden@}" >> ./tmp0
-        @@echo "set objdir `pwd`" >> ./tmp0
-        @@echo "set address@hidden@} address@hidden@}" >> ./tmp0
-        @@echo "## All variables above are generated by configure. Do Not Edit ##" 
>> ./tmp0
-        @@cat ./tmp0 > site.exp
-        @@sed < site.bak \
-            -e '1,/^## All variables above are.*##/ d' \
-            >> site.exp
-        -@@rm -f ./tmp?
+@        @@echo "Making a new config file..."
+@        -@@rm -f ./tmp?
+@        @@touch site.exp
+
+@        -@@mv site.exp site.bak
+@        @@echo "## these variables are automatically generated by make ##" > 
./tmp0
+@        @@echo "# Do not edit here. If you wish to override these values" >> 
./tmp0
+@        @@echo "# add them to the last section" >> ./tmp0
+@        @@echo "set host_os address@hidden@}" >> ./tmp0
+@        @@echo "set host_alias address@hidden@}" >> ./tmp0
+@        @@echo "set host_cpu address@hidden@}" >> ./tmp0
+@        @@echo "set host_vendor address@hidden@}" >> ./tmp0
+@        @@echo "set target_os address@hidden@}" >> ./tmp0
+@        @@echo "set target_alias address@hidden@}" >> ./tmp0
+@        @@echo "set target_cpu address@hidden@}" >> ./tmp0
+@        @@echo "set target_vendor address@hidden@}" >> ./tmp0
+@        @@echo "set host_triplet address@hidden@}" >> ./tmp0
+@        @@echo "set target_triplet address@hidden@}">>./tmp0
+@        @@echo "set tool binutils" >> ./tmp0
+@        @@echo "set srcdir address@hidden@}" >> ./tmp0
+@        @@echo "set objdir `pwd`" >> ./tmp0
+@        @@echo "set address@hidden@} address@hidden@}" >> ./tmp0
+@        @@echo "## All variables above are generated by configure. Do Not Edit ##" 
>> ./tmp0
+@        @@cat ./tmp0 > site.exp
+@        @@sed < site.bak \
+@            -e '1,/^## All variables above are.*##/ d' \
+@            >> site.exp
+@        -@@rm -f ./tmp?
@end example

@subsection Simple tool init file for batch programs
@@ -1685,11 +1685,11 @@ proc myprog_exit @address@hidden @address@hidden
proc myprog_version @address@hidden @address@hidden

proc myprog_start @address@hidden @{
-     global address@hidden@}
-     spawn address@hidden@}
-     expect @{
-        -re "" @address@hidden
-     @}
+@     global address@hidden@}
+@     spawn address@hidden@}
+@     expect @{
+@        -re "" @address@hidden
+@     @}
@}

# Start the program running we want to test
@@ -1717,12 +1717,12 @@ should see something like this:
@example
Test Run By bje on Sat Nov 14 15:08:54 AEDT 2015

-          === example tests ===
+@                === example tests ===

Running ./example.0/first-try.exp ...
Testing: one, two...

-          === example Summary ===
+@                === example Summary ===
@end example

There is no output in the summary, because so far the example does not
@@ -1868,7 +1868,7 @@ address@hidden @address@hidden The Starting address as a 
string.
@item
address@hidden address@hidden The starting address as a value.
@item
address@hidden @address@hidden address@hidden @address@hidden
@item
address@hidden address@hidden Whether there is an accurate exit status.
@item
@@ -1901,11 +1901,11 @@ address@hidden Sample address@hidden Description
@item
address@hidden address@hidden Strip the executable of symbols.
@item
address@hidden "0x40050000"@tab address@hidden "0x40050000"@tab
@item
address@hidden "remote"@tab The GDB debugging protocol to use.
@item
address@hidden "0x41000000";@tab address@hidden "0x41000000";@tab
@item
address@hidden "-Wl,-Teva-stub.ld"@tab The linker script to use with a GDB stub.
@item
@@ -1913,7 +1913,7 @@ gdb,address@hidden address@hidden Whether the target can 
take command line arguments.
@item
gdb,address@hidden address@hidden Whether there are signals on the target.
@item
-gdb,address@hidden address@hidden +gdb,address@hidden address@hidden
@item
gdb,address@hidden "-sparclite"@tab Special options to pass to the simulator.
@item
@@ -1925,41 +1925,41 @@ debugged is started.
address@hidden "print/x \$fsr = 0x0"@tab Same as @emph{gdb_init_command}, except
that this is a list, more commands can be added.
@item
address@hidden "0x12020000"@tab address@hidden "0x12020000"@tab
@item
address@hidden "--command gdbinit"@tab address@hidden "--command gdbinit"@tab
@item
address@hidden "\\(gdb960\\)"@tab The prompt GDB is using.
@item
address@hidden "jump start"@tab address@hidden "jump start"@tab
@item
address@hidden "0x12010000"@tab address@hidden "0x12010000"@tab
@item
address@hidden address@hidden Whether to use a GDB stub.
@item
address@hidden address@hidden address@hidden address@hidden
@item
-gcc,address@hidden address@hidden +gcc,address@hidden address@hidden
@item
-gcc,address@hidden address@hidden +gcc,address@hidden address@hidden
@item
-gcc,address@hidden address@hidden +gcc,address@hidden address@hidden
@item
gcc,address@hidden address@hidden Stack size to use with some GCC testcases.
@item
address@hidden "-mieee"@tab address@hidden "-mieee"@tab
@item
address@hidden address@hidden address@hidden address@hidden
@item
address@hidden address@hidden address@hidden address@hidden
@item
address@hidden address@hidden address@hidden address@hidden
@item
address@hidden address@hidden address@hidden address@hidden
@item
address@hidden address@hidden address@hidden address@hidden
@item
address@hidden @address@hidden@tab address@hidden @address@hidden@tab
@end multitable

@node Writing a test case, Debugging a test case, Board file values, Extending 
DejaGnu
@@ -1985,7 +1985,7 @@ in Tcl.

Writing the complete suite of C tests, then, consisted of these steps:

address@hidden address@hidden
@item
Copying all the C code into the test directory.  These tests were based
on the C-torture test created by Torbjorn Granlund (on behalf of the
@@ -2146,7 +2146,7 @@ of buffer space.  Expect discards the entire buffer when 
this occurs.

These are the kinds of debugging information available from DejaGnu:

address@hidden address@hidden

@item
Output controlled by test scripts themselves, explicitly allowed for by
@@ -2908,12 +2908,12 @@ conditional is de-activated.
@strong{Specifying the conditional xfail data}

@example
-         set compiler_conditional_xfail_data @{ \
-              "I sure wish I knew why this was hosed" \
-               "sparc*-sun*-* *-pc-*-*" \
-               @{"-Wall -v" "-O3"@} \
-               @{"-O1" "-Map"@} \
-          @}
+set compiler_conditional_xfail_data @{ \
+     "I sure wish I knew why this was hosed" \
+     "sparc*-sun*-* *-pc-*-*" \
+     @{"-Wall -v" "-O3"@} \
+     @{"-O1" "-Map"@} \
address@hidden
@end example

What this does is it matches only for these two targets if @code{-Wall
@@ -3310,7 +3310,7 @@ redirected.
Name of the host to execute the command on.

@item @code{program}
-Command +Command
@item @code{args}
There are four optional arguments:

@@ -4940,7 +4940,7 @@ was on the right side of the @code{=} if 
@code{foo.exp="..."} was
specified, or an empty string if no such argument is present.

@item @code{testcase}
-The filename of the current testcase under consideration. +The filename of the current testcase under consideration.
@end table

@node diff procedure, setenv procedure, runtest_file_p procedure, Utility 
Procedures
----


-- Jacob



reply via email to

[Prev in Thread] Current Thread [Next in Thread]