File tree 4 files changed +22
-2
lines changed
4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -189,10 +189,10 @@ test/vmlinuz test/initrd.gz:
189
189
@cd test ; ./tinycore.sh
190
190
191
191
test : $(TARGET ) test/vmlinuz test/initrd.gz
192
- @ (cd test && ./test_linux.exp)
192
+ @ (cd test && ./retry-infra-failure 5 ./ test_linux.exp)
193
193
194
194
test-qcow : $(TARGET ) test/vmlinuz test/initrd.gz
195
- @ (cd test && ./test_linux_qcow.exp)
195
+ @ (cd test && ./retry-infra-failure 5 ./ test_linux_qcow.exp)
196
196
197
197
198
198
# # ----------- ##
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ retries=$1
4
+ command=$2
5
+
6
+ ret=0
7
+ for(( i= 0 ;i< $retries ;i++ ))
8
+ do
9
+ $command
10
+ ret=$?
11
+ # Use exit code 2 to mean infra failure, need to retry.
12
+ if [ " $ret " != 2 ]; then
13
+ exit $ret
14
+ fi
15
+ done
16
+
17
+ echo " Persistent failure after $retries tries."
18
+ exit $ret
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ set timeout 20
15
15
16
16
expect {
17
17
timeout {puts "FAIL boot"; exec kill -9 $pid; exit 1}
18
+ "Kernel panic - not syncing: IO-APIC + timer doesn't work" {puts "INFRA nested virtualization failed"; exec kill -9 $pid; exit 2}
18
19
"\r\ntc@box:~$ "
19
20
}
20
21
send "sudo mount /dev/sda1 /mnt/sda1\r\n"
Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ set timeout 20
22
22
23
23
expect {
24
24
timeout {puts "FAIL boot"; exec kill -9 $pid; exit 1}
25
+ "Kernel panic - not syncing: IO-APIC + timer doesn't work" {puts "INFRA nested virtualization failed"; exec kill -9 $pid; exit 2}
25
26
"\r\ntc@box:~$ "
26
27
}
27
28
send "echo 'This is a block device' > /dev/sda\r\n"
You can’t perform that action at this time.
0 commit comments