$? is not the expected value.
Add test_ret to store the expected value of $?, fix it.
TMPDIR=mnt_point; fallocate0${i} | grep -q "CONF"
+ test_ret=$?
TMPDIR=$temp_tmpdir
- if [ $? -ne $ret ]; then
+ if [ $test_ret -ne $ret ]; then
Signed-off-by: Zeng Linggang <[email protected]>
---
.../ext4-persist-prealloc/ext4_persist_prealloc_test.sh | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/testcases/kernel/fs/ext4-new-features/ext4-persist-prealloc/ext4_persist_prealloc_test.sh
b/testcases/kernel/fs/ext4-new-features/ext4-persist-prealloc/ext4_persist_prealloc_test.sh
index a6e3a2a..f066f9a 100755
---
a/testcases/kernel/fs/ext4-new-features/ext4-persist-prealloc/ext4_persist_prealloc_test.sh
+++
b/testcases/kernel/fs/ext4-new-features/ext4-persist-prealloc/ext4_persist_prealloc_test.sh
@@ -15,8 +15,8 @@
## for more details.
##
##
##
## You should have received a copy of the GNU General Public License
##
-## along with this program; if not, write to the Free Software
##
-## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
USA ##
+## along with this program; if not, write to the Free Software Foundation,
##
+## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
##
##
##
## Author: Li Zefan <[email protected]>
##
## Miao Xie <[email protected]>
##
@@ -58,9 +58,10 @@ ext4_test_persist_prealloc()
temp_tmpdir=$TMPDIR
TMPDIR=mnt_point; fallocate0${i} | grep -q "CONF"
+ test_ret=$?
TMPDIR=$temp_tmpdir
- if [ $? -ne $ret ]; then
+ if [ $test_ret -ne $ret ]; then
tst_resm TFAIL "fallocate's return value is not
expected"
umount mnt_point
return
--
1.9.3
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list