[LU-4220] posix test_1: creat.24 failed: creat("<256 char path>", 0777) did not give correct results Created: 06/Nov/13  Updated: 08/Nov/13  Resolved: 08/Nov/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.1, Lustre 2.5.0
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Jian Yu Assignee: Jian Yu
Resolution: Duplicate Votes: 0
Labels: zfs
Environment:

BASELINE_FS=zfs


Issue Links:
Duplicate
duplicates LU-4219 posix test_1: fpathconf.8 and pathcon... Resolved
Severity: 3
Rank (Obsolete): 11482

 Description   

While running posix test on Lustre with BASELINE_FS=zfs, creat.24 failed as follows:

####################################################
Test Name: creat.24 Failed

	Test Description:
For the XNFS specification:
    Not in use.
For the XSH specification:
    If _POSIX_NO_TRUNC is defined:
        If _POSIX_NAME_MAX <= {NAME_MAX} <= PCTS_NAME_MAX, then
        ENAMETOOLONG in errno and a return value of -1 on a call to
        creat(path, mode) when the length of a pathname component of
        path is longer than the maximum number of bytes in a filename
        {NAME_MAX};
                                  otherwise
        a call to creat(path, mode) when the length of a component of
        path equals PCTS_NAME_MAX does not give an ENAMETOOLONG error.
Posix Ref: Component CREAT Assertion 5.3.2.4-49(C)

	Test Strategy:
IF pathconf() returns a value of NAME_MAX <= PCTS_NAME_MAX, and not -1
  CREATE a file with a filename of length NAME_MAX using creat()
  VERIFY that creat() returned successfully
  CREATE a file with a filename of length NAME_MAX+1 using creat()
  VERIFY that creat() returned -1 and errno was set to ENAMETOOLONG
OTHERWISE
  CREATE a file with a filename of length PCTS_NAME_MAX using creat()
  VERIFY that creat() returned successfully

	Test Information:
creat("<256 char path>", 0777) did not give correct results
RETURN VALUES: expected: 0, observed: -1
ERRNO VALUES: expected: 0 (NO ERROR), observed: 36 (ENAMETOOLONG)

####################################################

Maloo report: https://maloo.whamcloud.com/test_sets/e74b645e-4634-11e3-810a-52540035b04c

The following tests hit the same failure:

Test Name                   Baseline   Lustre Report
mkdir.13                   Succeeded          Failed
mkfifo.11                  Succeeded          Failed
open.38                    Succeeded          Failed


 Comments   
Comment by Jian Yu [ 07/Nov/13 ]

Hi Andreas,

Since ldiskfs/ext4 uses EXT4_NAME_LEN = 255, should I disable the above POSIX sub-tests which use 256 char path?

Comment by Jian Yu [ 08/Nov/13 ]

The patch for LU-4219 can fix this issue. So, the ticket is closed as a duplicate of LU-4219.

Generated at Sat Feb 10 01:40:45 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.