Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/tools/testing/selftests/bpf/prog_tests/   (Linux Kernel Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 942 B image not shown  

Quelle  wq.c

  Sprache: C
 

// SPDX-License-Identifier: GPL-2.0
/* Copyright (c) 2024 Benjamin Tissoires */
#include <test_progs.h>
#include "wq.skel.h"
#include "wq_failures.skel.h"

void serial_test_wq(void)
{
 struct wq *wq_skel = NULL;
 int err, prog_fd;

 LIBBPF_OPTS(bpf_test_run_opts, topts);

 RUN_TESTS(wq);

 /* re-run the success test to check if the timer was actually executed */

 wq_skel = wq__open_and_load();
 if (!ASSERT_OK_PTR(wq_skel, "wq_skel_load"))
  return;

 err = wq__attach(wq_skel);
 if (!ASSERT_OK(err, "wq_attach"))
  return;

 prog_fd = bpf_program__fd(wq_skel->progs.test_syscall_array_sleepable);
 err = bpf_prog_test_run_opts(prog_fd, &topts);
 ASSERT_OK(err, "test_run");
 ASSERT_EQ(topts.retval, 0"test_run");

 usleep(50); /* 10 usecs should be enough, but give it extra */

 ASSERT_EQ(wq_skel->bss->ok_sleepable, (1 << 1), "ok_sleepable");
 wq__destroy(wq_skel);
}

void serial_test_failures_wq(void)
{
 RUN_TESTS(wq_failures);
}

Messung V0.5 in Prozent
C=97 H=90 G=93

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-06-07) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.