Skip to content

Commit 98b738e

Browse files
xaionaro@dx.centerxaionaro@dx.center
authored andcommitted
fix: treat kernel status errors as transport errors in E2E tests
Kernel status error -61 (ECONNREFUSED) is a binder-level SELinux denial, same as "failed transaction". The isTransportError check now matches kernel status errors so tests skip properly.
1 parent 36c48fe commit 98b738e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/e2e/gen_batch2_test.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ func isTransportError(err error) bool {
3535
return false
3636
}
3737
var txnErr *aidlerrors.TransactionError
38-
return errors.As(err, &txnErr) || err.Error() == "binder: failed transaction"
38+
if errors.As(err, &txnErr) {
39+
return true
40+
}
41+
s := err.Error()
42+
return s == "binder: failed transaction" ||
43+
strings.Contains(s, "kernel status error")
3944
}
4045

4146
// requireNoErrorOrTransport fails the test only if err is non-nil and NOT a

0 commit comments

Comments
 (0)