generic/478: why eval is so fast?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]



Hi guys.

While playing with the test 478, I've
noticed something very strange. Namely,
this small patch, that only adds eval to
the script:

diff --git a/tests/generic/478 b/tests/generic/478
index 480762d2..45b801d0 100755
--- a/tests/generic/478
+++ b/tests/generic/478
@@ -106,24 +106,24 @@ do_test()
        # print options and getlk output for debug
        echo $* >> $seqres.full 2>&1
        # -s : do setlk
-       $here/src/t_ofd_locks $soptions $TEST_DIR/testfile &
+       eval $here/src/t_ofd_locks $soptions $TEST_DIR/testfile &
        # -g : do getlk
-       $here/src/t_ofd_locks $goptions $TEST_DIR/testfile | \
+       eval $here/src/t_ofd_locks $goptions $TEST_DIR/testfile | \
                tee -a $seqres.full
        wait $!

        # add -F to clone with CLONE_FILES
        soptions="$1 -F"
        # with -F, new locks are always file to place
-       $here/src/t_ofd_locks $soptions $TEST_DIR/testfile &
-       $here/src/t_ofd_locks $goptions $TEST_DIR/testfile | \
+       eval $here/src/t_ofd_locks $soptions $TEST_DIR/testfile &
+       eval $here/src/t_ofd_locks $goptions $TEST_DIR/testfile | \
                tee -a $seqres.full
        wait $!

        # add -d to dup and close
        soptions="$1 -d"
-       $here/src/t_ofd_locks $soptions $TEST_DIR/testfile &
-       $here/src/t_ofd_locks $goptions $TEST_DIR/testfile | \
+       eval $here/src/t_ofd_locks $soptions $TEST_DIR/testfile &
+       eval $here/src/t_ofd_locks $goptions $TEST_DIR/testfile | \
                tee -a $seqres.full
        wait $!
 }


speeds up the test by 50-60%!
This is quite unbelievable, and probably
means such change breaks something.
But I have no idea what and how.
Can anyone come up with a good guess?




[Index of Archives]     [Linux Filesystems Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux