* [LTP] port several ltp test cases for uClinux platform
@ 2010-12-29 9:35 Vivi
2010-12-29 16:29 ` Mike Frysinger
0 siblings, 1 reply; 3+ messages in thread
From: Vivi @ 2010-12-29 9:35 UTC (permalink / raw)
To: LTP mailing list
[-- Attachment #1.1: Type: text/plain, Size: 4590 bytes --]
Port following ltp test cases for uClinux platform:
--
fcntl17
rt_sigqueueinfo01
exit_group01
umount03
mount03
eventfd01
--
Bellow is the patch:
--
Index: testcases/kernel/syscalls/fcntl/fcntl17.c
===================================================================
--- testcases/kernel/syscalls/fcntl/fcntl17.c
+++ testcases/kernel/syscalls/fcntl/fcntl17.c
@@ -477,7 +477,7 @@
/* parent */
- if ((child_pid2 = fork()) == 0) { /* second child */
+ if ((child_pid2 = FORK_OR_VFORK()) == 0) { /* second
child */
#ifdef UCLINUX
if (self_exec(av[0], "nddddddddd", 2, file_fd,
parent_pipe[0], parent_pipe[1],
@@ -501,7 +501,7 @@
/* parent */
- if ((child_pid3 = fork()) == 0) { /* third child */
+ if ((child_pid3 = FORK_OR_VFORK()) == 0) { /* third
child */
#ifdef UCLINUX
if (self_exec(av[0], "nddddddddd", 3, file_fd,
parent_pipe[0], parent_pipe[1],
Index: testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
===================================================================
--- testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
+++ testcases/kernel/syscalls/rt_sigqueueinfo/rt_sigqueueinfo01.c
@@ -128,7 +128,7 @@
for (lc = 0; TEST_LOOPING(lc); ++lc) {
Tst_count = 0;
for (testno = 0; testno < TST_TOTAL; ++testno) {
- TEST(pid = fork());
+ TEST(pid = FORK_OR_VFORK());
setup();
if (TEST_RETURN < 0) {
tst_resm(TFAIL, "fork() Failed, errno=%d :
%s", TEST_ERRNO,
@@ -146,6 +146,7 @@
strerror(TEST_ERRNO));
}
cleanup();
+ _exit(0);
}
tst_exit();
}
Index: testcases/kernel/syscalls/exit_group/exit_group01.c
===================================================================
--- testcases/kernel/syscalls/exit_group/exit_group01.c
+++ testcases/kernel/syscalls/exit_group/exit_group01.c
@@ -128,7 +128,7 @@
Tst_count = 0;
for (testno = 0; testno < TST_TOTAL; ++testno) {
- TEST(cpid = fork()); //call exit_group()
+ TEST(cpid = FORK_OR_VFORK()); //call exit_group()
if(TEST_RETURN == -1) {
tst_resm(TFAIL, "fork() error ...errno
%d",TEST_ERRNO);
cleanup();
Index: testcases/kernel/syscalls/umount/umount03.c
===================================================================
--- testcases/kernel/syscalls/umount/umount03.c
+++ testcases/kernel/syscalls/umount/umount03.c
@@ -170,7 +170,7 @@
/* reset Tst_count in case we are looping. */
Tst_count = 0;
- switch (fork()) {
+ switch (FORK_OR_VFORK()) {
case -1:
/* fork() failed */
Index: testcases/kernel/syscalls/mount/mount03.c
===================================================================
--- testcases/kernel/syscalls/mount/mount03.c
+++ testcases/kernel/syscalls/mount/mount03.c
@@ -391,7 +391,7 @@
/* Validate MS_NOSUID flag of mount call */
setup_uid();
- if ((pid = fork()) == 0) {
+ if ((pid = FORK_OR_VFORK()) == 0) {
snprintf(file, PATH_MAX, "%ssetuid_test",
Path_name);
if (chmod(file, SUID_MODE) != 0) {
tst_resm(TWARN, "chmod() failed to "
@@ -429,7 +429,7 @@
int pid, status;
char command[PATH_MAX];
- switch (pid = fork()) {
+ switch (pid = FORK_OR_VFORK()) {
case -1:
tst_resm(TWARN, "Unable to fork a child process"
" to exec over! Errno:%d, :%s",
Index: testcases/kernel/syscalls/eventfd/eventfd01.c
===================================================================
--- testcases/kernel/syscalls/eventfd/eventfd01.c
+++ testcases/kernel/syscalls/eventfd/eventfd01.c
@@ -438,7 +438,7 @@
uint64_t to_parent = 0xdeadbeef;
uint64_t dummy;
- cpid = fork();
+ cpid = FORK_OR_VFORK();
if (cpid == -1)
tst_resm(TBROK|TERRNO, "fork() failed");
if (cpid != 0) {
--
Best regards,
Vivi Li
[-- Attachment #1.2: Type: text/html, Size: 5188 bytes --]
[-- Attachment #2: Type: text/plain, Size: 371 bytes --]
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] port several ltp test cases for uClinux platform
2010-12-29 9:35 [LTP] port several ltp test cases for uClinux platform Vivi
@ 2010-12-29 16:29 ` Mike Frysinger
2010-12-30 10:02 ` Cyril Hrubis
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2010-12-29 16:29 UTC (permalink / raw)
To: ltp-list
[-- Attachment #1.1: Type: Text/Plain, Size: 246 bytes --]
On Wednesday, December 29, 2010 04:35:19 Vivi wrote:
> Port following ltp test cases for uClinux platform:
this change is fine, but your e-mail client is word wrapping things and
munging the patch. please resend after fixing that.
-mike
[-- Attachment #1.2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 371 bytes --]
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
[-- Attachment #3: Type: text/plain, Size: 155 bytes --]
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [LTP] port several ltp test cases for uClinux platform
2010-12-29 16:29 ` Mike Frysinger
@ 2010-12-30 10:02 ` Cyril Hrubis
0 siblings, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2010-12-30 10:02 UTC (permalink / raw)
To: Mike Frysinger; +Cc: ltp-list
Hi!
> this change is fine, but your e-mail client is word wrapping things and
> munging the patch. please resend after fixing that.
Well I'm not against porting testcases to any system, but rewriting all
occurences of fork() with FORK_OR_VFORK() seems like something that
should be fixed somewhere in system libraries or with LD_PRELOAD.
I know that on uClinux this could be hard to do, however IMHO this
breaks the rule "don't fix tests to work with broken systems".
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and,
should the need arise, upgrade to a full multi-node Oracle RAC database
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-12-30 9:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-29 9:35 [LTP] port several ltp test cases for uClinux platform Vivi
2010-12-29 16:29 ` Mike Frysinger
2010-12-30 10:02 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox