]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ZTS: Fix incorrect use of libtest in user_run by xattr_003_neg
authorRyan Moeller <ryan@iXsystems.com>
Mon, 9 Nov 2020 22:57:00 +0000 (17:57 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sat, 13 Mar 2021 00:17:30 +0000 (16:17 -0800)
commit9305ff2edf7ff67cdd2cc3d38884fa4f5de6dadd
tree95bc68066b7af4cc151ecb59acfbf110f718d12d
parente0b53a5dbbfdf8f7cb85bfa7f3c4f9650bc590ec
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
tests/zfs-tests/tests/functional/xattr/xattr_003_neg.ksh