[LTP] [PATCH v5] Refactor fork05 using new LTP API

Cyril Hrubis chrubis@suse.cz
Tue Sep 10 15:15:42 CEST 2024


Hi!
> +/*\
> + * [Description]
>   *
> - * http://www.sgi.com$
> + * This test verifies that LDT is propagated correctly from parent process to
> + * the child process.
>   *
> - * For further information regarding this notice, see:$
> + * On Friday, May 2, 2003 at 09:47:00AM MST, Ulrich Drepper wrote:
> + *  Robert Williamson wrote:
>   *
> - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/
> + *  I'm getting a SIGSEGV with one of our tests, fork05.c, that apparently
> + *  you wrote (attached below).  The test passes on my 2.5.68 machine running
> + *  SuSE 8.0 (glibc 2.2.5 and Linuxthreads), however it segmentation faults on
> + *  RedHat 9 running 2.5.68.  The test seems to "break" when it attempts to run
> + *  the assembly code....could you take a look at it?
>   *
> + *  There is no need to look at it, I know it cannot work anymore on recent
> + *  systems.  Either change all uses of %gs to %fs or skip the entire patch
> + *  if %gs has a nonzero value.
>   *
> - *    Linux Test Project - Silicon Graphics, Inc.
> - *    TEST IDENTIFIER	: fork05
> - *    EXECUTED BY	: anyone
> - *    TEST TITLE	: Make sure LDT is propagated correctly
> - *    TEST CASE TOTAL	: 1
> - *    CPU TYPES		: i386
> - *    AUTHORS		: Ulrich Drepper
> - *			  Nate Straz
> + * On Sat, Aug 12, 2000 at 12:47:31PM -0700, Ulrich Drepper wrote:

You need an empty line here in order for the next block to render
correctly. Have you checked the metadata.html?

> + *  Ever since the %gs handling was fixed in the 2.3.99 series the
> + *  appended test program worked.  Now with 2.4.0-test6 it's not working
> + *  again.  Looking briefly over the patch from test5 to test6 I haven't
> + *  seen an immediate candidate for the breakage.  It could be missing
> + *  propagation of the LDT to the new process (and therefore an invalid
> + *  segment descriptor) or simply clearing %gs.
>   *

...

> +	if (WIFSIGNALED(status))
> +		tst_res(TFAIL, "Child crashed with %s", tst_strsig(WTERMSIG(status)));

I suppose we should fail the test unless the child returned with 0. I.e.

	if (WIFEXITTED(status) && WEXITSTATUS(status))
		tst_res(TPASS, "Child did exit with 0");
	else
		tst_res(TFAIL, "Child %s", tst_strstatus(status));


Other than these two minor things:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list