summaryrefslogtreecommitdiffstats
path: root/testsuites/fstests/fspermission
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2011-08-02 14:24:59 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2011-08-02 14:24:59 +0000
commit6fed43eabc0e78606cf80439c536a00be18fd743 (patch)
treef74fea0e1e6b46a7acea595ad70131a6b25f34df /testsuites/fstests/fspermission
parent2011-08-02 Ricardo Aguirre <el.mastin@ymail.com> (diff)
downloadrtems-6fed43eabc0e78606cf80439c536a00be18fd743.tar.bz2
2011-08-02 Xiang Cui <medivhc@gmail.com>
* configure.ac, fserror/test.c, fslink/test.c, fspermission/test.c, fsrdwr/init.c, fssymlink/test.c, fstime/test.c, mdosfs_support/fs_config.h, mdosfs_support/fs_support.c, mimfs_support/fs_support.c, mrfs_support/fs_config.h, support/fstest.h, support/fstest_support.c, support/ramdisk_support.c, support/ramdisk_support.h: Perform first phase of clean up.
Diffstat (limited to 'testsuites/fstests/fspermission')
-rw-r--r--testsuites/fstests/fspermission/test.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/testsuites/fstests/fspermission/test.c b/testsuites/fstests/fspermission/test.c
index 4750e6d77e..476030f7b0 100644
--- a/testsuites/fstests/fspermission/test.c
+++ b/testsuites/fstests/fspermission/test.c
@@ -40,9 +40,9 @@ void umask_test01(void )
char* directory01="dir01";
const char* wd=__func__;
-
+
mode_t mode=S_IRWXU|S_IRWXG|S_IRWXO ;
-
+
/*
@@ -88,7 +88,7 @@ void umask_test01(void )
tmp_mode = (statbuf.st_mode) & ALLPERMS;
printf("The file mode of %s is %03o\n",file02,(unsigned int)tmp_mode);
rtems_test_assert(tmp_mode==file_mode);
-
+
status = stat (directory01, &statbuf);
rtems_test_assert (status == 0);
tmp_mode = (statbuf.st_mode) & ALLPERMS;
@@ -136,7 +136,7 @@ void umask_test01(void )
tmp_mode = (statbuf.st_mode) & ALLPERMS;
printf("The file mode of %s is %03o\n",file02,(unsigned int)tmp_mode);
rtems_test_assert(tmp_mode==file_mode);
-
+
status = stat (directory01, &statbuf);
rtems_test_assert (status == 0);
tmp_mode = (statbuf.st_mode) & ALLPERMS;
@@ -167,17 +167,17 @@ void test_premission01(void )
char path[20];
char* test_data="Test Data";
char* data_buf;
- size_t len=strlen(test_data);
+ size_t len=strlen(test_data);
int n;
DIR *dp;
const char* wd=__func__;
-
+
mode_t mode=S_IRWXU|S_IRWXG|S_IRWXO ;
uid_t user_id =65534;
gid_t group_id =65534;
-
+
uid_t another_user_id =65533;
gid_t another_group_id =65533;
@@ -234,7 +234,7 @@ void test_premission01(void )
rtems_test_assert(statbuf.st_gid==group_id);
/*
- * Create directory and a file in it for tese
+ * Create directory and a file in it for tese
*/
status=mkdir(directory01,0777);
@@ -253,7 +253,7 @@ void test_premission01(void )
rtems_test_assert(statbuf.st_gid==group_id);
/*
- * Check the file with open and write
+ * Check the file with open and write
*/
/*
@@ -264,7 +264,7 @@ void test_premission01(void )
rtems_test_assert(n==len);
status=close(fd);
rtems_test_assert(status==0);
-
+
fd=open(file02,O_WRONLY);
n=write(fd,test_data,len);
rtems_test_assert(n==len);
@@ -281,7 +281,7 @@ void test_premission01(void )
rtems_test_assert(n==len);
status=close(fd);
rtems_test_assert(status==0);
-
+
EXPECT_ERROR(EACCES,open,file02,O_RDONLY);
EXPECT_ERROR(EACCES,open,file02,O_RDWR);
@@ -349,7 +349,7 @@ void test_premission01(void )
status=seteuid(another_user_id);
rtems_test_assert(status==0);
-
+
EXPECT_ERROR(EACCES,open,file02,O_WRONLY);
EXPECT_ERROR(EACCES,open,file02,O_RDONLY);
EXPECT_ERROR(EACCES,open,file02,O_RDWR);
@@ -395,7 +395,7 @@ void test_premission02(void )
mode_t file_mode=0321;
const char* wd=__func__;
-
+
mode_t mode=S_IRWXU|S_IRWXG|S_IRWXO ;
uid_t user_id =65534;
gid_t group_id =65534;