tests: Ensure temp file cleanup on Solaris

Commit 71acc392a3 'tests: Generalize temp dir management' introduced
afstest_mkdtemp and afstest_rmdtemp.  In afstest_rmdtemp, we invoke rm
with option --one-file-system for Linux and Solaris only.

However, this rm option is new for Solaris 11.4; older Solaris versions
of rm do not support --one-file-system.  This causes afstest_rmdtemp to
always silently fail on Solaris 11.3 or older, due to the invalid rm
option.

Correct the #ifdef so ihe --one-file-system option is specified only for
Linux.  An autoconfig test could be added in a future commit.

Change-Id: Idfe8a018698b128463aaa9679dfef4e55deef805
Reviewed-on: https://gerrit.openafs.org/15723
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
This commit is contained in:
Mark Vitale 2024-03-13 22:28:42 -04:00 committed by Michael Meffie
parent f3fb37d608
commit ac9d766b47

View File

@ -91,7 +91,7 @@ afstest_rmdtemp(char *path)
return;
}
afstest_systemlp("rm", "-rf",
#if defined(AFS_LINUX_ENV) || defined(AFS_SUN511_ENV)
#if defined(AFS_LINUX_ENV)
"--one-file-system",
#endif
path, (char*)NULL);