summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2020-04-02 20:58:18 -0400
committerPaul Moore <paul@paul-moore.com>2020-06-16 11:21:28 -0400
commit3d44b15e40c79c3187afeb73292aa1fc909a4463 (patch)
tree03f9d2f6a3ba063d18efe2c97349b2d0c26dd3cf /tests
parent83989be027341a1add3c12f2e3690ee1032beba1 (diff)
downloadlibseccomp-3d44b15e40c79c3187afeb73292aa1fc909a4463.tar.gz
system: treat kernel/libc errors as ECANCELED
It is likely a fools errand to try and provide kernel and libc errno guarantees across different architectures, kernels, and libc implementations so let's just punt on the problem and dump all of these errors into the ECANCELED bucket. Acked-by: Tom Hromatka <tom.hromatka@oracle.com> Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/11-basic-basic_errors.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/11-basic-basic_errors.c b/tests/11-basic-basic_errors.c
index a41b7b5..bb33f42 100644
--- a/tests/11-basic-basic_errors.c
+++ b/tests/11-basic-basic_errors.c
@@ -151,7 +151,7 @@ int main(int argc, char *argv[])
return -1;
else {
rc = seccomp_export_pfc(ctx, sysconf(_SC_OPEN_MAX) - 1);
- if (rc != EBADF)
+ if (rc != -ECANCELED)
return -1;
}
seccomp_release(ctx);
@@ -167,7 +167,7 @@ int main(int argc, char *argv[])
return -1;
else {
rc = seccomp_export_bpf(ctx, sysconf(_SC_OPEN_MAX) - 1);
- if (rc != -EBADF)
+ if (rc != -ECANCELED)
return -1;
}
seccomp_release(ctx);