• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

drakenclimber / libseccomp
88%
main: 89%

Build:
Build:
LAST BUILD BRANCH: issue466
DEFAULT BRANCH: main
Repo Added 08 Oct 2019 08:33PM UTC
Files 27
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

LAST BUILD ON BRANCH wip/issue11-2
branch: wip/issue11-2
CHANGE BRANCH
x
Reset
  • wip/issue11-2
  • backports/v2.4.3
  • checkout
  • checkout2
  • clang
  • codeql
  • dependabot
  • distutils
  • fixwarning
  • issue466
  • issues/11
  • issues/161-round2
  • issues/193
  • issues/210
  • issues/215
  • issues/215ppc
  • issues/236
  • issues/240
  • issues/245
  • issues/252
  • issues/267
  • issues/277
  • issues/313
  • issues/347
  • issues/370
  • issues/372
  • issues/472
  • issues/add-riscv-scripts
  • issues/doxygen
  • issues/fix-test24
  • issues/fixtest05warning
  • issues/fixtravisci
  • issues/githubactions
  • issues/man-seccomp_rule_add.3
  • issues/v2.5.2-changelog
  • issues/v2.5.3-changelog
  • main
  • master
  • pull/215
  • pull/215patch2
  • pull/215ppc
  • python-wheel
  • python-wheel2
  • release-2.4
  • release-2.5
  • rfc-bintree-v2
  • test
  • test2
  • v2.4/add-parisc-to-validate
  • wip/bintree-attr
  • wip/distutils
  • wip/doxygen
  • wip/doxygen2
  • wip/github_actions
  • wip/github_actions2
  • wip/issue11
  • wip/issue11-3
  • wip/issue11-4
  • wip/issue11-5
  • wip/issue11-7
  • wip/issue11-8
  • wip/release-2.4.4
  • wip/rfc-bintree-v3
  • wip/rfc-bintree-v4
  • wip/working-codeql
  • working-syscall
  • working-syscall-wip

09 Jan 2025 11:29PM UTC coverage: 87.68% (-1.8%) from 89.454%
12700288548

push

github

drakenclimber
wip - got it working

Needs some cleanup and obviously lots of tests :)

Here's the test program I have been using:

int main(void)
{
        int rc, pfc = 0;
        scmp_filter_ctx ctx = NULL;

        ctx = seccomp_init(SCMP_ACT_ERRNO(5));
        if (ctx == NULL)
                return ENOMEM;

	fprintf(stderr, "%s:%d\n", __func__, __LINE__);
        rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW,
SCMP_SYS(rt_sigreturn), 0);
        if (rc != 0)
		goto out;
        rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(exit_group),
0);
        if (rc != 0)
                goto out;
        rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 0);
        if (rc != 0)
                goto out;
        rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(fstat), 0);
        if (rc != 0)
                goto out;
        rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW,
SCMP_SYS(clock_nanosleep), 0);
        if (rc != 0)
                goto out;

	rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_OPTIMIZE, 2);
	if (rc != 0)
		goto out;

	rc = seccomp_attr_set(ctx, SCMP_FLTATR_CTL_KVER, SCMP_KV_4_5);
	if (rc != 0)
		goto out;

	pfc = open("filter.pfc", O_WRONLY | O_TRUNC | O_CREAT, S_IRWXU |
S_IRWXG | S_IRWXO);
	if (pfc < 0)
		goto out;

	rc = seccomp_export_pfc(ctx, pfc);
	if (rc != 0)
		goto out;

        rc = seccomp_load(ctx);
        if (rc != 0)
                goto out;

out:
	if (pfc)
		close(pfc);

	seccomp_release(ctx);
        return (rc < 0 ? -rc : rc);
}

Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>

7 of 63 new or added lines in 5 files covered. (11.11%)

91 existing lines in 2 files now uncovered.

2740 of 3125 relevant lines covered (87.68%)

288389.16 hits per line

Relevant lines Covered
Build:
Build:
3125 RELEVANT LINES 2740 COVERED LINES
288389.16 HITS PER LINE
Source Files on wip/issue11-2
  • Tree
  • List 27
  • Changed 6
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
12700288548 wip/issue11-2 wip - got it working Needs some cleanup and obviously lots of tests :) Here's the test program I have been using: int main(void) { int rc, pfc = 0; scmp_filter_ctx ctx = NULL; ctx = seccomp_init(SCMP_ACT_ERRNO(5)); ... push 09 Jan 2025 11:34PM UTC drakenclimber github
87.68
12680703785 wip/issue11-2 syscalls: Add kernel versions for x32 syscalls Add the kernel versions in which the x32 syscalls were added to the kernel. This was done by running the following: $ cd tools $ ./scmp_kernel_versions.py -a x32 -k <kernel-source-path> $ mv ../... push 08 Jan 2025 11:17PM UTC drakenclimber github
89.45
12680668232 wip/issue11-2 syscalls: Add kernel versions for x32 syscalls Add the kernel versions in which the x32 syscalls were added to the kernel. This was done by running the following: $ cd tools $ ./scmp_kernel_versions.py -a x32 -k <kernel-source-path> $ mv ../... push 08 Jan 2025 11:15PM UTC drakenclimber github
89.45
See All Builds (249)
  • Repo on GitHub
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc