@@ -122,9 +122,7 @@ func TestNewMachine(t *testing.T) {
122122}
123123
124124func TestJailerMicroVMExecution (t * testing.T ) {
125- if testing .Short () {
126- t .Skip ()
127- }
125+ fctesting .RequiresKVM (t )
128126 fctesting .RequiresRoot (t )
129127
130128 logPath := filepath .Join (testDataLogPath , "TestJailerMicroVMExecution" )
@@ -284,9 +282,7 @@ func TestJailerMicroVMExecution(t *testing.T) {
284282}
285283
286284func TestMicroVMExecution (t * testing.T ) {
287- if testing .Short () {
288- t .Skip ()
289- }
285+ fctesting .RequiresKVM (t )
290286
291287 var nCpus int64 = 2
292288 cpuTemplate := models .CPUTemplate (models .CPUTemplateT2 )
@@ -398,8 +394,11 @@ func TestMicroVMExecution(t *testing.T) {
398394}
399395
400396func TestStartVMM (t * testing.T ) {
397+ fctesting .RequiresKVM (t )
398+
401399 socketPath , cleanup := makeSocketPath (t )
402400 defer cleanup ()
401+
403402 cfg := Config {
404403 SocketPath : socketPath ,
405404 }
@@ -437,6 +436,8 @@ func TestStartVMM(t *testing.T) {
437436}
438437
439438func TestLogAndMetrics (t * testing.T ) {
439+ fctesting .RequiresKVM (t )
440+
440441 tests := []struct {
441442 logLevel string
442443 quiet bool
@@ -523,6 +524,8 @@ func testLogAndMetrics(t *testing.T, logLevel string) string {
523524}
524525
525526func TestStartVMMOnce (t * testing.T ) {
527+ fctesting .RequiresKVM (t )
528+
526529 socketPath , cleanup := makeSocketPath (t )
527530 defer cleanup ()
528531
@@ -1252,6 +1255,7 @@ func TestCaptureFifoToFile_leak(t *testing.T) {
12521255}
12531256
12541257func TestWait (t * testing.T ) {
1258+ fctesting .RequiresKVM (t )
12551259 fctesting .RequiresRoot (t )
12561260
12571261 cases := []struct {
@@ -1535,6 +1539,7 @@ func TestSignalForwarding(t *testing.T) {
15351539}
15361540
15371541func TestPauseResume (t * testing.T ) {
1542+ fctesting .RequiresKVM (t )
15381543 fctesting .RequiresRoot (t )
15391544
15401545 dir , err := ioutil .TempDir ("" , t .Name ())
@@ -1646,6 +1651,7 @@ func TestPauseResume(t *testing.T) {
16461651}
16471652
16481653func TestCreateSnapshot (t * testing.T ) {
1654+ fctesting .RequiresKVM (t )
16491655 fctesting .RequiresRoot (t )
16501656
16511657 dir , err := ioutil .TempDir ("" , t .Name ())
0 commit comments