Changeset a45b2ac in rtems


Ignore:
Timestamp:
Nov 15, 2013, 12:45:01 PM (6 years ago)
Author:
Ralf Kirchner <ralf.kirchner@…>
Branches:
4.11, master
Children:
892abd53
Parents:
f8a39cdc
git-author:
Ralf Kirchner <ralf.kirchner@…> (11/15/13 12:45:01)
git-committer:
Sebastian Huber <sebastian.huber@…> (11/15/13 13:05:59)
Message:

fsdosfsname01: Improve test for duplicate names

File:
1 edited

Legend:

Unmodified
Added
Removed
  • testsuites/fstests/fsdosfsname01/init.c

    rf8a39cdc ra45b2ac  
    2020#include "tmacros.h"
    2121
     22#include <errno.h>
    2223#include <fcntl.h>
    2324#include <dirent.h>
     
    465466      snprintf( dirname, sizeof( dirname ), "%s/%s", start_dir,
    466467                duplicates[index_dir].name_duplicates[index_duplicate] );
     468      errno = 0;
    467469      rc = mkdir( dirname, S_IRWXU | S_IRWXG | S_IRWXO );
    468       rtems_test_assert( rc < 0 );
     470      rtems_test_assert( rc == -1 );
     471      rtems_test_assert( errno == EEXIST );
    469472    }
    470473  }
     
    614617      rc = close( fd );
    615618      rtems_test_assert( rc == 0 );
     619
     620      errno = 0;
     621      fd = open( filename, O_RDWR | O_CREAT | O_EXCL );
     622      rtems_test_assert( fd == -1 );
     623      rtems_test_assert( errno == EEXIST );
    616624    }
    617625
Note: See TracChangeset for help on using the changeset viewer.