All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Marlin <dmarlin@redhat.com>
To: LTP list <ltp-list@lists.sourceforge.net>
Subject: [LTP] problems building lchown02.c for uClinux
Date: Tue, 17 Aug 2010 13:34:19 -0500	[thread overview]
Message-ID: <4C6AD62B.2010905@redhat.com> (raw)

[-- 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

             reply	other threads:[~2010-08-17 18:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 18:34 David Marlin [this message]
2010-08-17 19:50 ` [LTP] problems building lchown02.c for uClinux 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C6AD62B.2010905@redhat.com \
    --to=dmarlin@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.