All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] FORK_OR_VFORK
@ 2013-09-12  6:12 Stanislav Kholmanskikh
  2013-09-12  9:47 ` chrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Stanislav Kholmanskikh @ 2013-09-12  6:12 UTC (permalink / raw)
  To: ltp-list

Hello!

LTP employs FORK_OR_VFORK macro which is defined as:

#ifdef UCLINUX
#define FORK_OR_VFORK                   vfork
#define MAP_PRIVATE_EXCEPT_UCLINUX      0
#else
#define FORK_OR_VFORK                   fork
#define MAP_PRIVATE_EXCEPT_UCLINUX      MAP_PRIVATE
#endif

So, on UCLINUX it is a vfork call.

But many testcases use this macro and try to use functions other than 
exec() and _exit() inside a child.
Example - syscalls/setfsuid/setfsuid04.c.
And I suppose that because of that fact these testcases may fail on 
UCLINUX (or behave unexpectedly).

Is this situation left intentionally? Does somebody care about this 
issue? Or we simply ignore it.

I'm just curious. :)

Thanks.














------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

* Re: [LTP] FORK_OR_VFORK
  2013-09-12  6:12 [LTP] FORK_OR_VFORK Stanislav Kholmanskikh
@ 2013-09-12  9:47 ` chrubis
  0 siblings, 0 replies; 2+ messages in thread
From: chrubis @ 2013-09-12  9:47 UTC (permalink / raw)
  To: Stanislav Kholmanskikh; +Cc: ltp-list

Hi!
> LTP employs FORK_OR_VFORK macro which is defined as:
> 
> #ifdef UCLINUX
> #define FORK_OR_VFORK                   vfork
> #define MAP_PRIVATE_EXCEPT_UCLINUX      0
> #else
> #define FORK_OR_VFORK                   fork
> #define MAP_PRIVATE_EXCEPT_UCLINUX      MAP_PRIVATE
> #endif
> 
> So, on UCLINUX it is a vfork call.
> 
> But many testcases use this macro and try to use functions other than 
> exec() and _exit() inside a child.
> Example - syscalls/setfsuid/setfsuid04.c.
> And I suppose that because of that fact these testcases may fail on 
> UCLINUX (or behave unexpectedly).
> 
> Is this situation left intentionally? Does somebody care about this 
> issue? Or we simply ignore it.
> 
> I'm just curious. :)

Most of the testcases does vfork() then exec itself with some parameter
in argv[] to create the child, which is correct and as close to fork()
as uClinux can get. See self_exec() in lib/self_exec.c.

There seems to be a few testcases that does just call FORK_OR_VFORK and
use it in a way that violates the specs, these may work or may not, that
depends on actual implementation of vfork in uClinux.

I'm trying not to break any of uClinux code in LTP but as I have no
uClinux hardware nor much interest in fixing it I'm not trying to fix it
actively.

-- 
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
How ServiceNow helps IT people transform IT departments:
1. Consolidate legacy IT systems to a single system of record for IT
2. Standardize and globalize service processes across IT
3. Implement zero-touch automation to replace manual, redundant tasks
http://pubads.g.doubleclick.net/gampad/clk?id=51271111&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

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

end of thread, other threads:[~2013-09-12  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-12  6:12 [LTP] FORK_OR_VFORK Stanislav Kholmanskikh
2013-09-12  9:47 ` chrubis

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.