Changeset c40d3c4b in rtems


Ignore:
Timestamp:
Jul 1, 2010, 5:24:35 PM (9 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.11, master
Children:
1fe4042
Parents:
98b785e
Message:

2010-07-01 Vinu Rajashekhar <vinutheraj@…>

PR 1597/cpukit

  • psx13/psx13.scn, psx13/test.c, psxstat/psxstat.scn, psxstat/test.c: Add lchown() and utimes().
Location:
testsuites/psxtests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • testsuites/psxtests/ChangeLog

    r98b785e rc40d3c4b  
     12010-07-01      Vinu Rajashekhar <vinutheraj@gmail.com>
     2
     3        PR 1597/cpukit
     4        * psx13/psx13.scn, psx13/test.c, psxstat/psxstat.scn,
     5        psxstat/test.c: Add lchown() and utimes().
     6
    172010-07-01      Joel Sherrill <joel.sherrill@oarcorp.com>
    28
  • testsuites/psxtests/psx13/psx13.scn

    r98b785e rc40d3c4b  
    88Testing umask().......... Success.
    99Testing utime().......... Success.
     10Testing utimes().......... Success.
    1011Testing pipe()........... Success.
    1112Testing pipe() with NULL........... Failed!!!
  • testsuites/psxtests/psx13/test.c

    r98b785e rc40d3c4b  
    1515 *     umask        - test implemented
    1616 *     utime        - test implemented
     17 *     utimes       - test implemented
    1718 *
    1819 *  COPYRIGHT (c) 1989-2009.
     
    4546int UMaskTest(void);
    4647int UTimeTest(void);
     48int UTimesTest(void);
    4749int PipeTest(void);
    4850int PipeTestNull(void);
     
    406408
    407409    error = utime("testfile1.tst", &time);
     410
     411    if (error == 0) {
     412
     413      /* But, did it set the time? */
     414      stat ("testfile1.tst", &fstat);
     415
     416      if ((fstat.st_atime == 12345) && (fstat.st_mtime == 54321 ))
     417        retval = TRUE;
     418      else
     419        retval = FALSE;
     420    }
     421
     422    else
     423      retval = FALSE;
     424  }
     425
     426  /* assert (retval == TRUE);*/
     427
     428  return (retval);
     429}
     430
     431/* ---------------------------------------------------------------
     432 * UTimesTest function
     433 *
     434 * Hits the utimes code. Does NOT test the functionality of the underlying utime
     435 * entry in the IMFS op table.
     436 *
     437 * arguments: none
     438 * assumptions: utimes function available.
     439 * actions: set utimes for an invalid filename.
     440 *          set utimes for a valid filename.
     441 *
     442 * returns: TRUE if time on valid file is set correctly and utimes failed on
     443 *          an invalid filename.
     444 *          FALSE otherwise.
     445 *
     446 * ---------------------------------------------------------------
     447 */
     448
     449int UTimesTest (void)
     450{
     451  int error = 0, retval = FALSE;
     452  struct timeval time[2];
     453  struct stat fstat;
     454
     455  /* First, an invalid filename. */
     456  error = utimes("!This is an =invalid p@thname!!! :)", NULL);
     457
     458  if (error == -1)
     459    retval = TRUE;
     460  else
     461    retval = FALSE;
     462
     463  /* Now, the success test. */
     464  if (retval == TRUE) {
     465
     466    time[0].tv_sec = 12345;
     467    time[1].tv_sec = 54321;
     468
     469    error = utimes("testfile1.tst", &time);
    408470
    409471    if (error == 0) {
     
    664726      printf ("Failed!!!\n");
    665727
     728   printf ("Testing utimes().......... ");
     729    if (UTimesTest() == TRUE)
     730      printf ("Success.\n");
     731    else
     732      printf ("Failed!!!\n");
     733
    666734   printf ("Testing pipe()........... ");
    667735    if (PipeTest() == TRUE)
  • testsuites/psxtests/psxstat/psxstat.scn

    r98b785e rc40d3c4b  
    11*** STAT TEST 01 ***
    2 --->Current Time:  - rtems_clock_get - 09:00:00   12/31/1988
     2--->Current Time:  - rtems_clock_get_tod - 09:00:00   12/31/1988
    33Making directory /my_mount_point/dir1
    44Making directory /my_mount_point/dir2
     
    6161...st_mtime   Sat Dec 31 09:00:00 1988
    6262...st_ctime   Sat Dec 31 09:00:00 1988
     63...st_blksize 0
     64...st_blocks  0
    6365stat( ////my_mount_point/dir1/\//file1\\// ) returned
    64 ...st_dev     (0x0:0x0)
     66...st_dev     (0xfffe:0x1)
    6567...st_ino     b
    6668...st_mode    100004
     
    7375...st_mtime   Sat Dec 31 09:00:00 1988
    7476...st_ctime   Sat Dec 31 09:00:10 1988
     77...st_blksize 0
     78...st_blocks  0
    7579stat( /my_mount_point/dir1/\\/file2 ) returned
    76 ...st_dev     (0x0:0x0)
     80...st_dev     (0xfffe:0x1)
    7781...st_ino     c
    7882...st_mode    100004
     
    8589...st_mtime   Sat Dec 31 09:00:00 1988
    8690...st_ctime   Sat Dec 31 09:00:10 1988
     91...st_blksize 0
     92...st_blocks  0
    8793stat( /my_mount_point/dir1/file3/////\\\ ) returned
    88 ...st_dev     (0x0:0x0)
     94...st_dev     (0xfffe:0x1)
    8995...st_ino     d
    9096...st_mode    100004
     
    97103...st_mtime   Sat Dec 31 09:00:00 1988
    98104...st_ctime   Sat Dec 31 09:00:10 1988
     105...st_blksize 0
     106...st_blocks  0
    99107stat( /my_mount_point/dir1/file4 ) returned
    100 ...st_dev     (0x0:0x0)
     108...st_dev     (0xfffe:0x1)
    101109...st_ino     e
    102110...st_mode    100004
     
    109117...st_mtime   Sat Dec 31 09:00:00 1988
    110118...st_ctime   Sat Dec 31 09:00:10 1988
     119...st_blksize 0
     120...st_blocks  0
    111121stat( /my_mount_point/dir1/dir1/file1 ) returned
    112 ...st_dev     (0x0:0x0)
     122...st_dev     (0xfffe:0x1)
    113123...st_ino     f
    114124...st_mode    100004
     
    121131...st_mtime   Sat Dec 31 09:00:00 1988
    122132...st_ctime   Sat Dec 31 09:00:10 1988
     133...st_blksize 0
     134...st_blocks  0
    123135stat( /my_mount_point/dir1/dir1/ file1 ) returned
    124 ...st_dev     (0x0:0x0)
     136...st_dev     (0xfffe:0x1)
    125137...st_ino     10
    126138...st_mode    100004
     
    133145...st_mtime   Sat Dec 31 09:00:00 1988
    134146...st_ctime   Sat Dec 31 09:00:10 1988
     147...st_blksize 0
     148...st_blocks  0
    135149stat( /my_mount_point/dir1 ) returned
    136150...st_dev     (0x0:0x0)
     
    141155...st_gid     0
    142156...st_rdev    (0x0:0x0)
    143 ...st_size    1608
    144 ...st_atime   Sat Dec 31 09:00:00 1988
    145 ...st_mtime   Sat Dec 31 09:00:00 1988
    146 ...st_ctime   Sat Dec 31 09:00:05 1988
     157...st_size    3140
     158...st_atime   Sat Dec 31 09:00:00 1988
     159...st_mtime   Sat Dec 31 09:00:00 1988
     160...st_ctime   Sat Dec 31 09:00:05 1988
     161...st_blksize 0
     162...st_blocks  0
    147163stat( /my_mount_point/dir2//////\ ) returned
    148164...st_dev     (0x0:0x0)
     
    157173...st_mtime   Sat Dec 31 09:00:00 1988
    158174...st_ctime   Sat Dec 31 09:00:05 1988
     175...st_blksize 0
     176...st_blocks  0
    159177stat( /my_mount_point/dir3 ) returned
    160178...st_dev     (0x0:0x0)
     
    169187...st_mtime   Sat Dec 31 09:00:00 1988
    170188...st_ctime   Sat Dec 31 09:00:05 1988
     189...st_blksize 0
     190...st_blocks  0
    171191stat( /my_mount_point/dir4 ) returned
    172192...st_dev     (0x0:0x0)
     
    181201...st_mtime   Sat Dec 31 09:00:00 1988
    182202...st_ctime   Sat Dec 31 09:00:05 1988
     203...st_blksize 0
     204...st_blocks  0
    183205stat( /my_mount_point/dir1/dir1 ) returned
    184206...st_dev     (0x0:0x0)
     
    189211...st_gid     0
    190212...st_rdev    (0x0:0x0)
    191 ...st_size    536
    192 ...st_atime   Sat Dec 31 09:00:00 1988
    193 ...st_mtime   Sat Dec 31 09:00:00 1988
    194 ...st_ctime   Sat Dec 31 09:00:05 1988
     213...st_size    1040
     214...st_atime   Sat Dec 31 09:00:00 1988
     215...st_mtime   Sat Dec 31 09:00:00 1988
     216...st_ctime   Sat Dec 31 09:00:05 1988
     217...st_blksize 0
     218...st_blocks  0
    195219stat( /my_mount_point/dir1/ dir1///\\ ) returned
    196220...st_dev     (0x0:0x0)
     
    205229...st_mtime   Sat Dec 31 09:00:00 1988
    206230...st_ctime   Sat Dec 31 09:00:05 1988
     231...st_blksize 0
     232...st_blocks  0
    207233stat( /my_mount_point/\/\/\/\/\/\/links\/\/\/\/\/\ ) returned
    208234...st_dev     (0x0:0x0)
     
    213239...st_gid     0
    214240...st_rdev    (0x0:0x0)
    215 ...st_size    6968
    216 ...st_atime   Sat Dec 31 09:00:00 1988
    217 ...st_mtime   Sat Dec 31 09:00:00 1988
    218 ...st_ctime   Sat Dec 31 09:00:05 1988
     241...st_size    15640
     242...st_atime   Sat Dec 31 09:00:00 1988
     243...st_mtime   Sat Dec 31 09:00:00 1988
     244...st_ctime   Sat Dec 31 09:00:05 1988
     245...st_blksize 0
     246...st_blocks  0
    219247
    220248Doing the stat() on all the good relative paths
     
    231259...st_mtime   Sat Dec 31 09:00:00 1988
    232260...st_ctime   Sat Dec 31 09:00:00 1988
     261...st_blksize 0
     262...st_blocks  0
    233263stat( dir1/\//file1\\// ) returned
    234 ...st_dev     (0x0:0x0)
     264...st_dev     (0xfffe:0x1)
    235265...st_ino     b
    236266...st_mode    100004
     
    243273...st_mtime   Sat Dec 31 09:00:00 1988
    244274...st_ctime   Sat Dec 31 09:00:10 1988
     275...st_blksize 0
     276...st_blocks  0
    245277stat( dir1/\\/file2 ) returned
    246 ...st_dev     (0x0:0x0)
     278...st_dev     (0xfffe:0x1)
    247279...st_ino     c
    248280...st_mode    100004
     
    255287...st_mtime   Sat Dec 31 09:00:00 1988
    256288...st_ctime   Sat Dec 31 09:00:10 1988
     289...st_blksize 0
     290...st_blocks  0
    257291stat( dir1/file3/////\\\ ) returned
    258 ...st_dev     (0x0:0x0)
     292...st_dev     (0xfffe:0x1)
    259293...st_ino     d
    260294...st_mode    100004
     
    267301...st_mtime   Sat Dec 31 09:00:00 1988
    268302...st_ctime   Sat Dec 31 09:00:10 1988
     303...st_blksize 0
     304...st_blocks  0
    269305stat( dir1/file4 ) returned
    270 ...st_dev     (0x0:0x0)
     306...st_dev     (0xfffe:0x1)
    271307...st_ino     e
    272308...st_mode    100004
     
    279315...st_mtime   Sat Dec 31 09:00:00 1988
    280316...st_ctime   Sat Dec 31 09:00:10 1988
     317...st_blksize 0
     318...st_blocks  0
    281319stat( dir1/dir1/file1 ) returned
    282 ...st_dev     (0x0:0x0)
     320...st_dev     (0xfffe:0x1)
    283321...st_ino     f
    284322...st_mode    100004
     
    291329...st_mtime   Sat Dec 31 09:00:00 1988
    292330...st_ctime   Sat Dec 31 09:00:10 1988
     331...st_blksize 0
     332...st_blocks  0
    293333stat( dir1/dir1/ file1 ) returned
    294 ...st_dev     (0x0:0x0)
     334...st_dev     (0xfffe:0x1)
    295335...st_ino     10
    296336...st_mode    100004
     
    303343...st_mtime   Sat Dec 31 09:00:00 1988
    304344...st_ctime   Sat Dec 31 09:00:10 1988
     345...st_blksize 0
     346...st_blocks  0
    305347stat( dir1 ) returned
    306348...st_dev     (0x0:0x0)
     
    311353...st_gid     0
    312354...st_rdev    (0x0:0x0)
    313 ...st_size    1608
    314 ...st_atime   Sat Dec 31 09:00:00 1988
    315 ...st_mtime   Sat Dec 31 09:00:00 1988
    316 ...st_ctime   Sat Dec 31 09:00:05 1988
     355...st_size    3140
     356...st_atime   Sat Dec 31 09:00:00 1988
     357...st_mtime   Sat Dec 31 09:00:00 1988
     358...st_ctime   Sat Dec 31 09:00:05 1988
     359...st_blksize 0
     360...st_blocks  0
    317361stat( dir2//////\ ) returned
    318362...st_dev     (0x0:0x0)
     
    327371...st_mtime   Sat Dec 31 09:00:00 1988
    328372...st_ctime   Sat Dec 31 09:00:05 1988
     373...st_blksize 0
     374...st_blocks  0
    329375stat( dir3 ) returned
    330376...st_dev     (0x0:0x0)
     
    339385...st_mtime   Sat Dec 31 09:00:00 1988
    340386...st_ctime   Sat Dec 31 09:00:05 1988
     387...st_blksize 0
     388...st_blocks  0
    341389stat( dir4 ) returned
    342390...st_dev     (0x0:0x0)
     
    351399...st_mtime   Sat Dec 31 09:00:00 1988
    352400...st_ctime   Sat Dec 31 09:00:05 1988
     401...st_blksize 0
     402...st_blocks  0
    353403stat( dir1/dir1 ) returned
    354404...st_dev     (0x0:0x0)
     
    359409...st_gid     0
    360410...st_rdev    (0x0:0x0)
    361 ...st_size    536
    362 ...st_atime   Sat Dec 31 09:00:00 1988
    363 ...st_mtime   Sat Dec 31 09:00:00 1988
    364 ...st_ctime   Sat Dec 31 09:00:05 1988
     411...st_size    1040
     412...st_atime   Sat Dec 31 09:00:00 1988
     413...st_mtime   Sat Dec 31 09:00:00 1988
     414...st_ctime   Sat Dec 31 09:00:05 1988
     415...st_blksize 0
     416...st_blocks  0
    365417stat( dir1/ dir1///\\ ) returned
    366418...st_dev     (0x0:0x0)
     
    375427...st_mtime   Sat Dec 31 09:00:00 1988
    376428...st_ctime   Sat Dec 31 09:00:05 1988
     429...st_blksize 0
     430...st_blocks  0
    377431stat( main.c ) returned
    378 ...st_dev     (0x0:0x0)
     432...st_dev     (0xfffe:0x1)
    379433...st_ino     11
    380434...st_mode    100004
     
    387441...st_mtime   Sat Dec 31 09:00:00 1988
    388442...st_ctime   Sat Dec 31 09:00:00 1988
     443...st_blksize 0
     444...st_blocks  0
    389445
    390446chdir to dev
     
    417473...st_gid     0
    418474...st_rdev    (0x0:0x0)
    419 ...st_size    1608
    420 ...st_atime   Sat Dec 31 09:00:00 1988
    421 ...st_mtime   Sat Dec 31 09:00:00 1988
    422 ...st_ctime   Sat Dec 31 09:00:05 1988
     475...st_size    3140
     476...st_atime   Sat Dec 31 09:00:00 1988
     477...st_mtime   Sat Dec 31 09:00:00 1988
     478...st_ctime   Sat Dec 31 09:00:05 1988
     479...st_blksize 0
     480...st_blocks  0
    423481stat( links/dir2 ) returned
    424482...st_dev     (0x0:0x0)
     
    433491...st_mtime   Sat Dec 31 09:00:00 1988
    434492...st_ctime   Sat Dec 31 09:00:05 1988
     493...st_blksize 0
     494...st_blocks  0
    435495stat( links/dir3 ) returned
    436496...st_dev     (0x0:0x0)
     
    445505...st_mtime   Sat Dec 31 09:00:00 1988
    446506...st_ctime   Sat Dec 31 09:00:05 1988
     507...st_blksize 0
     508...st_blocks  0
    447509stat( links/dir4 ) returned
    448510...st_dev     (0x0:0x0)
     
    457519...st_mtime   Sat Dec 31 09:00:00 1988
    458520...st_ctime   Sat Dec 31 09:00:05 1988
     521...st_blksize 0
     522...st_blocks  0
    459523stat( links/dir1_dir1 ) returned
    460524...st_dev     (0x0:0x0)
     
    465529...st_gid     0
    466530...st_rdev    (0x0:0x0)
    467 ...st_size    536
    468 ...st_atime   Sat Dec 31 09:00:00 1988
    469 ...st_mtime   Sat Dec 31 09:00:00 1988
    470 ...st_ctime   Sat Dec 31 09:00:05 1988
     531...st_size    1040
     532...st_atime   Sat Dec 31 09:00:00 1988
     533...st_mtime   Sat Dec 31 09:00:00 1988
     534...st_ctime   Sat Dec 31 09:00:05 1988
     535...st_blksize 0
     536...st_blocks  0
    471537stat( links/dir1_ dir1 ) returned
    472538...st_dev     (0x0:0x0)
     
    481547...st_mtime   Sat Dec 31 09:00:00 1988
    482548...st_ctime   Sat Dec 31 09:00:05 1988
     549...st_blksize 0
     550...st_blocks  0
    483551stat( links/../links/../links/links ) returned
    484552...st_dev     (0x0:0x0)
     
    489557...st_gid     0
    490558...st_rdev    (0x0:0x0)
    491 ...st_size    6968
    492 ...st_atime   Sat Dec 31 09:00:00 1988
    493 ...st_mtime   Sat Dec 31 09:00:00 1988
    494 ...st_ctime   Sat Dec 31 09:00:05 1988
     559...st_size    15640
     560...st_atime   Sat Dec 31 09:00:00 1988
     561...st_mtime   Sat Dec 31 09:00:00 1988
     562...st_ctime   Sat Dec 31 09:00:05 1988
     563...st_blksize 0
     564...st_blocks  0
    495565stat( links/dir1_file1 ) returned
    496 ...st_dev     (0x0:0x0)
     566...st_dev     (0xfffe:0x1)
    497567...st_ino     b
    498568...st_mode    100004
     
    505575...st_mtime   Sat Dec 31 09:00:00 1988
    506576...st_ctime   Sat Dec 31 09:00:10 1988
     577...st_blksize 0
     578...st_blocks  0
    507579stat( links/dir1_file2 ) returned
    508 ...st_dev     (0x0:0x0)
     580...st_dev     (0xfffe:0x1)
    509581...st_ino     c
    510582...st_mode    100004
     
    517589...st_mtime   Sat Dec 31 09:00:00 1988
    518590...st_ctime   Sat Dec 31 09:00:10 1988
     591...st_blksize 0
     592...st_blocks  0
    519593stat( links/dir1_file3 ) returned
    520 ...st_dev     (0x0:0x0)
     594...st_dev     (0xfffe:0x1)
    521595...st_ino     d
    522596...st_mode    100004
     
    529603...st_mtime   Sat Dec 31 09:00:00 1988
    530604...st_ctime   Sat Dec 31 09:00:10 1988
     605...st_blksize 0
     606...st_blocks  0
    531607stat( links/dir1_file4 ) returned
    532 ...st_dev     (0x0:0x0)
     608...st_dev     (0xfffe:0x1)
    533609...st_ino     e
    534610...st_mode    100004
     
    541617...st_mtime   Sat Dec 31 09:00:00 1988
    542618...st_ctime   Sat Dec 31 09:00:10 1988
     619...st_blksize 0
     620...st_blocks  0
    543621stat( links/dir1_dir1_f1 ) returned
    544 ...st_dev     (0x0:0x0)
     622...st_dev     (0xfffe:0x1)
    545623...st_ino     f
    546624...st_mode    100004
     
    553631...st_mtime   Sat Dec 31 09:00:00 1988
    554632...st_ctime   Sat Dec 31 09:00:10 1988
     633...st_blksize 0
     634...st_blocks  0
    555635stat( links/dir1_dir1 f1 ) returned
    556 ...st_dev     (0x0:0x0)
     636...st_dev     (0xfffe:0x1)
    557637...st_ino     10
    558638...st_mode    100004
     
    565645...st_mtime   Sat Dec 31 09:00:00 1988
    566646...st_ctime   Sat Dec 31 09:00:10 1988
     647...st_blksize 0
     648...st_blocks  0
    567649stat( links/links/links/links_dir1 ) returned
    568650...st_dev     (0x0:0x0)
     
    573655...st_gid     0
    574656...st_rdev    (0x0:0x0)
    575 ...st_size    1608
    576 ...st_atime   Sat Dec 31 09:00:00 1988
    577 ...st_mtime   Sat Dec 31 09:00:00 1988
    578 ...st_ctime   Sat Dec 31 09:00:05 1988
     657...st_size    3140
     658...st_atime   Sat Dec 31 09:00:00 1988
     659...st_mtime   Sat Dec 31 09:00:00 1988
     660...st_ctime   Sat Dec 31 09:00:05 1988
     661...st_blksize 0
     662...st_blocks  0
    579663stat( links//links_dir2 ) returned
    580664...st_dev     (0x0:0x0)
     
    589673...st_mtime   Sat Dec 31 09:00:00 1988
    590674...st_ctime   Sat Dec 31 09:00:05 1988
     675...st_blksize 0
     676...st_blocks  0
    591677stat( links//links_dir3 ) returned
    592678...st_dev     (0x0:0x0)
     
    601687...st_mtime   Sat Dec 31 09:00:00 1988
    602688...st_ctime   Sat Dec 31 09:00:05 1988
     689...st_blksize 0
     690...st_blocks  0
    603691stat( links//links_dir4 ) returned
    604692...st_dev     (0x0:0x0)
     
    613701...st_mtime   Sat Dec 31 09:00:00 1988
    614702...st_ctime   Sat Dec 31 09:00:05 1988
     703...st_blksize 0
     704...st_blocks  0
    615705stat( links//links_dir1_d1 ) returned
    616706...st_dev     (0x0:0x0)
     
    621711...st_gid     0
    622712...st_rdev    (0x0:0x0)
    623 ...st_size    536
    624 ...st_atime   Sat Dec 31 09:00:00 1988
    625 ...st_mtime   Sat Dec 31 09:00:00 1988
    626 ...st_ctime   Sat Dec 31 09:00:05 1988
     713...st_size    1040
     714...st_atime   Sat Dec 31 09:00:00 1988
     715...st_mtime   Sat Dec 31 09:00:00 1988
     716...st_ctime   Sat Dec 31 09:00:05 1988
     717...st_blksize 0
     718...st_blocks  0
    627719stat( links//links_dir1 d1 ) returned
    628720...st_dev     (0x0:0x0)
     
    637729...st_mtime   Sat Dec 31 09:00:00 1988
    638730...st_ctime   Sat Dec 31 09:00:05 1988
     731...st_blksize 0
     732...st_blocks  0
    639733stat( links//links_links ) returned
    640734...st_dev     (0x0:0x0)
     
    645739...st_gid     0
    646740...st_rdev    (0x0:0x0)
    647 ...st_size    6968
    648 ...st_atime   Sat Dec 31 09:00:00 1988
    649 ...st_mtime   Sat Dec 31 09:00:00 1988
    650 ...st_ctime   Sat Dec 31 09:00:05 1988
     741...st_size    15640
     742...st_atime   Sat Dec 31 09:00:00 1988
     743...st_mtime   Sat Dec 31 09:00:00 1988
     744...st_ctime   Sat Dec 31 09:00:05 1988
     745...st_blksize 0
     746...st_blocks  0
    651747stat( links///links_d1_file1 ) returned
    652 ...st_dev     (0x0:0x0)
     748...st_dev     (0xfffe:0x1)
    653749...st_ino     b
    654750...st_mode    100004
     
    661757...st_mtime   Sat Dec 31 09:00:00 1988
    662758...st_ctime   Sat Dec 31 09:00:10 1988
     759...st_blksize 0
     760...st_blocks  0
    663761stat( links///links_d1_file2 ) returned
    664 ...st_dev     (0x0:0x0)
     762...st_dev     (0xfffe:0x1)
    665763...st_ino     c
    666764...st_mode    100004
     
    673771...st_mtime   Sat Dec 31 09:00:00 1988
    674772...st_ctime   Sat Dec 31 09:00:10 1988
     773...st_blksize 0
     774...st_blocks  0
    675775stat( links///links_d1_file3 ) returned
    676 ...st_dev     (0x0:0x0)
     776...st_dev     (0xfffe:0x1)
    677777...st_ino     d
    678778...st_mode    100004
     
    685785...st_mtime   Sat Dec 31 09:00:00 1988
    686786...st_ctime   Sat Dec 31 09:00:10 1988
     787...st_blksize 0
     788...st_blocks  0
    687789stat( links///links_d1_file4 ) returned
    688 ...st_dev     (0x0:0x0)
     790...st_dev     (0xfffe:0x1)
    689791...st_ino     e
    690792...st_mode    100004
     
    697799...st_mtime   Sat Dec 31 09:00:00 1988
    698800...st_ctime   Sat Dec 31 09:00:10 1988
     801...st_blksize 0
     802...st_blocks  0
    699803stat( links///links_d1_d1_f1 ) returned
    700 ...st_dev     (0x0:0x0)
     804...st_dev     (0xfffe:0x1)
    701805...st_ino     f
    702806...st_mode    100004
     
    709813...st_mtime   Sat Dec 31 09:00:00 1988
    710814...st_ctime   Sat Dec 31 09:00:10 1988
     815...st_blksize 0
     816...st_blocks  0
    711817stat( links///links_r1_d1 f1 ) returned
    712 ...st_dev     (0x0:0x0)
     818...st_dev     (0xfffe:0x1)
    713819...st_ino     10
    714820...st_mode    100004
     
    721827...st_mtime   Sat Dec 31 09:00:00 1988
    722828...st_ctime   Sat Dec 31 09:00:10 1988
     829...st_blksize 0
     830...st_blocks  0
    723831chmod of /my_mount_point/dir1/dir1 to Read/Write
    724832
     
    745853Verify with readlink
    746854stat( /my_mount_point/symlinks/a_file_symlink ) returned
    747 ...st_dev     (0x0:0x0)
     855...st_dev     (0xfffe:0x1)
    748856...st_ino     b
    749857...st_mode    100004
     
    756864...st_mtime   Sat Dec 31 09:00:00 1988
    757865...st_ctime   Sat Dec 31 09:00:10 1988
     866...st_blksize 0
     867...st_blocks  0
     868lstat( /my_mount_point/symlinks/a_file_symlink ) returned
     869...st_dev     (0xfffe:0x1)
     870...st_ino     2c
     871...st_mode    120755
     872...st_nlink   1
     873...st_uid     0
     874...st_gid     0
     875...st_rdev    (0x0:0x0)
     876...st_size    0
     877...st_atime   Sat Dec 31 09:00:15 1988
     878...st_mtime   Sat Dec 31 09:00:15 1988
     879...st_ctime   Sat Dec 31 09:00:15 1988
     880...st_blksize 0
     881...st_blocks  0
    758882stat( /my_mount_point/symlinks/a_dir_symlink ) returned
    759883...st_dev     (0x0:0x0)
     
    764888...st_gid     0
    765889...st_rdev    (0x0:0x0)
    766 ...st_size    1876
    767 ...st_atime   Sat Dec 31 09:00:00 1988
    768 ...st_mtime   Sat Dec 31 09:00:00 1988
    769 ...st_ctime   Sat Dec 31 09:00:05 1988
     890...st_size    3560
     891...st_atime   Sat Dec 31 09:00:00 1988
     892...st_mtime   Sat Dec 31 09:00:00 1988
     893...st_ctime   Sat Dec 31 09:00:05 1988
     894...st_blksize 0
     895...st_blocks  0
     896lstat( /my_mount_point/symlinks/a_dir_symlink ) returned
     897...st_dev     (0xfffe:0x1)
     898...st_ino     2d
     899...st_mode    120755
     900...st_nlink   1
     901...st_uid     0
     902...st_gid     0
     903...st_rdev    (0x0:0x0)
     904...st_size    0
     905...st_atime   Sat Dec 31 09:00:15 1988
     906...st_mtime   Sat Dec 31 09:00:15 1988
     907...st_ctime   Sat Dec 31 09:00:15 1988
     908...st_blksize 0
     909...st_blocks  0
    770910stat( /my_mount_point/symlinks/a_link_symlink ) returned
    771911...st_dev     (0x0:0x0)
     
    776916...st_gid     0
    777917...st_rdev    (0x0:0x0)
    778 ...st_size    1876
    779 ...st_atime   Sat Dec 31 09:00:00 1988
    780 ...st_mtime   Sat Dec 31 09:00:00 1988
    781 ...st_ctime   Sat Dec 31 09:00:05 1988
     918...st_size    3560
     919...st_atime   Sat Dec 31 09:00:00 1988
     920...st_mtime   Sat Dec 31 09:00:00 1988
     921...st_ctime   Sat Dec 31 09:00:05 1988
     922...st_blksize 0
     923...st_blocks  0
     924lstat( /my_mount_point/symlinks/a_link_symlink ) returned
     925...st_dev     (0xfffe:0x1)
     926...st_ino     2e
     927...st_mode    120755
     928...st_nlink   1
     929...st_uid     0
     930...st_gid     0
     931...st_rdev    (0x0:0x0)
     932...st_size    0
     933...st_atime   Sat Dec 31 09:00:15 1988
     934...st_mtime   Sat Dec 31 09:00:15 1988
     935...st_ctime   Sat Dec 31 09:00:15 1988
     936...st_blksize 0
     937...st_blocks  0
    782938stat( ../symlinks/no_file ) returned : No such file or directory
     939lstat( ../symlinks/no_file ) returned
     940...st_dev     (0xfffe:0x1)
     941...st_ino     2f
     942...st_mode    120755
     943...st_nlink   1
     944...st_uid     0
     945...st_gid     0
     946...st_rdev    (0x0:0x0)
     947...st_size    0
     948...st_atime   Sat Dec 31 09:00:15 1988
     949...st_mtime   Sat Dec 31 09:00:15 1988
     950...st_ctime   Sat Dec 31 09:00:15 1988
     951...st_blksize 0
     952...st_blocks  0
    783953stat( /my_mount_point/symlinks/a_dir_symlink/a_file_symlink ) returned
    784954...st_dev     (0x0:0x0)
     
    789959...st_gid     0
    790960...st_rdev    (0x0:0x0)
    791 ...st_size    1876
    792 ...st_atime   Sat Dec 31 09:00:00 1988
    793 ...st_mtime   Sat Dec 31 09:00:00 1988
    794 ...st_ctime   Sat Dec 31 09:00:05 1988
     961...st_size    3560
     962...st_atime   Sat Dec 31 09:00:00 1988
     963...st_mtime   Sat Dec 31 09:00:00 1988
     964...st_ctime   Sat Dec 31 09:00:05 1988
     965...st_blksize 0
     966...st_blocks  0
     967lstat( /my_mount_point/symlinks/a_dir_symlink/a_file_symlink ) returned
     968...st_dev     (0xfffe:0x1)
     969...st_ino     30
     970...st_mode    120755
     971...st_nlink   1
     972...st_uid     0
     973...st_gid     0
     974...st_rdev    (0x0:0x0)
     975...st_size    0
     976...st_atime   Sat Dec 31 09:00:15 1988
     977...st_mtime   Sat Dec 31 09:00:15 1988
     978...st_ctime   Sat Dec 31 09:00:15 1988
     979...st_blksize 0
     980...st_blocks  0
    795981Making file 1
    796982Verify with readlink
     
    812998Verify with readlink
    813999stat( 1 ) returned : No such file or directory
     1000lstat( 1 ) returned
     1001...st_dev     (0xfffe:0x1)
     1002...st_ino     32
     1003...st_mode    120755
     1004...st_nlink   1
     1005...st_uid     0
     1006...st_gid     0
     1007...st_rdev    (0x0:0x0)
     1008...st_size    0
     1009...st_atime   Sat Dec 31 09:00:15 1988
     1010...st_mtime   Sat Dec 31 09:00:15 1988
     1011...st_ctime   Sat Dec 31 09:00:15 1988
     1012...st_blksize 0
     1013...st_blocks  0
    8141014stat( 2 ) returned : No such file or directory
     1015lstat( 2 ) returned
     1016...st_dev     (0xfffe:0x1)
     1017...st_ino     33
     1018...st_mode    120755
     1019...st_nlink   1
     1020...st_uid     0
     1021...st_gid     0
     1022...st_rdev    (0x0:0x0)
     1023...st_size    0
     1024...st_atime   Sat Dec 31 09:00:15 1988
     1025...st_mtime   Sat Dec 31 09:00:15 1988
     1026...st_ctime   Sat Dec 31 09:00:15 1988
     1027...st_blksize 0
     1028...st_blocks  0
    8151029stat( 3 ) returned : No such file or directory
     1030lstat( 3 ) returned
     1031...st_dev     (0xfffe:0x1)
     1032...st_ino     34
     1033...st_mode    120755
     1034...st_nlink   1
     1035...st_uid     0
     1036...st_gid     0
     1037...st_rdev    (0x0:0x0)
     1038...st_size    0
     1039...st_atime   Sat Dec 31 09:00:15 1988
     1040...st_mtime   Sat Dec 31 09:00:15 1988
     1041...st_ctime   Sat Dec 31 09:00:15 1988
     1042...st_blksize 0
     1043...st_blocks  0
    8161044stat( 4 ) returned : No such file or directory
     1045lstat( 4 ) returned
     1046...st_dev     (0xfffe:0x1)
     1047...st_ino     35
     1048...st_mode    120755
     1049...st_nlink   1
     1050...st_uid     0
     1051...st_gid     0
     1052...st_rdev    (0x0:0x0)
     1053...st_size    0
     1054...st_atime   Sat Dec 31 09:00:15 1988
     1055...st_mtime   Sat Dec 31 09:00:15 1988
     1056...st_ctime   Sat Dec 31 09:00:15 1988
     1057...st_blksize 0
     1058...st_blocks  0
    8171059stat( 5 ) returned : No such file or directory
     1060lstat( 5 ) returned
     1061...st_dev     (0xfffe:0x1)
     1062...st_ino     36
     1063...st_mode    120755
     1064...st_nlink   1
     1065...st_uid     0
     1066...st_gid     0
     1067...st_rdev    (0x0:0x0)
     1068...st_size    0
     1069...st_atime   Sat Dec 31 09:00:15 1988
     1070...st_mtime   Sat Dec 31 09:00:15 1988
     1071...st_ctime   Sat Dec 31 09:00:15 1988
     1072...st_blksize 0
     1073...st_blocks  0
    8181074stat( 6 ) returned : Too many symbolic links
     1075lstat( 6 ) returned
     1076...st_dev     (0xfffe:0x1)
     1077...st_ino     37
     1078...st_mode    120755
     1079...st_nlink   1
     1080...st_uid     0
     1081...st_gid     0
     1082...st_rdev    (0x0:0x0)
     1083...st_size    0
     1084...st_atime   Sat Dec 31 09:00:15 1988
     1085...st_mtime   Sat Dec 31 09:00:15 1988
     1086...st_ctime   Sat Dec 31 09:00:15 1988
     1087...st_blksize 0
     1088...st_blocks  0
    8191089stat( 7 ) returned : Too many symbolic links
     1090lstat( 7 ) returned
     1091...st_dev     (0xfffe:0x1)
     1092...st_ino     38
     1093...st_mode    120755
     1094...st_nlink   1
     1095...st_uid     0
     1096...st_gid     0
     1097...st_rdev    (0x0:0x0)
     1098...st_size    0
     1099...st_atime   Sat Dec 31 09:00:15 1988
     1100...st_mtime   Sat Dec 31 09:00:15 1988
     1101...st_ctime   Sat Dec 31 09:00:15 1988
     1102...st_blksize 0
     1103...st_blocks  0
    8201104stat( 8 ) returned : Too many symbolic links
     1105lstat( 8 ) returned
     1106...st_dev     (0xfffe:0x1)
     1107...st_ino     39
     1108...st_mode    120755
     1109...st_nlink   1
     1110...st_uid     0
     1111...st_gid     0
     1112...st_rdev    (0x0:0x0)
     1113...st_size    0
     1114...st_atime   Sat Dec 31 09:00:15 1988
     1115...st_mtime   Sat Dec 31 09:00:15 1988
     1116...st_ctime   Sat Dec 31 09:00:15 1988
     1117...st_blksize 0
     1118...st_blocks  0
    8211119stat( 9 ) returned : Too many symbolic links
     1120lstat( 9 ) returned
     1121...st_dev     (0xfffe:0x1)
     1122...st_ino     3a
     1123...st_mode    120755
     1124...st_nlink   1
     1125...st_uid     0
     1126...st_gid     0
     1127...st_rdev    (0x0:0x0)
     1128...st_size    0
     1129...st_atime   Sat Dec 31 09:00:15 1988
     1130...st_mtime   Sat Dec 31 09:00:15 1988
     1131...st_ctime   Sat Dec 31 09:00:15 1988
     1132...st_blksize 0
     1133...st_blocks  0
    8221134chdir to a file should fail with ENOTDIR
    8231135Verify RWX permission on /my_mount_point/dir1 via access
     
    8561168...st_mtime   Sat Dec 31 09:00:00 1988
    8571169...st_ctime   Sat Dec 31 09:00:20 1988
     1170...st_blksize 0
     1171...st_blocks  0
    8581172stat( links//links_dir1 d1 ) returned
    8591173...st_dev     (0x0:0x0)
     
    8681182...st_mtime   Sat Dec 31 09:00:00 1988
    8691183...st_ctime   Sat Dec 31 09:00:20 1988
     1184...st_blksize 0
     1185...st_blocks  0
    8701186Chdir to links/dir1_ dir1
    8711187Chdir to .. should fail with ENOENT
     
    8981214Change group of /////my_mount_point/dir1/\//file1\\//
    8991215stat( /////my_mount_point/dir1/\//file1\\// ) returned
    900 ...st_dev     (0x0:0x0)
     1216...st_dev     (0xfffe:0x1)
    9011217...st_ino     b
    9021218...st_mode    100011
     
    9091225...st_mtime   Sat Dec 31 09:00:00 1988
    9101226...st_ctime   Sat Dec 31 09:00:25 1988
     1227...st_blksize 0
     1228...st_blocks  0
    9111229Change owner of /////my_mount_point/dir1/\//file1\\//
    9121230stat( /////my_mount_point/dir1/\//file1\\// ) returned
    913 ...st_dev     (0x0:0x0)
     1231...st_dev     (0xfffe:0x1)
    9141232...st_ino     b
    9151233...st_mode    100011
     
    9221240...st_mtime   Sat Dec 31 09:00:00 1988
    9231241...st_ctime   Sat Dec 31 09:00:25 1988
     1242...st_blksize 0
     1243...st_blocks  0
    9241244Change group of /my_mount_point/dir1/file2
    9251245stat( /my_mount_point/dir1/file2 ) returned
    926 ...st_dev     (0x0:0x0)
     1246...st_dev     (0xfffe:0x1)
    9271247...st_ino     c
    9281248...st_mode    100004
     
    9351255...st_mtime   Sat Dec 31 09:00:00 1988
    9361256...st_ctime   Sat Dec 31 09:00:25 1988
     1257...st_blksize 0
     1258...st_blocks  0
    9371259Change owner of /my_mount_point/dir1/file2
    9381260stat( /my_mount_point/dir1/file2 ) returned
    939 ...st_dev     (0x0:0x0)
     1261...st_dev     (0xfffe:0x1)
    9401262...st_ino     c
    9411263...st_mode    100004
     
    9481270...st_mtime   Sat Dec 31 09:00:00 1988
    9491271...st_ctime   Sat Dec 31 09:00:25 1988
     1272...st_blksize 0
     1273...st_blocks  0
    9501274Change group of /my_mount_point/dir1/file3
    9511275stat( /my_mount_point/dir1/file3 ) returned
    952 ...st_dev     (0x0:0x0)
     1276...st_dev     (0xfffe:0x1)
    9531277...st_ino     d
    9541278...st_mode    100004
     
    9601284...st_atime   Sat Dec 31 09:00:00 1988
    9611285...st_mtime   Sat Dec 31 09:00:00 1988
    962 ...st_ctime   Sat Dec 31 09:00:26 1988
     1286...st_ctime   Sat Dec 31 09:00:25 1988
     1287...st_blksize 0
     1288...st_blocks  0
    9631289Change owner of /my_mount_point/dir1/file3
    9641290stat( /my_mount_point/dir1/file3 ) returned
    965 ...st_dev     (0x0:0x0)
     1291...st_dev     (0xfffe:0x1)
    9661292...st_ino     d
    9671293...st_mode    100004
     
    9731299...st_atime   Sat Dec 31 09:00:00 1988
    9741300...st_mtime   Sat Dec 31 09:00:00 1988
    975 ...st_ctime   Sat Dec 31 09:00:26 1988
     1301...st_ctime   Sat Dec 31 09:00:25 1988
     1302...st_blksize 0
     1303...st_blocks  0
    9761304Change group of /my_mount_point/dir1/file4
    9771305stat( /my_mount_point/dir1/file4 ) returned
    978 ...st_dev     (0x0:0x0)
     1306...st_dev     (0xfffe:0x1)
    9791307...st_ino     e
    9801308...st_mode    100004
     
    9861314...st_atime   Sat Dec 31 09:00:00 1988
    9871315...st_mtime   Sat Dec 31 09:00:00 1988
    988 ...st_ctime   Sat Dec 31 09:00:26 1988
     1316...st_ctime   Sat Dec 31 09:00:25 1988
     1317...st_blksize 0
     1318...st_blocks  0
    9891319Change owner of /my_mount_point/dir1/file4
    9901320stat( /my_mount_point/dir1/file4 ) returned
    991 ...st_dev     (0x0:0x0)
     1321...st_dev     (0xfffe:0x1)
    9921322...st_ino     e
    9931323...st_mode    100004
     
    9991329...st_atime   Sat Dec 31 09:00:00 1988
    10001330...st_mtime   Sat Dec 31 09:00:00 1988
    1001 ...st_ctime   Sat Dec 31 09:00:26 1988
     1331...st_ctime   Sat Dec 31 09:00:25 1988
     1332...st_blksize 0
     1333...st_blocks  0
    10021334Change group of /my_mount_point/dir1/dir1/file1
    10031335stat( /my_mount_point/dir1/dir1/file1 ) returned
    1004 ...st_dev     (0x0:0x0)
     1336...st_dev     (0xfffe:0x1)
    10051337...st_ino     f
    10061338...st_mode    100004
     
    10121344...st_atime   Sat Dec 31 09:00:00 1988
    10131345...st_mtime   Sat Dec 31 09:00:00 1988
    1014 ...st_ctime   Sat Dec 31 09:00:26 1988
     1346...st_ctime   Sat Dec 31 09:00:25 1988
     1347...st_blksize 0
     1348...st_blocks  0
    10151349Change owner of /my_mount_point/dir1/dir1/file1
    10161350stat( /my_mount_point/dir1/dir1/file1 ) returned
    1017 ...st_dev     (0x0:0x0)
     1351...st_dev     (0xfffe:0x1)
    10181352...st_ino     f
    10191353...st_mode    100004
     
    10251359...st_atime   Sat Dec 31 09:00:00 1988
    10261360...st_mtime   Sat Dec 31 09:00:00 1988
    1027 ...st_ctime   Sat Dec 31 09:00:26 1988
     1361...st_ctime   Sat Dec 31 09:00:25 1988
     1362...st_blksize 0
     1363...st_blocks  0
    10281364Change group of ../../..//my_mount_point/dir1/./././dir1/ file1
    10291365stat( ../../..//my_mount_point/dir1/./././dir1/ file1 ) returned
    1030 ...st_dev     (0x0:0x0)
     1366...st_dev     (0xfffe:0x1)
    10311367...st_ino     10
    10321368...st_mode    100004
     
    10381374...st_atime   Sat Dec 31 09:00:00 1988
    10391375...st_mtime   Sat Dec 31 09:00:00 1988
    1040 ...st_ctime   Sat Dec 31 09:00:26 1988
     1376...st_ctime   Sat Dec 31 09:00:25 1988
     1377...st_blksize 0
     1378...st_blocks  0
    10411379Change owner of ../../..//my_mount_point/dir1/./././dir1/ file1
    10421380stat( ../../..//my_mount_point/dir1/./././dir1/ file1 ) returned
    1043 ...st_dev     (0x0:0x0)
     1381...st_dev     (0xfffe:0x1)
    10441382...st_ino     10
    10451383...st_mode    100004
     
    10511389...st_atime   Sat Dec 31 09:00:00 1988
    10521390...st_mtime   Sat Dec 31 09:00:00 1988
    1053 ...st_ctime   Sat Dec 31 09:00:26 1988
     1391...st_ctime   Sat Dec 31 09:00:25 1988
     1392...st_blksize 0
     1393...st_blocks  0
    10541394Change group of main.c
    10551395stat( main.c ) returned
    1056 ...st_dev     (0x0:0x0)
     1396...st_dev     (0xfffe:0x1)
    10571397...st_ino     11
    10581398...st_mode    100004
     
    10641404...st_atime   Sat Dec 31 09:00:00 1988
    10651405...st_mtime   Sat Dec 31 09:00:00 1988
    1066 ...st_ctime   Sat Dec 31 09:00:26 1988
     1406...st_ctime   Sat Dec 31 09:00:25 1988
     1407...st_blksize 0
     1408...st_blocks  0
    10671409Change owner of main.c
    10681410stat( main.c ) returned
    1069 ...st_dev     (0x0:0x0)
     1411...st_dev     (0xfffe:0x1)
    10701412...st_ino     11
    10711413...st_mode    100004
     
    10771419...st_atime   Sat Dec 31 09:00:00 1988
    10781420...st_mtime   Sat Dec 31 09:00:00 1988
    1079 ...st_ctime   Sat Dec 31 09:00:26 1988
     1421...st_ctime   Sat Dec 31 09:00:25 1988
     1422...st_blksize 0
     1423...st_blocks  0
    10801424Change group of dir1/dir1/../../links/dir1
    10811425stat( dir1/dir1/../../links/dir1 ) returned
     
    10871431...st_gid     1
    10881432...st_rdev    (0x0:0x0)
    1089 ...st_size    1876
    1090 ...st_atime   Sat Dec 31 09:00:00 1988
    1091 ...st_mtime   Sat Dec 31 09:00:00 1988
    1092 ...st_ctime   Sat Dec 31 09:00:31 1988
     1433...st_size    3560
     1434...st_atime   Sat Dec 31 09:00:00 1988
     1435...st_mtime   Sat Dec 31 09:00:00 1988
     1436...st_ctime   Sat Dec 31 09:00:30 1988
     1437...st_blksize 0
     1438...st_blocks  0
    10931439Change owner of dir1/dir1/../../links/dir1
    10941440stat( dir1/dir1/../../links/dir1 ) returned : Permission denied
     
    11051451...st_atime   Sat Dec 31 09:00:00 1988
    11061452...st_mtime   Sat Dec 31 09:00:00 1988
    1107 ...st_ctime   Sat Dec 31 09:00:31 1988
     1453...st_ctime   Sat Dec 31 09:00:30 1988
     1454...st_blksize 0
     1455...st_blocks  0
    11081456Change owner of links/dir2
    11091457stat( links/dir2 ) returned
     
    11181466...st_atime   Sat Dec 31 09:00:00 1988
    11191467...st_mtime   Sat Dec 31 09:00:00 1988
    1120 ...st_ctime   Sat Dec 31 09:00:31 1988
     1468...st_ctime   Sat Dec 31 09:00:30 1988
     1469...st_blksize 0
     1470...st_blocks  0
    11211471Change group of links/dir3
    11221472stat( links/dir3 ) returned
     
    11311481...st_atime   Sat Dec 31 09:00:00 1988
    11321482...st_mtime   Sat Dec 31 09:00:00 1988
    1133 ...st_ctime   Sat Dec 31 09:00:31 1988
     1483...st_ctime   Sat Dec 31 09:00:30 1988
     1484...st_blksize 0
     1485...st_blocks  0
    11341486Change owner of links/dir3
    11351487stat( links/dir3 ) returned
     
    11441496...st_atime   Sat Dec 31 09:00:00 1988
    11451497...st_mtime   Sat Dec 31 09:00:00 1988
    1146 ...st_ctime   Sat Dec 31 09:00:31 1988
     1498...st_ctime   Sat Dec 31 09:00:30 1988
     1499...st_blksize 0
     1500...st_blocks  0
    11471501Change group of links/dir4
    11481502stat( links/dir4 ) returned
     
    11571511...st_atime   Sat Dec 31 09:00:00 1988
    11581512...st_mtime   Sat Dec 31 09:00:00 1988
    1159 ...st_ctime   Sat Dec 31 09:00:31 1988
     1513...st_ctime   Sat Dec 31 09:00:30 1988
     1514...st_blksize 0
     1515...st_blocks  0
    11601516Change owner of links/dir4
    11611517stat( links/dir4 ) returned
     
    11701526...st_atime   Sat Dec 31 09:00:00 1988
    11711527...st_mtime   Sat Dec 31 09:00:00 1988
    1172 ...st_ctime   Sat Dec 31 09:00:31 1988
     1528...st_ctime   Sat Dec 31 09:00:30 1988
     1529...st_blksize 0
     1530...st_blocks  0
    11731531Change group of links/dir1_dir1
    11741532stat( links/dir1_dir1 ) returned
     
    11801538...st_gid     1
    11811539...st_rdev    (0x0:0x0)
    1182 ...st_size    536
    1183 ...st_atime   Sat Dec 31 09:00:00 1988
    1184 ...st_mtime   Sat Dec 31 09:00:00 1988
    1185 ...st_ctime   Sat Dec 31 09:00:31 1988
     1540...st_size    1040
     1541...st_atime   Sat Dec 31 09:00:00 1988
     1542...st_mtime   Sat Dec 31 09:00:00 1988
     1543...st_ctime   Sat Dec 31 09:00:30 1988
     1544...st_blksize 0
     1545...st_blocks  0
    11861546Change owner of links/dir1_dir1
    11871547stat( links/dir1_dir1 ) returned
     
    11931553...st_gid     0
    11941554...st_rdev    (0x0:0x0)
    1195 ...st_size    536
    1196 ...st_atime   Sat Dec 31 09:00:00 1988
    1197 ...st_mtime   Sat Dec 31 09:00:00 1988
    1198 ...st_ctime   Sat Dec 31 09:00:31 1988
     1555...st_size    1040
     1556...st_atime   Sat Dec 31 09:00:00 1988
     1557...st_mtime   Sat Dec 31 09:00:00 1988
     1558...st_ctime   Sat Dec 31 09:00:30 1988
     1559...st_blksize 0
     1560...st_blocks  0
    11991561Change group of links/dir1_ dir1
    12001562stat( links/dir1_ dir1 ) returned : No such file or directory
     
    12101572...st_gid     1
    12111573...st_rdev    (0x0:0x0)
    1212 ...st_size    8844
    1213 ...st_atime   Sat Dec 31 09:00:00 1988
    1214 ...st_mtime   Sat Dec 31 09:00:00 1988
    1215 ...st_ctime   Sat Dec 31 09:00:31 1988
     1574...st_size    21420
     1575...st_atime   Sat Dec 31 09:00:00 1988
     1576...st_mtime   Sat Dec 31 09:00:00 1988
     1577...st_ctime   Sat Dec 31 09:00:30 1988
     1578...st_blksize 0
     1579...st_blocks  0
    12161580Change owner of links/../links/../links/links
    12171581stat( links/../links/../links/links ) returned : Permission denied
     1582Change group of /my_mount_point/symlinks/a_file_symlink
     1583lstat( /my_mount_point/symlinks/a_file_symlink ) returned
     1584...st_dev     (0xfffe:0x1)
     1585...st_ino     2c
     1586...st_mode    120755
     1587...st_nlink   1
     1588...st_uid     0
     1589...st_gid     1
     1590...st_rdev    (0x0:0x0)
     1591...st_size    0
     1592...st_atime   Sat Dec 31 09:00:15 1988
     1593...st_mtime   Sat Dec 31 09:00:15 1988
     1594...st_ctime   Sat Dec 31 09:00:35 1988
     1595...st_blksize 0
     1596...st_blocks  0
     1597Change owner of /my_mount_point/symlinks/a_file_symlink
     1598lstat( /my_mount_point/symlinks/a_file_symlink ) returned
     1599...st_dev     (0xfffe:0x1)
     1600...st_ino     2c
     1601...st_mode    120755
     1602...st_nlink   1
     1603...st_uid     1
     1604...st_gid     0
     1605...st_rdev    (0x0:0x0)
     1606...st_size    0
     1607...st_atime   Sat Dec 31 09:00:15 1988
     1608...st_mtime   Sat Dec 31 09:00:15 1988
     1609...st_ctime   Sat Dec 31 09:00:35 1988
     1610...st_blksize 0
     1611...st_blocks  0
     1612Change group of /my_mount_point/symlinks/a_dir_symlink
     1613lstat( /my_mount_point/symlinks/a_dir_symlink ) returned
     1614...st_dev     (0xfffe:0x1)
     1615...st_ino     2d
     1616...st_mode    120755
     1617...st_nlink   1
     1618...st_uid     0
     1619...st_gid     1
     1620...st_rdev    (0x0:0x0)
     1621...st_size    0
     1622...st_atime   Sat Dec 31 09:00:15 1988
     1623...st_mtime   Sat Dec 31 09:00:15 1988
     1624...st_ctime   Sat Dec 31 09:00:35 1988
     1625...st_blksize 0
     1626...st_blocks  0
     1627Change owner of /my_mount_point/symlinks/a_dir_symlink
     1628lstat( /my_mount_point/symlinks/a_dir_symlink ) returned
     1629...st_dev     (0xfffe:0x1)
     1630...st_ino     2d
     1631...st_mode    120755
     1632...st_nlink   1
     1633...st_uid     1
     1634...st_gid     0
     1635...st_rdev    (0x0:0x0)
     1636...st_size    0
     1637...st_atime   Sat Dec 31 09:00:15 1988
     1638...st_mtime   Sat Dec 31 09:00:15 1988
     1639...st_ctime   Sat Dec 31 09:00:35 1988
     1640...st_blksize 0
     1641...st_blocks  0
     1642Change group of /my_mount_point/symlinks/a_link_symlink
     1643lstat( /my_mount_point/symlinks/a_link_symlink ) returned
     1644...st_dev     (0xfffe:0x1)
     1645...st_ino     2e
     1646...st_mode    120755
     1647...st_nlink   1
     1648...st_uid     0
     1649...st_gid     1
     1650...st_rdev    (0x0:0x0)
     1651...st_size    0
     1652...st_atime   Sat Dec 31 09:00:15 1988
     1653...st_mtime   Sat Dec 31 09:00:15 1988
     1654...st_ctime   Sat Dec 31 09:00:35 1988
     1655...st_blksize 0
     1656...st_blocks  0
     1657Change owner of /my_mount_point/symlinks/a_link_symlink
     1658lstat( /my_mount_point/symlinks/a_link_symlink ) returned
     1659...st_dev     (0xfffe:0x1)
     1660...st_ino     2e
     1661...st_mode    120755
     1662...st_nlink   1
     1663...st_uid     1
     1664...st_gid     0
     1665...st_rdev    (0x0:0x0)
     1666...st_size    0
     1667...st_atime   Sat Dec 31 09:00:15 1988
     1668...st_mtime   Sat Dec 31 09:00:15 1988
     1669...st_ctime   Sat Dec 31 09:00:35 1988
     1670...st_blksize 0
     1671...st_blocks  0
     1672Change group of ../symlinks/no_file
     1673lstat( ../symlinks/no_file ) returned : No such file or directory
     1674Change owner of ../symlinks/no_file
     1675lstat( ../symlinks/no_file ) returned : No such file or directory
     1676Change group of /my_mount_point/symlinks/a_dir_symlink/a_file_symlink
     1677lstat( /my_mount_point/symlinks/a_dir_symlink/a_file_symlink ) returned
     1678...st_dev     (0xfffe:0x1)
     1679...st_ino     30
     1680...st_mode    120755
     1681...st_nlink   1
     1682...st_uid     0
     1683...st_gid     1
     1684...st_rdev    (0x0:0x0)
     1685...st_size    0
     1686...st_atime   Sat Dec 31 09:00:15 1988
     1687...st_mtime   Sat Dec 31 09:00:15 1988
     1688...st_ctime   Sat Dec 31 09:00:35 1988
     1689...st_blksize 0
     1690...st_blocks  0
     1691Change owner of /my_mount_point/symlinks/a_dir_symlink/a_file_symlink
     1692lstat( /my_mount_point/symlinks/a_dir_symlink/a_file_symlink ) returned
     1693...st_dev     (0xfffe:0x1)
     1694...st_ino     30
     1695...st_mode    120755
     1696...st_nlink   1
     1697...st_uid     1
     1698...st_gid     0
     1699...st_rdev    (0x0:0x0)
     1700...st_size    0
     1701...st_atime   Sat Dec 31 09:00:15 1988
     1702...st_mtime   Sat Dec 31 09:00:15 1988
     1703...st_ctime   Sat Dec 31 09:00:35 1988
     1704...st_blksize 0
     1705...st_blocks  0
    12181706
    12191707
  • testsuites/psxtests/psxstat/test.c

    r98b785e rc40d3c4b  
    22 *  This test exercises stat() via fstat() and generates as many of the
    33 *  path evaluation cases as possible.
     4 *
     5 *  This test also exercises lstat() and lchown() when symlinks are
     6 *  involved.
    47 *
    58 *  COPYRIGHT (c) 1989-2009.
     
    165168
    166169/*
    167  *  Do a stat on a single file and report the status.
    168  */
    169 
    170 void stat_a_file(
    171   const char *file
     170 *  Do a stat/lstat on a single file and report the status.
     171 */
     172
     173void stat_a_file_helper(
     174  const char *file,
     175  int         follow_link
    172176)
    173177{
     
    182186  rtems_test_assert( file );
    183187
    184   printf( "stat( %s ) returned ", file );
    185   fflush( stdout );
    186 
    187   status = stat( file, &statbuf );
     188  if ( follow_link ) {
     189    printf( "stat( %s ) returned ", file );
     190    fflush( stdout );
     191    status = stat( file, &statbuf );
     192  } else {
     193    printf( "lstat( %s ) returned ", file );
     194    fflush( stdout );
     195    status = lstat( file, &statbuf );
     196  }
    188197
    189198  if ( status == -1 ) {
     
    212221
    213222/*
     223 *  Do a stat on a single file and report the status.
     224*/
     225void stat_a_file(
     226  const char *file
     227)
     228{
     229  stat_a_file_helper( file, true );
     230}
     231
     232/*
     233 *  Do a lstat on a single file and report the status.
     234 */
     235void lstat_a_file(
     236  const char *file
     237)
     238{
     239  stat_a_file_helper( file, false );
     240}
     241
     242/*
    214243 *  stat() multiple files at a time
    215244 */
     
    229258
    230259/*
    231  *  chown() multiple files at a time
    232  */
    233 void chown_multiple_files(
    234   char **files
     260 *  chown()/lchown() multiple files at a time
     261 */
     262void chown_multiple_files_helper(
     263  char **files,
     264  int    follow_link
    235265)
    236266{
     
    245275  while ( files[i] ) {
    246276    printf("Change group of %s\n", files[i]);
    247     chown( files[i], st_uid, (st_gid+1) );
    248     stat_a_file( files[i] );
     277    if ( follow_link ) {
     278      chown( files[i], st_uid, (st_gid+1) );
     279      stat_a_file( files[i] );
     280    } else {
     281      lchown( files[i], st_uid, (st_gid+1) );
     282      lstat_a_file( files[i] );
     283    }
    249284
    250285    printf("Change owner of %s\n", files[i]);
    251     chown( files[i], (st_uid+1), st_gid );
    252     stat_a_file( files[i] );
     286    if ( follow_link ) {
     287      chown( files[i], (st_uid+1), st_gid );
     288      stat_a_file( files[i] );
     289    } else {
     290      lchown( files[i], (st_uid+1), st_gid );
     291      lstat_a_file( files[i] );
     292    }
    253293    i++;
    254294  }
     
    256296}
    257297
    258 
     298/*
     299 *  chown() multiple files at a time
     300 */
     301void chown_multiple_files(
     302  char **files
     303)
     304{
     305  chown_multiple_files_helper( files, true );
     306}
     307
     308/*
     309 *  lchown() multiple files at a time
     310 */
     311void lchown_multiple_files(
     312  char **files
     313)
     314{
     315  chown_multiple_files_helper( files, false );
     316}
    259317
    260318/*
     
    378436void make_multiple_symlinks(void)
    379437{
    380  int  status;
     438 int  status, i;
    381439
    382440 make_a_symlink( Files[0],             SymLinks[0] );
     
    387445 make_a_symlink( "//my_mount_point/links","/my_mount_point/symlinks/links" );
    388446
    389  stat_a_file( SymLinks[0] );
    390  stat_a_file( SymLinks[1] );
    391  stat_a_file( SymLinks[2] );
    392  stat_a_file( SymLinks[3] );
    393  stat_a_file( SymLinks[4] );
     447 for (i = 0; i < 5; i++) {
     448   stat_a_file( SymLinks[i] );
     449   lstat_a_file( SymLinks[i] );
     450 }
    394451
    395452 status = symlink(  "//links", "bob/frank" );
     
    434491    sprintf( name1, "%d", i );
    435492    stat_a_file( name1 );
     493    lstat_a_file( name1 );
    436494  }
    437495
     
    842900  chown_multiple_files( Links_to_Dirs );
    843901
     902  status = rtems_task_wake_after( TIMEOUT_VALUE );
     903  lchown_multiple_files( SymLinks );
     904
    844905  puts( "\n\n*** END OF STAT TEST 01 ***" );
    845906  rtems_test_exit(0);
Note: See TracChangeset for help on using the changeset viewer.