summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2020-05-19 19:01:24 -0400
committerPaul Moore <paul@paul-moore.com>2020-06-16 11:21:28 -0400
commitd0713af4184b9a0fb510c14b4f04d4d64be22bf6 (patch)
treef5a531c3490da7585209c99ac7b81de9f939d850 /tests
parent3d44b15e40c79c3187afeb73292aa1fc909a4463 (diff)
downloadlibseccomp-d0713af4184b9a0fb510c14b4f04d4d64be22bf6.tar.gz
api: use EINVAL to signify bad input to the libseccomp API
We need to limit our use of EINVAL to only indicate bad input to the API functions. Bad input to internal functions is not a valid use of EINVAL. 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 bb33f42..d3b2256 100644
--- a/tests/11-basic-basic_errors.c
+++ b/tests/11-basic-basic_errors.c
@@ -178,10 +178,10 @@ int main(int argc, char *argv[])
if (ctx == NULL)
return -1;
rc = seccomp_attr_get(ctx, 1000, &attr);
- if (rc != -EEXIST)
+ if (rc != -EINVAL)
return -1;
rc = seccomp_attr_set(ctx, 1000, 1);
- if (rc != -EEXIST)
+ if (rc != -EINVAL)
return -1;
return 0;