HomeFreeBSD

ZTS: Fix incorrect use of libtest in user_run by xattr_003_neg

Description

ZTS: Fix incorrect use of libtest in user_run by xattr_003_neg

You can't use user_run to eval ksh functions defined in libtest unless
you include libtest in the user shell.

Fix xattr_003_neg by:

  • include libtest in the user shell
  • *then* run get_xattr
  • assert this fails
  • use variables for filenames so they don't change in the user's shell
  • don't log the contents of /etc/passwd
  • cleanup all byproducts

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #11185

Details

Provenance
freqlabsAuthored on Nov 9 2020, 10:57 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Mar 13 2021, 12:17 AM
Parents
rGe0b53a5dbbfd: ZTS: Use ksh and current environment for user_run
Branches
Unknown
Tags
Unknown