@@ -231,13 +231,13 @@ mod read_nvme_mi_data_structure {
231231 0x00 , 0x20 , 0x00 , 0x00 ,
232232 0x02 , 0x00 , 0x40 , 0x00 ,
233233 0x00 , 0x00 , 0x00 , 0x00 ,
234- 0x00 , 0x00 , 0x1d , 0x01 ,
234+ 0x00 , 0x00 , 0x1d , 0x02 ,
235235 0x00 , 0x00 , 0x00 , 0x00 ,
236236 0x00 , 0x00 , 0x00 , 0x00 ,
237237 0x00 , 0x00 , 0x00 , 0x00 ,
238238 0x00 , 0x00 , 0x00 , 0x00 ,
239239 0x00 , 0x00 , 0x00 , 0x00 ,
240- 0xc4 , 0x05 , 0xbc , 0x27
240+ 0xf3 , 0x83 , 0xa2 , 0x30
241241 ] ;
242242
243243 let resp = ExpectedRespChannel :: new ( & RESP ) ;
@@ -1232,9 +1232,9 @@ mod configuration_set {
12321232 const REQ : [ u8 ; 19 ] = [
12331233 0x08 , 0x00 , 0x00 ,
12341234 0x03 , 0x00 , 0x00 , 0x00 ,
1235- 0x01 , 0x02 , 0x00 , 0x01 ,
1235+ 0x01 , 0x03 , 0x00 , 0x01 ,
12361236 0x00 , 0x00 , 0x00 , 0x00 ,
1237- 0xa9 , 0x37 , 0xbf , 0xf5
1237+ 0x61 , 0x1b , 0xbc , 0x9d
12381238 ] ;
12391239
12401240 let resp = ExpectedRespChannel :: new ( & RESP_INVALID_PARAMETER ) ;
@@ -1245,7 +1245,7 @@ mod configuration_set {
12451245 }
12461246
12471247 #[ test]
1248- fn smbus_i2c_frequency_supported ( ) {
1248+ fn smbus_i2c_frequency_supported_effect_failure ( ) {
12491249 setup ( ) ;
12501250
12511251 let ( mut mep, mut subsys) = new_device ( DeviceType :: P1p1tC1aN0a0a ) ;
@@ -1259,11 +1259,83 @@ mod configuration_set {
12591259 0xf1 , 0x42 , 0xba , 0x4d
12601260 ] ;
12611261
1262+ let resp = ExpectedRespChannel :: new ( & RESP_INTERNAL_ERROR ) ;
1263+ smol:: block_on ( async {
1264+ mep. handle_async ( & mut subsys, & REQ , MsgIC ( true ) , resp, async |_| {
1265+ Err ( CommandEffectError :: InternalError )
1266+ } )
1267+ . await
1268+ } ) ;
1269+ }
1270+
1271+ #[ test]
1272+ fn smbus_i2c_frequency_supported ( ) {
1273+ setup ( ) ;
1274+
1275+ let ( mut mep, mut subsys) = new_device ( DeviceType :: P1p1tC1aN0a0a ) ;
1276+
1277+ #[ rustfmt:: skip]
1278+ const REQ_GET_INIT : [ u8 ; 19 ] = [
1279+ 0x08 , 0x00 , 0x00 ,
1280+ 0x04 , 0x00 , 0x00 , 0x00 ,
1281+ 0x01 , 0x00 , 0x00 , 0x01 ,
1282+ 0x00 , 0x00 , 0x00 , 0x00 ,
1283+ 0xa9 , 0x42 , 0xec , 0xb3
1284+ ] ;
1285+
1286+ #[ rustfmt:: skip]
1287+ const RESP_GET_INIT : [ u8 ; 11 ] = [
1288+ 0x88 , 0x00 , 0x00 ,
1289+ 0x00 , 0x01 , 0x00 , 0x00 ,
1290+ 0x5a , 0xc7 , 0x36 , 0x87
1291+ ] ;
1292+
1293+ let resp = ExpectedRespChannel :: new ( & RESP_GET_INIT ) ;
1294+ smol:: block_on ( async {
1295+ mep. handle_async ( & mut subsys, & REQ_GET_INIT , MsgIC ( true ) , resp, async |_| {
1296+ Ok ( ( ) )
1297+ } )
1298+ . await
1299+ } ) ;
1300+
1301+ #[ rustfmt:: skip]
1302+ const REQ_SET : [ u8 ; 19 ] = [
1303+ 0x08 , 0x00 , 0x00 ,
1304+ 0x03 , 0x00 , 0x00 , 0x00 ,
1305+ 0x01 , 0x02 , 0x00 , 0x01 ,
1306+ 0x00 , 0x00 , 0x00 , 0x00 ,
1307+ 0xa9 , 0x37 , 0xbf , 0xf5
1308+ ] ;
1309+
12621310 let resp = ExpectedRespChannel :: new ( & RESP_SUCCESS ) ;
12631311 smol:: block_on ( async {
1264- mep. handle_async ( & mut subsys, & REQ , MsgIC ( true ) , resp, async |_| Ok ( ( ) ) )
1312+ mep. handle_async ( & mut subsys, & REQ_SET , MsgIC ( true ) , resp, async |_| Ok ( ( ) ) )
12651313 . await
12661314 } ) ;
1315+
1316+ #[ rustfmt:: skip]
1317+ const REQ_GET_NEW : [ u8 ; 19 ] = [
1318+ 0x08 , 0x00 , 0x00 ,
1319+ 0x04 , 0x00 , 0x00 , 0x00 ,
1320+ 0x01 , 0x00 , 0x00 , 0x01 ,
1321+ 0x00 , 0x00 , 0x00 , 0x00 ,
1322+ 0xa9 , 0x42 , 0xec , 0xb3
1323+ ] ;
1324+
1325+ #[ rustfmt:: skip]
1326+ const RESP_GET_NEW : [ u8 ; 11 ] = [
1327+ 0x88 , 0x00 , 0x00 ,
1328+ 0x00 , 0x02 , 0x00 , 0x00 ,
1329+ 0x29 , 0x07 , 0x18 , 0x6d
1330+ ] ;
1331+
1332+ let resp = ExpectedRespChannel :: new ( & RESP_GET_NEW ) ;
1333+ smol:: block_on ( async {
1334+ mep. handle_async ( & mut subsys, & REQ_GET_NEW , MsgIC ( true ) , resp, async |_| {
1335+ Ok ( ( ) )
1336+ } )
1337+ . await
1338+ } ) ;
12671339 }
12681340
12691341 #[ test]
0 commit comments