All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] fork13: Fix the doc
@ 2025-02-18  9:43 Ma Xinjian via ltp
  2025-02-18 12:17 ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Ma Xinjian via ltp @ 2025-02-18  9:43 UTC (permalink / raw)
  To: ltp

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.

Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
---
 testcases/kernel/syscalls/fork/fork13.c | 27 +++++++++++++------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/testcases/kernel/syscalls/fork/fork13.c b/testcases/kernel/syscalls/fork/fork13.c
index 3da698e33..9e07c9d4f 100644
--- a/testcases/kernel/syscalls/fork/fork13.c
+++ b/testcases/kernel/syscalls/fork/fork13.c
@@ -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>
-- 
2.47.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] fork13: Fix the doc
  2025-02-18  9:43 [LTP] [PATCH] fork13: Fix the doc Ma Xinjian via ltp
@ 2025-02-18 12:17 ` Petr Vorel
  2025-02-19  5:20   ` [LTP] [PATCH v2] " Ma Xinjian via ltp
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2025-02-18 12:17 UTC (permalink / raw)
  To: Ma Xinjian; +Cc: ltp

Hi Ma Xinjian,

> 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/20250218121553.2470592-1-pvorel@suse.cz/

> Add a blank line to avoid it and use :: to keep the description as origin text.

> Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
> ---
>  testcases/kernel/syscalls/fork/fork13.c | 27 +++++++++++++------------
>  1 file changed, 14 insertions(+), 13 deletions(-)

> diff --git a/testcases/kernel/syscalls/fork/fork13.c b/testcases/kernel/syscalls/fork/fork13.c
> index 3da698e33..9e07c9d4f 100644
> --- a/testcases/kernel/syscalls/fork/fork13.c
> +++ b/testcases/kernel/syscalls/fork/fork13.c
> @@ -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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [LTP] [PATCH v2] fork13: Fix the doc
  2025-02-18 12:17 ` Petr Vorel
@ 2025-02-19  5:20   ` Ma Xinjian via ltp
  2025-02-19  8:55     ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Ma Xinjian via ltp @ 2025-02-19  5:20 UTC (permalink / raw)
  To: ltp, pvorel

Use :: to keep the race description as original text when viewed in RST format.

Signed-off-by: Ma Xinjian <maxj.fnst@fujitsu.com>
---
 testcases/kernel/syscalls/fork/fork13.c | 27 +++++++++++++------------
 1 file changed, 14 insertions(+), 13 deletions(-)

diff --git a/testcases/kernel/syscalls/fork/fork13.c b/testcases/kernel/syscalls/fork/fork13.c
index 3da698e33..add8fc77e 100644
--- a/testcases/kernel/syscalls/fork/fork13.c
+++ b/testcases/kernel/syscalls/fork/fork13.c
@@ -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>
-- 
2.47.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH v2] fork13: Fix the doc
  2025-02-19  5:20   ` [LTP] [PATCH v2] " Ma Xinjian via ltp
@ 2025-02-19  8:55     ` Petr Vorel
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2025-02-19  8:55 UTC (permalink / raw)
  To: Ma Xinjian; +Cc: ltp

Hi Ma Xinjian,

...
> +++ b/testcases/kernel/syscalls/fork/fork13.c
> @@ -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())
> + *    ---------------------------------------------------------------------
I removed these --- lines (they were for asciidoc code formatting).

> + *    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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-02-19  8:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-18  9:43 [LTP] [PATCH] fork13: Fix the doc Ma Xinjian via ltp
2025-02-18 12:17 ` Petr Vorel
2025-02-19  5:20   ` [LTP] [PATCH v2] " Ma Xinjian via ltp
2025-02-19  8:55     ` Petr Vorel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.