public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP]  [Bug Fix] fcntl15 is not completely ported to uClinux
@ 2010-12-29  9:35 Vivi
  2010-12-29 16:37 ` Mike Frysinger
  2011-01-15  5:30 ` Garrett Cooper
  0 siblings, 2 replies; 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: 1513 bytes --]

The code of fcntl15 is not completely ported to uClinux.
So it will fail on uclinux platform.

Bellow is the patch:
--
Index: testcases/kernel/syscalls/fcntl/fcntl15.c
===================================================================
--- testcases/kernel/syscalls/fcntl/fcntl15.c
+++ testcases/kernel/syscalls/fcntl/fcntl15.c
@@ -185,12 +185,17 @@
 }

 #ifdef UCLINUX
-int uc_file_flag, uc_file_mode;
+int uc_file_flag, uc_file_mode, uc_dup_flag;

 void dochild1_uc()
 {
        dochild1(uc_file_flag, uc_file_mode);
 }
+
+void dochild2_uc()
+{
+       dochild2(uc_file_flag, uc_file_mode, uc_dup_flag);
+}
 #endif

 int dofork(int file_flag, int file_mode)
@@ -462,7 +467,15 @@
                tst_rmdir();
                return 1;
        } else if (child2 == 0) {       /* child */
+#ifdef UCLINUX
+               if (self_exec(argv0, "ndddds", 2, file_flag, file_mode,
dup_flag,
+                             parent, tmpname) < 0) {
+                       perror("self_exec failure");
+                       return(1);
+               }
+#else
                dochild2(file_flag, file_mode, dup_flag);
+#endif
        }

        /* parent */
@@ -546,6 +559,10 @@
 #ifdef UCLINUX
        maybe_run_child(&dochild1_uc, "nddds", 1, &uc_file_flag,
                        &uc_file_mode, &parent, tmpname);
+
+       maybe_run_child(&dochild2_uc, "ndddds", 2, &uc_file_flag,
+                       &uc_file_mode, &uc_dup_flag, &parent, tmpname);
+
        argv0 = av[0];
 #endif

--



Best regards,
Vivi Li

[-- Attachment #1.2: Type: text/html, Size: 1841 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

end of thread, other threads:[~2011-01-15  5:30 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] [Bug Fix] fcntl15 is not completely ported to uClinux Vivi
2010-12-29 16:37 ` Mike Frysinger
2011-01-15  5:30 ` Garrett Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox