Skip to contentSkip to conversation

ltp-aiodio: help aiodio test work normally

PATCH New Zorro Lang 2 participants 4 messages Jun 1, 2021 – Jun 3, 2021

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH 1/1 ltp-aiodio: help aiodio test work normally

ltp aiodio related cmdfiles (runtest/ltp-aio*.part*) can't be used, due to they have unfixed path name. Before we run aiodio test, we need to create some files (e.g. junkfile), and give it to the tests. But current cmdfiles use too many $TMPDIR and aiodio.$$ things, e.g:

AD022 time aiocp -b 1k -n 64 -f DIRECT -f SYNC $TMPDIR/aiodio.$$/junkfile $TMPDIR/aiodio.$$/ff2

TMPDIR is a directory created by mktemp ${TMPBASE}/ltp-XXXXXXXXXX, it's not a fixed path. The aiodio.$$ is also can be sure before running ltp. That cause we can't prepare files in the unfixed path. Even the testscripts/ltp-aiodio.sh can't work well either, due to it try to create files in $TMP/aiodio/..., the $TMP is $TMPBASE, not $TMPDIR, and aiodio is not aiodio.$$.

So this patch trys to help runtest/ltp-aio*.part* to use fixed path name, and put all aiodio test related files in $TMPBASE/aiodio/, the $TMPBASE is a fixed pathname comes from runltp -d <directory> option. So after this fix, users will know where they should create files in, no matter running ltp-aiodio.sh or runltp -f runtest/ltp-aio*.part*.

---
 runtest/ltp-aio-stress.part1 | 102 ++++-----
 runtest/ltp-aio-stress.part2 |  20 +-
 runtest/ltp-aiodio.part1     | 428 +++++++++++++++++------------------
 runtest/ltp-aiodio.part3     |  96 ++++----
 runtest/ltp-aiodio.part4     |  28 +--
 testscripts/ltp-aiodio.sh    |  43 ++--
 6 files changed, 355 insertions(+), 362 deletions(-)
runtest/ltp-aio-stress.part1 +51 -51
index a770a40ae..8988a844e 100644
@@ -26,54 +26,54 @@
 #       -x turn off thread stonewalling
 #       -h this message
 #
-ADS1000 aio-stress -I500  -o2 -S -r4   $TMPDIR/file1
-ADS1001 aio-stress -I500  -o2 -S -r8   $TMPDIR/file1
-ADS1002 aio-stress -I500  -o2 -S -r16  $TMPDIR/file1
-ADS1003 aio-stress -I500  -o2 -S -r32  -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS1004 aio-stress -I500  -o2 -S -r64   $TMPDIR/junkfile $TMPDIR/file2
-ADS1005 aio-stress -I500  -o3 -S -r4    $TMPDIR/junkfile $TMPDIR/file2
-ADS1006 aio-stress -I500  -o3 -S -r8   -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS1007 aio-stress -I500  -o3 -S -r16  -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS1008 aio-stress -I500  -o3 -S -r32  -t4  $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file3  $TMPDIR/file4
-ADS1009 aio-stress -I500  -o3 -S -r64  -t4  $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file3  $TMPDIR/file4
-ADS1010 aio-stress -I500  -o3 -S -r128 -t4  $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file3  $TMPDIR/file4
-ADS1011 aio-stress -I500  -o3 -S -r256 -t8  $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file3  $TMPDIR/file4 $TMPDIR/file5  $TMPDIR/file6 $TMPDIR/file7  $TMPDIR/file8
-ADS1012 aio-stress -I500  -o3 -S -r512 -t8  $TMPDIR/junkfile $TMPDIR/file2 $TMPDIR/file3  $TMPDIR/file4 $TMPDIR/file5  $TMPDIR/file6 $TMPDIR/file7  $TMPDIR/file8
-ADS1013 aio-stress -I500  -o2 -O -r4    -t8  $TMPDIR/junkfile $TMPDIR/file2 $TMPDIR/file3  $TMPDIR/file4 $TMPDIR/file5  $TMPDIR/file6 $TMPDIR/file7  $TMPDIR/file8
-ADS1014 aio-stress -I500  -o2 -O -r8         $TMPDIR/file1 $TMPDIR/file2
-ADS1015 aio-stress -I500  -o2 -O -r16        $TMPDIR/file1 $TMPDIR/file2
-ADS1016 aio-stress -I500  -o2 -O -r32   -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS1017 aio-stress -I500  -o2 -O -r64   -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS1018 aio-stress -I500  -o3 -O -r4    -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS1019 aio-stress -I500  -o3 -O -r8    -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS1020 aio-stress -I500  -o3 -O -r16   -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS1021 aio-stress -I500  -o3 -O -r32   -t4  $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file7  $TMPDIR/file8
-ADS1022 aio-stress -I500  -o3 -O -r64   -t4  $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file7  $TMPDIR/file8
-ADS1023 aio-stress -I500  -o3 -O -r128  -t4  $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file7  $TMPDIR/file8
-ADS1024 aio-stress -I500  -o3 -O -r256  -t8  $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file4  $TMPDIR/file3  $TMPDIR/file5  $TMPDIR/file6
-ADS1025 aio-stress -I500  -o3 -O -r512  -t8  $TMPDIR/junkfile $TMPDIR/file2 $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file3  $TMPDIR/file4  $TMPDIR/file5  $TMPDIR/file6
-ADS1026 aio-stress -I500  -o0 -S -r4    -t8  $TMPDIR/junkfile $TMPDIR/file2       $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file3  $TMPDIR/file4  $TMPDIR/file5  $TMPDIR/file6
-ADS1027 aio-stress -I500  -o0 -S -r8           $TMPDIR/file2
-ADS1028 aio-stress -I500  -o0 -S -r16          $TMPDIR/file2
-ADS1029 aio-stress -I500  -o0 -S -r32   -t2    $TMPDIR/junkfile $TMPDIR/file2
-ADS1030 aio-stress -I500  -o0 -S -r64   -t2    $TMPDIR/junkfile $TMPDIR/file2
-ADS1031 aio-stress -I500  -o1 -S -r4    -t2    $TMPDIR/junkfile $TMPDIR/file2
-ADS1032 aio-stress -I500  -o1 -S -r8    -t2    $TMPDIR/junkfile $TMPDIR/file2
-ADS1033 aio-stress -I500  -o1 -S -r16   -t2    $TMPDIR/junkfile $TMPDIR/file2
-ADS1034 aio-stress -I500  -o1 -S -r32   -t4    $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file7  $TMPDIR/file8
-ADS1035 aio-stress -I500  -o1 -S -r64   -t4    $TMPDIR/junkfile $TMPDIR/file2     $TMPDIR/file7  $TMPDIR/file8
-ADS1036 aio-stress -I500  -o1 -S -r128  -t4    $TMPDIR/junkfile $TMPDIR/file2     $TMPDIR/file7  $TMPDIR/file8
-ADS1037 aio-stress -I500  -o1 -S -r256  -t8  $TMPDIR/junkfile $TMPDIR/file2     $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file4  $TMPDIR/file3  $TMPDIR/file5  $TMPDIR/file6
-ADS1038 aio-stress -I500  -o1 -S -r512  -t8  -x $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file3  $TMPDIR/file4  $TMPDIR/file5  $TMPDIR/file6
-ADS1039 aio-stress -I500  -o1 -O -r4    -t8  -x  $TMPDIR/junkfile $TMPDIR/file2        $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file3  $TMPDIR/file4  $TMPDIR/file5  $TMPDIR/file6
-ADS1040 aio-stress -I500  -o1 -O -r8    -t2  -x $TMPDIR/junkfile $TMPDIR/file2
-ADS1041 aio-stress -I500  -o1 -O -r16   -t2  -x  $TMPDIR/junkfile $TMPDIR/file2
-ADS1042 aio-stress -I500  -o1 -O -r32   -t2   $TMPDIR/junkfile $TMPDIR/file2
-ADS1043 aio-stress -I500  -o1 -O -r64   -t2   $TMPDIR/junkfile $TMPDIR/file2
-ADS1044 aio-stress -I500  -o1 -O -r4    -t4   $TMPDIR/junkfile $TMPDIR/file2        $TMPDIR/file7  $TMPDIR/file8
-ADS1045 aio-stress -I500  -o1 -O -r8    -t4   $TMPDIR/junkfile $TMPDIR/file2     $TMPDIR/file7  $TMPDIR/file8
-ADS1046 aio-stress -I500  -o1 -O -r16   -t4   $TMPDIR/junkfile $TMPDIR/file2     $TMPDIR/file7  $TMPDIR/file8
-ADS1047 aio-stress -I500  -o1 -O -r32   -t8   $TMPDIR/junkfile $TMPDIR/file2     $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file4  $TMPDIR/file3  $TMPDIR/file5  $TMPDIR/file6
-ADS1048 aio-stress -I500  -o1 -O -r64   -t8   $TMPDIR/junkfile $TMPDIR/file2  $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file3  $TMPDIR/file4  $TMPDIR/file5  $TMPDIR/file6
-ADS1049 aio-stress -I500  -o1 -O -r128  -t8   $TMPDIR/junkfile $TMPDIR/file2        $TMPDIR/file7  $TMPDIR/file8 $TMPDIR/file3  $TMPDIR/file4  $TMPDIR/file5  $TMPDIR/file6
-ADS1050 aio-stress -I500  -o1 -O -r256  -t2   $TMPDIR/junkfile $TMPDIR/file2
+ADS1000 aio-stress -I500  -o2 -S -r4   $TMPBASE/aiodio/file1
+ADS1001 aio-stress -I500  -o2 -S -r8   $TMPBASE/aiodio/file1
+ADS1002 aio-stress -I500  -o2 -S -r16  $TMPBASE/aiodio/file1
+ADS1003 aio-stress -I500  -o2 -S -r32  -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1004 aio-stress -I500  -o2 -S -r64   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1005 aio-stress -I500  -o3 -S -r4    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1006 aio-stress -I500  -o3 -S -r8   -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1007 aio-stress -I500  -o3 -S -r16  -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1008 aio-stress -I500  -o3 -S -r32  -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4
+ADS1009 aio-stress -I500  -o3 -S -r64  -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4
+ADS1010 aio-stress -I500  -o3 -S -r128 -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4
+ADS1011 aio-stress -I500  -o3 -S -r256 -t8  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4 $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6 $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1012 aio-stress -I500  -o3 -S -r512 -t8  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2 $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4 $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6 $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1013 aio-stress -I500  -o2 -O -r4    -t8  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2 $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4 $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6 $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1014 aio-stress -I500  -o2 -O -r8         $TMPBASE/aiodio/file1 $TMPBASE/aiodio/file2
+ADS1015 aio-stress -I500  -o2 -O -r16        $TMPBASE/aiodio/file1 $TMPBASE/aiodio/file2
+ADS1016 aio-stress -I500  -o2 -O -r32   -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1017 aio-stress -I500  -o2 -O -r64   -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1018 aio-stress -I500  -o3 -O -r4    -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1019 aio-stress -I500  -o3 -O -r8    -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1020 aio-stress -I500  -o3 -O -r16   -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1021 aio-stress -I500  -o3 -O -r32   -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1022 aio-stress -I500  -o3 -O -r64   -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1023 aio-stress -I500  -o3 -O -r128  -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1024 aio-stress -I500  -o3 -O -r256  -t8  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1025 aio-stress -I500  -o3 -O -r512  -t8  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2 $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1026 aio-stress -I500  -o0 -S -r4    -t8  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2       $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1027 aio-stress -I500  -o0 -S -r8           $TMPBASE/aiodio/file2
+ADS1028 aio-stress -I500  -o0 -S -r16          $TMPBASE/aiodio/file2
+ADS1029 aio-stress -I500  -o0 -S -r32   -t2    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1030 aio-stress -I500  -o0 -S -r64   -t2    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1031 aio-stress -I500  -o1 -S -r4    -t2    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1032 aio-stress -I500  -o1 -S -r8    -t2    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1033 aio-stress -I500  -o1 -S -r16   -t2    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1034 aio-stress -I500  -o1 -S -r32   -t4    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1035 aio-stress -I500  -o1 -S -r64   -t4    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2     $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1036 aio-stress -I500  -o1 -S -r128  -t4    $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2     $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1037 aio-stress -I500  -o1 -S -r256  -t8  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2     $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1038 aio-stress -I500  -o1 -S -r512  -t8  -x $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1039 aio-stress -I500  -o1 -O -r4    -t8  -x  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2        $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1040 aio-stress -I500  -o1 -O -r8    -t2  -x $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1041 aio-stress -I500  -o1 -O -r16   -t2  -x  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1042 aio-stress -I500  -o1 -O -r32   -t2   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1043 aio-stress -I500  -o1 -O -r64   -t2   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS1044 aio-stress -I500  -o1 -O -r4    -t4   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2        $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1045 aio-stress -I500  -o1 -O -r8    -t4   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2     $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1046 aio-stress -I500  -o1 -O -r16   -t4   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2     $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8
+ADS1047 aio-stress -I500  -o1 -O -r32   -t8   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2     $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1048 aio-stress -I500  -o1 -O -r64   -t8   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2  $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1049 aio-stress -I500  -o1 -O -r128  -t8   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2        $TMPBASE/aiodio/file7  $TMPBASE/aiodio/file8 $TMPBASE/aiodio/file3  $TMPBASE/aiodio/file4  $TMPBASE/aiodio/file5  $TMPBASE/aiodio/file6
+ADS1050 aio-stress -I500  -o1 -O -r256  -t2   $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
runtest/ltp-aio-stress.part2 +10 -10
index 3a60e23e9..98ca41c15 100644
@@ -26,13 +26,13 @@
 #       -x turn off thread stonewalling
 #       -h this message
 #
-ADS2001 aio-stress -I500  -o2 -S -r32  -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS2002 aio-stress -I500  -o3 -S -r8   -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS2003 aio-stress -I500  -o3 -S -r16  -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS2004 aio-stress -I500  -o3 -S -r32  -t4  $TMPDIR/junkfile $TMPDIR/file2 $TMPDIR/file3 $TMPDIR/file4
-ADS2005 aio-stress -I500  -o3 -S -r64  -t4  $TMPDIR/junkfile $TMPDIR/file2 $TMPDIR/file3 $TMPDIR/file4
-ADS2006 aio-stress -I500  -o2 -O -r32  -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS2007 aio-stress -I500  -o3 -O -r8   -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS2008 aio-stress -I500  -o3 -O -r16  -t2  $TMPDIR/junkfile $TMPDIR/file2
-ADS2009 aio-stress -I500  -o3 -O -r32  -t4  $TMPDIR/junkfile $TMPDIR/file2 $TMPDIR/file3 $TMPDIR/file4
-ADS2010 aio-stress -I500  -o3 -O -r64  -t4  $TMPDIR/junkfile $TMPDIR/file2 $TMPDIR/file3 $TMPDIR/file4
+ADS2001 aio-stress -I500  -o2 -S -r32  -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS2002 aio-stress -I500  -o3 -S -r8   -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS2003 aio-stress -I500  -o3 -S -r16  -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS2004 aio-stress -I500  -o3 -S -r32  -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2 $TMPBASE/aiodio/file3 $TMPBASE/aiodio/file4
+ADS2005 aio-stress -I500  -o3 -S -r64  -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2 $TMPBASE/aiodio/file3 $TMPBASE/aiodio/file4
+ADS2006 aio-stress -I500  -o2 -O -r32  -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS2007 aio-stress -I500  -o3 -O -r8   -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS2008 aio-stress -I500  -o3 -O -r16  -t2  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2
+ADS2009 aio-stress -I500  -o3 -O -r32  -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2 $TMPBASE/aiodio/file3 $TMPBASE/aiodio/file4
+ADS2010 aio-stress -I500  -o3 -O -r64  -t4  $TMPBASE/aiodio/junkfile $TMPBASE/aiodio/file2 $TMPBASE/aiodio/file3 $TMPBASE/aiodio/file4
runtest/ltp-aiodio.part1 +214 -214

430 lines not on this page · raw message

runtest/ltp-aiodio.part3 +48 -48

99 lines not on this page · raw message

runtest/ltp-aiodio.part4 +14 -14
index bb8abfdf1..b303d3a8b 100644
@@ -34,16 +34,16 @@ DIO07 dio_sparse
 DIO08 dio_sparse
 DIO09 dio_sparse
 #Running aiodio_append
-AD000 aiodio_append $TMPDIR/aiodio.$$/file2
-AD001 aiodio_append $TMPDIR/aiodio.$$/file2
-AD002 aiodio_append $TMPDIR/aiodio.$$/file2
-AD003 aiodio_append $TMPDIR/aiodio.$$/file2
-AD004 aiodio_append $TMPDIR/aiodio.$$/file2
-AD005 aiodio_append $TMPDIR/aiodio.$$/file2
-AD006 aiodio_append $TMPDIR/aiodio.$$/file2
-AD007 aiodio_append $TMPDIR/aiodio.$$/file2
-AD008 aiodio_append $TMPDIR/aiodio.$$/file2
-AD009 aiodio_append $TMPDIR/aiodio.$$/file2
+AD000 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD001 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD002 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD003 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD004 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD005 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD006 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD007 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD008 aiodio_append $TMPBASE/aiodio/junkfile.append1
+AD009 aiodio_append $TMPBASE/aiodio/junkfile.append1
 #Running dio_append
 ADI000 dio_append
 ADI001 dio_append
@@ -62,7 +62,7 @@ DIT002 dio_truncate
 #Running read_checkzero
 #gread_checkzero
 #Running ltp-diorh
-DOR000 ltp-diorh $TMPDIR/aiodio.$$/file2
-DOR001 ltp-diorh $TMPDIR/aiodio.$$/file3
-DOR002 ltp-diorh $TMPDIR/aiodio.$$/file4
-DOR003 ltp-diorh $TMPDIR/aiodio.$$/file5
+DOR000 ltp-diorh $TMPBASE/aiodio/junkfile.diorh1
+DOR001 ltp-diorh $TMPBASE/aiodio/junkfile.diorh2
+DOR002 ltp-diorh $TMPBASE/aiodio/junkfile.diorh3
+DOR003 ltp-diorh $TMPBASE/aiodio/junkfile.diorh4
testscripts/ltp-aiodio.sh +18 -25

72 lines not on this page · raw message

Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/1 ltp-aiodio: help aiodio test work normally

Hi!

Quoted 14 lines

ltp aiodio related cmdfiles (runtest/ltp-aio*.part*) can't be used, due to they have unfixed path name. Before we run aiodio test, we need to create some files (e.g. junkfile), and give it to the tests. But current cmdfiles use too many $TMPDIR and aiodio.$$ things, e.g:

AD022 time aiocp -b 1k -n 64 -f DIRECT -f SYNC $TMPDIR/aiodio.$$/junkfile $TMPDIR/aiodio.$$/ff2

TMPDIR is a directory created by mktemp ${TMPBASE}/ltp-XXXXXXXXXX, it's not a fixed path. The aiodio.$$ is also can be sure before running ltp. That cause we can't prepare files in the unfixed path. Even the testscripts/ltp-aiodio.sh can't work well either, due to it try to create files in $TMP/aiodio/..., the $TMP is $TMPBASE, not $TMPDIR, and aiodio is not aiodio.$$.

Quoted 5 lines

So this patch trys to help runtest/ltp-aio*.part* to use fixed path name, and put all aiodio test related files in $TMPBASE/aiodio/, the $TMPBASE is a fixed pathname comes from runltp -d <directory> option. So after this fix, users will know where they should create files in, no matter running ltp-aiodio.sh or runltp -f runtest/ltp-aio*.part*.

I do not like this solution. I think that we should instead fix the scripts. I think that the runltp should just export TMPDIR if it was passed on commandline and it should be the resposibility of the caller to set up a temporary directory somewhere in /tmp in that case.

Signature · 2 lines
Cyril Hrubis
[email protected]
author
#2 lore raw

PATCH 1/1 ltp-aiodio: help aiodio test work normally

Quoted 21 lines · Cyril Hrubis

Hi!

Quoted 14 lines

ltp aiodio related cmdfiles (runtest/ltp-aio*.part*) can't be used, due to they have unfixed path name. Before we run aiodio test, we need to create some files (e.g. junkfile), and give it to the tests. But current cmdfiles use too many $TMPDIR and aiodio.$$ things, e.g:

AD022 time aiocp -b 1k -n 64 -f DIRECT -f SYNC $TMPDIR/aiodio.$$/junkfile $TMPDIR/aiodio.$$/ff2

TMPDIR is a directory created by mktemp ${TMPBASE}/ltp-XXXXXXXXXX, it's not a fixed path. The aiodio.$$ is also can be sure before running ltp. That cause we can't prepare files in the unfixed path. Even the testscripts/ltp-aiodio.sh can't work well either, due to it try to create files in $TMP/aiodio/..., the $TMP is $TMPBASE, not $TMPDIR, and aiodio is not aiodio.$$.

Quoted 5 lines

So this patch trys to help runtest/ltp-aio*.part* to use fixed path name, and put all aiodio test related files in $TMPBASE/aiodio/, the $TMPBASE is a fixed pathname comes from runltp -d <directory> option. So after this fix, users will know where they should create files in, no matter running ltp-aiodio.sh or runltp -f runtest/ltp-aio*.part*.

Quoted 4 lines

I do not like this solution. I think that we should instead fix the scripts. I think that the runltp should just export TMPDIR if it was passed on commandline and it should be the resposibility of the caller to set up a temporary directory somewhere in /tmp in that case.

Sorry I can't understand your solution, would you like to show me some detailed code which can make the aiodio test pass, to explain what do you really like to do?

Quoted 5 lines
Signature · 3 lines
-- 
Cyril Hrubis
[email protected]
#3 lore raw

PATCH 1/1 ltp-aiodio: help aiodio test work normally

Hi!

Quoted 8 lines
Quoted 4 lines

I do not like this solution. I think that we should instead fix the scripts. I think that the runltp should just export TMPDIR if it was passed on commandline and it should be the resposibility of the caller to set up a temporary directory somewhere in /tmp in that case.

Sorry I can't understand your solution, would you like to show me some detailed code which can make the aiodio test pass, to explain what do you really like to do?

Looking at the testscripts/ltp-aiodio.sh it calls ltp-pan directly so runltp is not involved at all. I guess that the simple solution here would be exporting correct TMPDIR so that it points to the "$TMP/aiodio".

From the testcase viewpoint TMPDIR always was the path where the test should create files.

Signature · 2 lines
Cyril Hrubis
[email protected]