public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] problems building lchown02.c for uClinux
@ 2010-08-17 18:34 David Marlin
  2010-08-17 19:50 ` Garrett Cooper
  2010-08-17 20:39 ` Mike Frysinger
  0 siblings, 2 replies; 12+ messages in thread
From: David Marlin @ 2010-08-17 18:34 UTC (permalink / raw)
  To: LTP list

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]


'lchown02.c' does not build properly due to calls to mmap and
get_high_address (which references sbrk) when UCLINUX=1 is defined.

Attached is a patch to skip those sections of the test when building for
uClinux.


Signed-off-by: d.marlin <dmarlin@redhat.com>



[-- Attachment #2: lchown02.c.patch --]
[-- Type: text/x-patch, Size: 1808 bytes --]

--- testcases/kernel/syscalls/lchown/lchown02.c.orig	2010-04-01 01:23:10.000000000 -0500
+++ testcases/kernel/syscalls/lchown/lchown02.c	2010-07-07 17:42:51.751689213 -0500
@@ -109,8 +109,12 @@
 int setup3();			/* setup function to test lchown for ENOTDIR */
 int longpath_setup();		/* setup function to test chown for ENAMETOOLONG */
 
-char Longpathname[PATH_MAX + 2];
+#if !defined(UCLINUX)
+char *get_high_address();       /* function from ltp-lib        */
 char High_address_node[64];
+#endif
+
+char Longpathname[PATH_MAX + 2];
 char EXEC_DIR[PATH_MAX];
 char main_test_dir[PATH_MAX + 2];
 
@@ -123,9 +127,11 @@
 	{
 	SFILE1, "Process is not owner/root", EPERM, setup1}, {
 	SFILE2, "No Search permissions to process", EACCES, setup2}, {
+#if !defined(UCLINUX)
 	High_address_node, "Address beyond address space", EFAULT, no_setup},
 	{
 	(char *)-1, "Negative address", EFAULT, no_setup}, {
+#endif
 	Longpathname, "Pathname too long", ENAMETOOLONG, longpath_setup}, {
 	"", "Pathname is empty", ENOENT, no_setup}, {
 	SFILE3, "Path contains regular file", ENOTDIR, setup3}, {
@@ -184,9 +190,11 @@
 			file_name = Test_cases[ind].pathname;
 			test_desc = Test_cases[ind].desc;
 
+#if !defined(UCLINUX)
 			if (file_name == High_address_node) {
 				file_name = (char *)get_high_address();
 			}
+#endif
 
 			/*
 			 * Call lchown(2) to test different test conditions.
@@ -279,12 +287,14 @@
 		tst_brkm(TBROK | TERRNO, cleanup, "chmod() failed");
 	}
 
+#if !defined(UCLINUX)
 	bad_addr = mmap(0, 1, PROT_NONE,
 			MAP_PRIVATE_EXCEPT_UCLINUX | MAP_ANONYMOUS, 0, 0);
 	if (bad_addr == MAP_FAILED) {
 		tst_brkm(TBROK | TERRNO, cleanup, "mmap failed");
 	}
 	Test_cases[3].pathname = bad_addr;
+#endif
 
 	/* call individual setup functions */
 	for (ind = 0; Test_cases[ind].desc != NULL; ind++) {



[-- Attachment #3: Type: text/plain, Size: 224 bytes --]

------------------------------------------------------------------------------
This SF.net email is sponsored by 

Make an app they can't live without
Enter the BlackBerry Developer Challenge
http://p.sf.net/sfu/RIM-dev2dev 

[-- Attachment #4: 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] 12+ messages in thread

end of thread, other threads:[~2010-08-18  0:54 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-17 18:34 [LTP] problems building lchown02.c for uClinux David Marlin
2010-08-17 19:50 ` Garrett Cooper
2010-08-17 20:01   ` David Marlin
2010-08-17 20:13     ` Mike Frysinger
2010-08-17 20:21   ` Mike Frysinger
2010-08-17 22:18     ` Mike Frysinger
2010-08-17 20:39 ` Mike Frysinger
2010-08-17 21:42   ` David Marlin
2010-08-17 22:26     ` Mike Frysinger
2010-08-18  0:13       ` David Marlin
2010-08-18  0:51         ` Garrett Cooper
2010-08-18  0:54         ` Mike Frysinger

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