7519 Add smbclient tests

Review Request #916 - Created Feb. 24, 2018 and updated

Information
Gordon Ross
illumos-gate
7519
Reviewers
general

7519 Add smbclient tests

Import the SMB client test from the old STC collection.
Port those tests to STF.
Add Jilin's mmap tests.
Lots of cleanup.

Ran the new tests. Below is some sample output from the new tests.
Note that the 'SKIP' status is for tests that would do thing that
may take a long time (i.e. copying very large files) and the "-f"
option to smbclienttest tells it to skip those tests.

admin@oi-test:/tmp$ /opt/smbclient-tests/bin/smbclienttest -f -s orion
Test: /opt/smbclient-tests/tests/nsmbrc/tp_nsmbrc_001 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/nsmbrc/tp_nsmbrc_002 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/nsmbrc/tp_nsmbrc_003 (run as admin) [00:01] [FAIL]
Test: /opt/smbclient-tests/tests/nsmbrc/tp_nsmbrc_004 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/nsmbrc/tp_nsmbrc_005 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/nsmbrc/tp_nsmbrc_006 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/sharectl/tp_sharectl_001 (run as root) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/sharectl/tp_sharectl_002 (run as root) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/sharectl/tp_sharectl_003 (run as root) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/sharectl/tp_sharectl_004 (run as root) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/sharectl/tp_sharectl_005 (run as root) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/sharectl/tp_sharectl_006 (run as root) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/acl/tp_acl_001 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/acl/tp_acl_002 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/acl/tp_acl_003 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/acl/tp_acl_004 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/acl/tp_acl_005 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_001 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_002 (run as admin) [00:04] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_003 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_004 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_005 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_006 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_007 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_008 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/cptest/tp_cptest_009 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_001 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_002 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_003 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_004 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_005 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_006 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_007 (run as admin) [00:03] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_008 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_009 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_010 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_011 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/create/tp_create_012 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/error/tp_error_001 (run as admin) [00:02] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/error/tp_error_002 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/misc/tp_misc_001 (run as admin) [00:04] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/misc/tp_misc_002 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/misc/tp_misc_003 (run as admin) [00:04] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mkdir/tp_mkdir_001 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mkdir/tp_mkdir_002 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mkdir/tp_mkdir_003 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mkdir/tp_mkdir_004 (run as admin) [00:30] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mkdir/tp_mkdir_005 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mkdir/tp_mkdir_006 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_001 (run as admin) [00:02] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_002 (run as admin) [00:03] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_003 (run as admin) [00:02] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_004 (run as admin) [00:03] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_005 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_006 (run as admin) [00:03] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_007 (run as admin) [00:04] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_008 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_009 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mmap/tp_mmap_010 (run as admin) [00:02] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mvtest/tp_mvtest_001 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mvtest/tp_mvtest_002 (run as admin) [00:04] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mvtest/tp_mvtest_003 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mvtest/tp_mvtest_004 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/mvtest/tp_mvtest_005 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mvtest/tp_mvtest_006 (run as admin) [00:03] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/mvtest/tp_mvtest_007 (run as admin) [00:08] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_001 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_002 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_003 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_004 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_005 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_006 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_007 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_008 (run as admin) [00:04] [PASS]
Test: /opt/smbclient-tests/tests/smbfs/xattr/tp_xattr_009 (run as admin) [00:20] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_001 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_002 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_003 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_004 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_005 (run as admin) [00:02] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_006 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_007 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_008 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_009 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_010 (run as admin) [00:02] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_011 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_012 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_013 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_014 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_015 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbmount/tp_smbmount_016 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_001 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_002 (run as admin) [00:02] [SKIP]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_003 (run as admin) [00:02] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_004 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_005 (run as admin) [00:03] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_006 (run as admin) [00:05] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_007 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_008 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_009 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_010 (run as admin) [00:00] [SKIP]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_011 (run as admin) [00:01] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_012 (run as admin) [00:00] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_013 (run as admin) [00:05] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_014 (run as admin) [00:04] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_015 (run as admin) [00:50] [PASS]
Test: /opt/smbclient-tests/tests/smbutil/tp_smbutil_016 (run as admin) [00:04] [PASS]

(there was one transient failure because this was a somewhat slow VM)

Issues

  • 2
  • 66
  • 3
  • 71
Description From Last Updated
Is there a reason this now requires sudo? Robert Mustacchi Robert Mustacchi
Another case where it seems sudo is now required? Robert Mustacchi Robert Mustacchi
Robert Mustacchi
Gordon Ross
Gordon Ross
Toomas Soome
Robert Mustacchi

Thanks for all the clean up here. I'm generally happy with how things changed here. I appreciate all the work that went into this.

  1. Just to be clear, most of the questions I have here aren't blockers or things that should change. Just trying to understand some of the sudo changes which occurred in a lot more places than those mentioned.
  2. These tests used to all run as root, and many did "su $user -c ..."
    I changed most of them to run as a normal user, but a few things
    then required sudo.

Is there a reason this now requires sudo?
  1. umount with -f required priv.

Another case where it seems sudo is now required?
  1. chown required priv.

Could be $PWD, but doesn't matter.
  1. I thought I got rid of all the "cd somewhere; do things; cd back" logic,
    so perhaps I should look at this one again.

  2. Yeah, that CDIR variable is unused now. missed that in cleanup.

Loading...