Skip to content

Commit 83403f7

Browse files
committed
virtiofs: skip DirectIO test
This is currently failing, stopping other tests in all.bash to get coverage. Change-Id: Ib94a11c7489b16a5bffa53a4376fcb236a6a6964
1 parent 595b2af commit 83403f7

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

virtiofs/posixtest_test.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"log"
99
"os"
1010
"os/exec"
11+
"regexp"
1112
"strings"
1213
"sync"
1314
"testing"
@@ -77,7 +78,7 @@ mount -t virtiofs myfs /mnt
7778
7879
mkdir -p /mnt/tmp
7980
80-
/posixtest.test -posixdir=/mnt -test.run TestAll -test.v \
81+
/posixtest.test -posixdir=/mnt -test.run TestAll -test.skip TestAll/DirectIO -test.v \
8182
> /mnt/test_output.txt 2>&1
8283
echo $? > /mnt/test_exit.txt
8384
@@ -138,10 +139,12 @@ reboot -n -f
138139
// Report individual sub-test failures into Go's testing framework.
139140
for _, line := range strings.Split(output, "\n") {
140141
line = strings.TrimSpace(line)
141-
if strings.HasPrefix(line, "--- FAIL:") {
142-
name := strings.Fields(line)[2]
143-
t.Errorf("posixtest sub-test failed: %s", name)
142+
m := regexp.MustCompile(`--- FAIL: *([^ ]*)\s\([0-9.]*s\)`).FindStringSubmatch(line)
143+
if m == nil {
144+
continue
144145
}
146+
name := m[1]
147+
t.Errorf("posixtest sub-test failed: %s", name)
145148
}
146149
if exitCode != "0" && exitCode != "" {
147150
t.Errorf("posixtest.test exited with code %s", exitCode)

0 commit comments

Comments
 (0)