Bug 221189

Summary: zfs: bin/chmod/chmod_test:f_flag fails on ZFS, not UFS; UF_IMMUTABLE not supported on ZFS
Product: Base System Reporter: Enji Cooper <ngie>
Component: kernAssignee: freebsd-fs (Nobody) <fs>
Status: New ---    
Severity: Affects Only Me    
Priority: ---    
Version: CURRENT   
Hardware: Any   
OS: Any   

Description Enji Cooper freebsd_committer freebsd_triage 2017-08-02 21:06:24 UTC
I guess UF_IMMUTABLE (uchg) isn't supported on ZFS (!?):

$ sudo kyua debug -k /usr/obj/usr/src/bin/chmod/tests/checkdir/usr/tests/bin/chmod/Kyuafile chmod_test:f_flag
Executing command [ truncate -s 0 foo bar ]
Executing command [ chmod 0750 foo bar ]
Executing command [ chflags uchg foo ]
Fail: incorrect exit status: 1, expected: 0
stdout:

stderr:
chflags: foo: Operation not supported

Files left in work directory after failure: bar, foo
chmod_test:f_flag  ->  failed: atf-check failed; see the output of the test for details
Comment 1 commit-hook freebsd_committer freebsd_triage 2017-08-02 21:19:23 UTC
A commit references this bug:

Author: ngie
Date: Wed Aug  2 21:18:55 UTC 2017
New revision: 321949
URL: https://svnweb.freebsd.org/changeset/base/321949

Log:
  Add expected failures for ZFS

  - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1].
  - :v_flag fails on ZFS because the mode for foo is [always] updated
    unnecessarily.

  get_filesystem(..) (supporting function that was added to the test script)
  is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh .

  MFC after:	1 week
  PR:	221189 [1], 221188 [2]

Changes:
  head/bin/chmod/tests/chmod_test.sh
Comment 2 commit-hook freebsd_committer freebsd_triage 2017-08-02 21:21:28 UTC
A commit references this bug:

Author: ngie
Date: Wed Aug  2 21:20:50 UTC 2017
New revision: 321950
URL: https://svnweb.freebsd.org/changeset/base/321950

Log:
  Always use first parameter passed to get_filesystem(..) instead of discarding it
  and using `.` instead.

  MFC after:	1 week
  MFC with:	r321949
  PR:	221189 [1], 221188 [2]

Changes:
  head/bin/chmod/tests/chmod_test.sh
Comment 3 Mark Linimon freebsd_committer freebsd_triage 2017-08-03 05:11:59 UTC
over to committer.
Comment 4 Enji Cooper freebsd_committer freebsd_triage 2017-08-03 05:22:08 UTC
Still a ZFS bug. I just added a hack to bypass the issue in the tests.
Comment 5 commit-hook freebsd_committer freebsd_triage 2017-08-05 16:58:33 UTC
A commit references this bug:

Author: ngie
Date: Sat Aug  5 16:58:02 UTC 2017
New revision: 322101
URL: https://svnweb.freebsd.org/changeset/base/322101

Log:
  Don't check result of chflags in f_flag_cleanup()

  This will prevent false positives from occurring if the test is run on
  ZFS since ZFS doesn't support fflags throbbing like UFS.

  PR:	221189
  MFC after:	4 days
  MFC with:	r321949

Changes:
  head/bin/chmod/tests/chmod_test.sh
Comment 6 commit-hook freebsd_committer freebsd_triage 2017-08-19 01:22:07 UTC
A commit references this bug:

Author: ngie
Date: Sat Aug 19 01:21:46 UTC 2017
New revision: 322685
URL: https://svnweb.freebsd.org/changeset/base/322685

Log:
  MFC r321949,r321950,r322101:

  r321949:

  Add expected failures for ZFS

  - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1].
  - :v_flag fails on ZFS because the mode for foo is [always] updated
    unnecessarily.

  get_filesystem(..) (supporting function that was added to the test script)
  is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh .

  PR:	221189 [1], 221188 [2]

  r321950:

  Always use first parameter passed to get_filesystem(..) instead of discarding it
  and using `.` instead.

  MFC with:	r321949
  PR:	221189 [1], 221188 [2]

  r322101:

  Don't check result of chflags in f_flag_cleanup()

  This will prevent false positives from occurring if the test is run on
  ZFS since ZFS doesn't support fflags throbbing like UFS.

  PR:	221189
  MFC with:	r321949

Changes:
_U  stable/11/
  stable/11/bin/chmod/tests/chmod_test.sh
Comment 7 commit-hook freebsd_committer freebsd_triage 2017-08-19 01:22:10 UTC
A commit references this bug:

Author: ngie
Date: Sat Aug 19 01:21:47 UTC 2017
New revision: 322685
URL: https://svnweb.freebsd.org/changeset/base/322685

Log:
  MFC r321949,r321950,r322101:

  r321949:

  Add expected failures for ZFS

  - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1].
  - :v_flag fails on ZFS because the mode for foo is [always] updated
    unnecessarily.

  get_filesystem(..) (supporting function that was added to the test script)
  is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh .

  PR:	221189 [1], 221188 [2]

  r321950:

  Always use first parameter passed to get_filesystem(..) instead of discarding it
  and using `.` instead.

  MFC with:	r321949
  PR:	221189 [1], 221188 [2]

  r322101:

  Don't check result of chflags in f_flag_cleanup()

  This will prevent false positives from occurring if the test is run on
  ZFS since ZFS doesn't support fflags throbbing like UFS.

  PR:	221189
  MFC with:	r321949

Changes:
_U  stable/11/
  stable/11/bin/chmod/tests/chmod_test.sh
Comment 8 commit-hook freebsd_committer freebsd_triage 2017-08-19 01:22:14 UTC
A commit references this bug:

Author: ngie
Date: Sat Aug 19 01:21:47 UTC 2017
New revision: 322685
URL: https://svnweb.freebsd.org/changeset/base/322685

Log:
  MFC r321949,r321950,r322101:

  r321949:

  Add expected failures for ZFS

  - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1].
  - :v_flag fails on ZFS because the mode for foo is [always] updated
    unnecessarily.

  get_filesystem(..) (supporting function that was added to the test script)
  is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh .

  PR:	221189 [1], 221188 [2]

  r321950:

  Always use first parameter passed to get_filesystem(..) instead of discarding it
  and using `.` instead.

  MFC with:	r321949
  PR:	221189 [1], 221188 [2]

  r322101:

  Don't check result of chflags in f_flag_cleanup()

  This will prevent false positives from occurring if the test is run on
  ZFS since ZFS doesn't support fflags throbbing like UFS.

  PR:	221189
  MFC with:	r321949

Changes:
_U  stable/11/
  stable/11/bin/chmod/tests/chmod_test.sh
Comment 9 commit-hook freebsd_committer freebsd_triage 2017-08-21 17:21:33 UTC
A commit references this bug:

Author: gjb
Date: Mon Aug 21 17:20:31 UTC 2017
New revision: 322759
URL: https://svnweb.freebsd.org/changeset/base/322759

Log:
  MFC r321949, r321950, r322101:

   r321949 (ngie):
    Add expected failures for ZFS

    - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported.
    - :v_flag fails on ZFS because the mode for foo is [always] updated
      unnecessarily.

    get_filesystem(..) (supporting function that was added to the test
    script) is based on equivalent logic in
    usr.bin/extattr/tests/extattr_test.sh .

   r321950 (ngie):
    Always use first parameter passed to get_filesystem(..) instead of
    discarding it and using `.` instead.

   r322101 (ngie):
    Don't check result of chflags in f_flag_cleanup()

    This will prevent false positives from occurring if the test is run
    on ZFS since ZFS doesn't support fflags throbbing like UFS.

  PR:		221188, 221189
  Approved by:	re (marius)
  Sponsored by:	The FreeBSD Foundation

Changes:
_U  stable/10/
  stable/10/bin/chmod/tests/chmod_test.sh