diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-14 13:59:09 +0100 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2017-03-16 15:33:57 +0100 |
commit | 1becaa953e9728c792526983ee76be5ddd47c3fd (patch) | |
tree | 73657e0872dc5a9e977237e12ee942f17f47d8d8 /testsuites/fstests | |
parent | 66fac03fae3af9dded964b01c89662819dbfc5c2 (diff) |
dosfs: Fix msdos_utf8_normalize_and_fold()
It is all right in case the result uses the full destination buffer.
Without this fix the handling of a maximum 8.3 short file name is
broken.
Update #2928.
Diffstat (limited to 'testsuites/fstests')
-rw-r--r-- | testsuites/fstests/fsdosfsname01/init.c | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/testsuites/fstests/fsdosfsname01/init.c b/testsuites/fstests/fsdosfsname01/init.c index 4d0695872a..7d8dfc15b7 100644 --- a/testsuites/fstests/fsdosfsname01/init.c +++ b/testsuites/fstests/fsdosfsname01/init.c @@ -1087,6 +1087,23 @@ static void test_end_of_string_matches( void ) rtems_test_assert( rc == 0 ); } +static void test_full_8_3_name( void ) +{ + int rc; + + rc = mkdir( MOUNT_DIR "/txtvsbin.txt", S_IRWXU | S_IRWXG | S_IRWXO ); + rtems_test_assert( rc == 0 ); + + rc = unlink( MOUNT_DIR "/txtvsbin.txt" ); + rtems_test_assert( rc == 0 ); +} + +static void test_special_cases( void ) +{ + test_end_of_string_matches(); + test_full_8_3_name(); +} + /* * Main test method */ @@ -1145,7 +1162,7 @@ static void test( void ) "/dev/rdb", NULL); - test_end_of_string_matches(); + test_special_cases(); rc = unmount( MOUNT_DIR ); rtems_test_assert( rc == 0 ); @@ -1215,7 +1232,7 @@ static void test( void ) "/dev/rdb", &mount_opts[1]); - test_end_of_string_matches(); + test_special_cases(); rc = unmount( MOUNT_DIR ); rtems_test_assert( rc == 0 ); @@ -1280,7 +1297,7 @@ static void test( void ) "/dev/rdc", &mount_opts[1]); - test_end_of_string_matches(); + test_special_cases(); rc = unmount( MOUNT_DIR ); rtems_test_assert( rc == 0 ); |