On Sun, Dec 01, 2024 at 08:10:46PM +0800, Zorro Lang wrote: > On Wed, Nov 27, 2024 at 03:52:00PM +1100, Dave Chinner wrote: > > From: Dave Chinner <dchinner@xxxxxxxxxx> > > > > Using bash directory stacking (pushd, popd, etc) seems to be > > somewhat unreliable. I've been seeing occasional random failures > > from both pushd and popd commands that cause the test to fail, and > > there does not appear to be any reason for the failures occurring. > > > > Rather than wasting time chasing ghosts, just get rid of the > > directory stacking altogether. > > > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> > > --- > > tests/generic/099 | 8 +++----- > > tests/generic/109 | 5 +---- > > tests/generic/135 | 24 +++++++++++------------- > > tests/generic/707 | 7 ++++--- > > 4 files changed, 19 insertions(+), 25 deletions(-) > > > > diff --git a/tests/generic/099 b/tests/generic/099 > > index c7d5932b6..980fd38f3 100755 > > --- a/tests/generic/099 > > +++ b/tests/generic/099 > > @@ -253,15 +253,13 @@ echo "" > > echo "=== Recursive change ACL ===" > > rm -fr root > > mkdir root > > -pushd root >/dev/null > > # create an arbitrary little tree > > -for i in 1 2 3 4 5 6 7 8 9 0 > > -do > > +( cd root ; for i in 1 2 3 4 5 6 7 8 9 0; do > > mkdir -p a/$i > > mkdir -p b/c$i/$i > > touch a/$i/mumble > > -done > > -popd >/dev/null > > +done ) > > + > > chown -R 12345:54321 root > > echo "Change #1..." > > _runas -u 12345 -g 54321 -- chacl -r u::rwx,g::-w-,o::--x root > > diff --git a/tests/generic/109 b/tests/generic/109 > > index 2b0b438cf..894e07167 100755 > > --- a/tests/generic/109 > > +++ b/tests/generic/109 > > @@ -54,10 +54,7 @@ _scratch_mount >> $seqres.full 2>&1 > > # Test different directory sizes to test various directory formats > > for f in 1 2 3 4 5 8 12 18 27 40 60 90 135 202 303 454 681 1020 1530 2295; do > > mkdir $SCRATCH_MNT/dir$f > > - pushd $SCRATCH_MNT/dir$f >/dev/null > > - filldir $f > > - renamedir > > - popd >/dev/null > > + ( cd $SCRATCH_MNT/dir$f ; filldir $f ; renamedir ) > > done > > > > status=0 > > diff --git a/tests/generic/135 b/tests/generic/135 > > index 30c52af72..cb9407fdf 100755 > > --- a/tests/generic/135 > > +++ b/tests/generic/135 > > @@ -21,30 +21,28 @@ _scratch_mount > > cd $SCRATCH_MNT > ^^^^^^^^^^^^^^^ > > Below "_scratch_cycle_mount" fails, due to above line. I'll remove it. I've updated my local tree with this fix and the others that you've noticed. Thanks! -Dave. -- Dave Chinner david@xxxxxxxxxxxxx