fork13: Fix the doc
PATCH 1/1 fork13: Fix the doc
Previously, the use of "-" would cause "Race Description" to be misinterpreted as a subsection. Add a blank line to avoid it and use :: to keep the description as origin text.
--- testcases/kernel/syscalls/fork/fork13.c | 27 +++++++++++++------------ 1 file changed, 14 insertions(+), 13 deletions(-)
testcases/kernel/syscalls/fork/fork13.c +14 -13
@@ -15,21 +15,22 @@* implementation. Furthermore, many shell scripts assume that pid * numbers will not be used for some length of time. * -* [Race Description] -* --------------------------------------------------------------------- -* A B +* **Race Description** :: * -* // pid == offset == n // pid == offset == n + 1 -* test_and_set_bit(offset, map->page) -* test_and_set_bit(offset, map->page); -* pid_ns->last_pid = pid; -* pid_ns->last_pid = pid; -* // pid == n + 1 is freed (wait()) +* --------------------------------------------------------------------- +* A B * -* // Next fork()... -* last = pid_ns->last_pid; // == n -* pid = last + 1; -* --------------------------------------------------------------------- +* // pid == offset == n // pid == offset == n + 1 +* test_and_set_bit(offset, map->page) +* test_and_set_bit(offset, map->page); +* pid_ns->last_pid = pid; +* pid_ns->last_pid = pid; +* // pid == n + 1 is freed (wait()) +* +* // Next fork()... +* last = pid_ns->last_pid; // == n +* pid = last + 1; +* --------------------------------------------------------------------- */ #include <sys/types.h>
Signature · 5 lines
2.47.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Ma Xinjian,
Quoted 1 line
Previously, the use of "-" would cause "Race Description" to be misinterpreted as a subsection.
This is meant to be a subsection, see patchset I yesterday forgot to sent, therefore send it now:
https://patchwork.ozlabs.org/project/ltp/patch/[email protected]/
Quoted 12 lines
Add a blank line to avoid it and use :: to keep the description as origin text.
Signed-off-by Ma Xinjian <[email protected]>--- testcases/kernel/syscalls/fork/fork13.c | 27 +++++++++++++------------ 1 file changed, 14 insertions(+), 13 deletions(-)testcases/kernel/syscalls/fork/fork13.c +0
-0
testcases/kernel/syscalls/fork/fork13.c line 18
Quoted 4 lines
testcases/kernel/syscalls/fork/fork13.c +0
-1@@ -15,21 +15,22 @@* implementation. Furthermore, many shell scripts assume that pid * numbers will not be used for some length of time. * -* [Race Description]
That's why "[Race Description]" should stay. The rest of code formatting looks good, could you please resent?
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
PATCH v2 1/1 fork13: Fix the doc
Use :: to keep the race description as original text when viewed in RST format.
--- testcases/kernel/syscalls/fork/fork13.c | 27 +++++++++++++------------ 1 file changed, 14 insertions(+), 13 deletions(-)
testcases/kernel/syscalls/fork/fork13.c +14 -13
@@ -15,21 +15,22 @@* implementation. Furthermore, many shell scripts assume that pid * numbers will not be used for some length of time. * -* [Race Description] -* --------------------------------------------------------------------- -* A B +* [Race Description] :: * -* // pid == offset == n // pid == offset == n + 1 -* test_and_set_bit(offset, map->page) -* test_and_set_bit(offset, map->page); -* pid_ns->last_pid = pid; -* pid_ns->last_pid = pid; -* // pid == n + 1 is freed (wait()) +* --------------------------------------------------------------------- +* A B * -* // Next fork()... -* last = pid_ns->last_pid; // == n -* pid = last + 1; -* --------------------------------------------------------------------- +* // pid == offset == n // pid == offset == n + 1 +* test_and_set_bit(offset, map->page) +* test_and_set_bit(offset, map->page); +* pid_ns->last_pid = pid; +* pid_ns->last_pid = pid; +* // pid == n + 1 is freed (wait()) +* +* // Next fork()... +* last = pid_ns->last_pid; // == n +* pid = last + 1; +* --------------------------------------------------------------------- */ #include <sys/types.h>
Signature · 5 lines
2.47.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Ma Xinjian,
...
Quoted 7 lines
+++
b/testcases/kernel/syscalls/fork/fork13.ctestcases/kernel/syscalls/fork/fork13.c +0
-2@@ -15,21 +15,22 @@* implementation. Furthermore, many shell scripts assume that pid * numbers will not be used for some length of time. * -* [Race Description] -* ---------------------------------------------------------------------
testcases/kernel/syscalls/fork/fork13.c line 20
Quoted 10 lines
testcases/kernel/syscalls/fork/fork13.c +2
-7-* A B +* [Race Description] :: * -* // pid == offset == n // pid == offset == n + 1 -* test_and_set_bit(offset, map->page) -* test_and_set_bit(offset, map->page); -* pid_ns->last_pid = pid; -* pid_ns->last_pid = pid; -* // pid == n + 1 is freed (wait()) +* ---------------------------------------------------------------------
I removed these --- lines (they were for asciidoc code formatting).
testcases/kernel/syscalls/fork/fork13.c line 24
Quoted 8 lines
testcases/kernel/syscalls/fork/fork13.c +3
-4+* A B * -* // Next fork()... -* last = pid_ns->last_pid; // == n -* pid = last + 1; -* --------------------------------------------------------------------- +* // pid == offset == n // pid == offset == n + 1 +* test_and_set_bit(offset, map->page)
And increase indent on the right side.
Thanks, merged!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp