You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nfs_lib.sh: Cleanup local and remote directories setup
Logic for creating local and remote directories was on more places.
Create get_local_dir() and get_remote_dir() functions to keep it on
single place. Now both directories are the same, this is a preparation
for "nfs: Run on btrfs, ext4, xfs", which uses TST_ALL_FILESYSTEMS=1
(remote directory will be on the loop device).
local dir is needed in nfs_mount(), but was defined in nfs_setup()
and reused local variable with shell inheritance (ugly!), because there
were all parameters from loop. Similarly, remote dir is needed in
both nfs_mount() and nfs_setup_server(), but created with shell
inheritance in nfs_setup(). Pass these params to nfs_mount() and
nfs_setup_server() and define variables with new functions
get_local_dir() and get_remote_dir().
Use get_remote_dir() in nfs_get_remote_path().
Move cd to local directory to the end of nfs_mount() (it used to cd
after nfs_mount(), but only if -v parameter contained single version,
but it does not harm to always cd).
Link: https://lore.kernel.org/ltp/[email protected]/
Acked-by: Cyril Hrubis <[email protected]>
Signed-off-by: Petr Vorel <[email protected]>
0 commit comments