--- 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++) {