@@ -1004,7 +1004,7 @@ func TestSetLineHandleConfig(t *testing.T) {
1004
1004
[]uint8 {1 , 0 , 1 },
1005
1005
uapi .HandleRequestActiveLow ,
1006
1006
[]uint8 {1 , 0 , 1 },
1007
- nil ,
1007
+ unix . EINVAL ,
1008
1008
},
1009
1009
{
1010
1010
"as-is atv-lo to as-is atv-hi" ,
@@ -1013,7 +1013,7 @@ func TestSetLineHandleConfig(t *testing.T) {
1013
1013
[]uint8 {1 , 0 , 1 },
1014
1014
0 ,
1015
1015
[]uint8 {1 , 0 , 1 },
1016
- nil ,
1016
+ unix . EINVAL ,
1017
1017
},
1018
1018
{
1019
1019
"input atv-lo to input atv-hi" ,
@@ -1063,7 +1063,7 @@ func TestSetLineHandleConfig(t *testing.T) {
1063
1063
[]uint8 {1 , 0 , 1 },
1064
1064
0 ,
1065
1065
[]uint8 {1 , 0 , 1 },
1066
- nil ,
1066
+ unix . EINVAL ,
1067
1067
},
1068
1068
{
1069
1069
"input atv-hi to as-is atv-lo" ,
@@ -1072,7 +1072,7 @@ func TestSetLineHandleConfig(t *testing.T) {
1072
1072
[]uint8 {1 , 0 , 1 },
1073
1073
uapi .HandleRequestActiveLow ,
1074
1074
[]uint8 {1 , 0 , 1 },
1075
- nil ,
1075
+ unix . EINVAL ,
1076
1076
},
1077
1077
{
1078
1078
"input pull-up to input pull-down" ,
@@ -1103,17 +1103,17 @@ func TestSetLineHandleConfig(t *testing.T) {
1103
1103
uapi .HandleRequestActiveLow ,
1104
1104
[]uint8 {1 , 0 , 1 },
1105
1105
0 ,
1106
- []uint8 {0 , 1 , 0 }, // must be opposite of initial as mock is not updated
1107
- nil ,
1106
+ []uint8 {1 , 0 , 1 },
1107
+ unix . EINVAL ,
1108
1108
},
1109
1109
{
1110
1110
"output atv-hi to as-is atv-lo" ,
1111
1111
[]uint32 {1 , 2 , 3 },
1112
1112
uapi .HandleRequestOutput ,
1113
1113
[]uint8 {1 , 0 , 1 },
1114
1114
uapi .HandleRequestActiveLow ,
1115
- []uint8 {0 , 1 , 0 }, // must be opposite of initial as mock is not updated
1116
- nil ,
1115
+ []uint8 {1 , 0 , 1 },
1116
+ unix . EINVAL ,
1117
1117
},
1118
1118
// expected errors
1119
1119
{
@@ -1445,7 +1445,7 @@ func TestWatchLineInfo(t *testing.T) {
1445
1445
assert .Nil (t , chg , "spurious change" )
1446
1446
1447
1447
// reconfig line
1448
- hc := uapi.HandleConfig {Flags : uapi .HandleRequestActiveLow }
1448
+ hc := uapi.HandleConfig {Flags : uapi .HandleRequestInput | uapi . HandleRequestActiveLow }
1449
1449
copy (hr .Consumer [:], "testwatch" )
1450
1450
err = uapi .SetLineConfig (uintptr (hr .Fd ), & hc )
1451
1451
assert .Nil (t , err )
0 commit comments