TestRestartFromPowerFailureExt4 is to test data after unexpected power failure on ext4.
(t *testing.T)
| 37 | |
| 38 | // TestRestartFromPowerFailureExt4 is to test data after unexpected power failure on ext4. |
| 39 | func TestRestartFromPowerFailureExt4(t *testing.T) { |
| 40 | for _, tc := range []struct { |
| 41 | name string |
| 42 | du time.Duration |
| 43 | fsMountOpt string |
| 44 | useFailpoint bool |
| 45 | }{ |
| 46 | { |
| 47 | name: "fp_ext4_commit5s", |
| 48 | du: 5 * time.Second, |
| 49 | fsMountOpt: "commit=5", |
| 50 | useFailpoint: true, |
| 51 | }, |
| 52 | { |
| 53 | name: "fp_ext4_commit1s", |
| 54 | du: 10 * time.Second, |
| 55 | fsMountOpt: "commit=1", |
| 56 | useFailpoint: true, |
| 57 | }, |
| 58 | { |
| 59 | name: "fp_ext4_commit1000s", |
| 60 | du: 10 * time.Second, |
| 61 | fsMountOpt: "commit=1000", |
| 62 | useFailpoint: true, |
| 63 | }, |
| 64 | { |
| 65 | name: "kill_ext4_commit5s", |
| 66 | du: 5 * time.Second, |
| 67 | fsMountOpt: "commit=5", |
| 68 | }, |
| 69 | { |
| 70 | name: "kill_ext4_commit1s", |
| 71 | du: 10 * time.Second, |
| 72 | fsMountOpt: "commit=1", |
| 73 | }, |
| 74 | { |
| 75 | name: "kill_ext4_commit1000s", |
| 76 | du: 10 * time.Second, |
| 77 | fsMountOpt: "commit=1000", |
| 78 | }, |
| 79 | } { |
| 80 | t.Run(tc.name, func(t *testing.T) { |
| 81 | doPowerFailure(t, tc.du, dmflakey.FSTypeEXT4, "", tc.fsMountOpt, tc.useFailpoint) |
| 82 | }) |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | func TestRestartFromPowerFailureXFS(t *testing.T) { |
| 87 | for _, tc := range []struct { |
nothing calls this directly
no test coverage detected