Tests: Remove unused helper `default_pipe_size_getter`
authorroot <root@ideal-dove>
Wed, 28 Aug 2024 19:24:53 +0000 (19:24 +0000)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Tue, 3 Sep 2024 19:29:29 +0000 (19:29 +0000)
Change-Id: If72cb1456edbf26c340fcffdf93c8fb874ab030e
Signed-off-by: Kienan Stewart <kstewart@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
.gitignore
tests/regression/tools/notification/Makefile.am
tests/regression/tools/notification/default_pipe_size_getter.cpp [deleted file]

index 66e76696f08c12e4aaca56a965f03a90a23d042e..204ea1125d5a99e4ecb8ceb9103b14f40a28c6e7 100644 (file)
@@ -112,7 +112,6 @@ compile_commands.json
 /tests/regression/tools/notification/notification
 /tests/regression/tools/rotation/schedule_api
 /tests/regression/tools/notification/rotation
-/tests/regression/tools/notification/default_pipe_size_getter
 /tests/regression/tools/trigger/utils/notification-client
 /tests/regression/tools/trigger/name/trigger_name
 /tests/regression/tools/trigger/utils/register-some-triggers
index eb5198b4bb0b28be76a729e2885a1126a3dcf961..edb3f27c274d49649eea5bcbd02a959de1081fec 100644 (file)
@@ -5,7 +5,7 @@ AM_CPPFLAGS += -I$(top_srcdir)/tests/utils
 LIBTAP=$(top_builddir)/tests/utils/tap/libtap.la
 LIB_LTTNG_CTL = $(top_builddir)/src/lib/lttng-ctl/liblttng-ctl.la
 
-noinst_PROGRAMS = base_client notification rotation default_pipe_size_getter
+noinst_PROGRAMS = base_client notification rotation
 
 if NO_SHARED
 
@@ -62,9 +62,6 @@ notification_LDADD = $(LIB_LTTNG_CTL) $(LIBTAP) -lm
 rotation_SOURCES = rotation.c
 rotation_LDADD = $(LIB_LTTNG_CTL) $(LIBTAP) -lm
 
-default_pipe_size_getter_SOURCES = default_pipe_size_getter.cpp
-default_pipe_size_getter_LDADD = $(top_builddir)/src/common/libcommon-gpl.la
-
 noinst_SCRIPTS = \
        test_notification_kernel_buffer_usage \
        test_notification_kernel_error \
diff --git a/tests/regression/tools/notification/default_pipe_size_getter.cpp b/tests/regression/tools/notification/default_pipe_size_getter.cpp
deleted file mode 100644 (file)
index 34eb3cd..0000000
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * default_pipe_size_getter.c
- *
- * Tests suite for LTTng notification API (get default size of pipes)
- *
- * Copyright (C) 2021 Jérémie Galarneau <jeremie.galarneau@efficios.com>
- *
- * SPDX-License-Identifier: MIT
- *
- */
-
-#ifndef _GNU_SOURCE
-#define _GNU_SOURCE
-#endif
-
-#include <common/error.hpp>
-#include <common/pipe.hpp>
-
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-int lttng_opt_verbose;
-int lttng_opt_mi;
-int lttng_opt_quiet;
-
-namespace {
-#ifdef __linux__
-/*
- * Return the default pipe buffer size or a negative error.
- */
-int get_pipe_size()
-{
-       int ret;
-       /*
-        * The event notifier pipes are not "special"; they are created using
-        * the lttng_pipe utility. Hence, this should be representative of a
-        * pipe created by the session daemon for event notifier messages to
-        * go through.
-        */
-       struct lttng_pipe *pipe = lttng_pipe_open(0);
-
-       if (!pipe) {
-               /* lttng_pipe_open already logs on error. */
-               ret = -1;
-               goto end;
-       }
-
-       ret = fcntl(lttng_pipe_get_writefd(pipe), F_GETPIPE_SZ);
-       if (ret < 0) {
-               PERROR("Failed to get the size of the pipe");
-       }
-
-       lttng_pipe_destroy(pipe);
-end:
-       return ret;
-}
-#elif defined(__FreeBSD__)
-int get_pipe_size(void)
-{
-       return 65536;
-}
-#else
-#error "Implement get_pipe_size() for your platform."
-#endif
-} /* namespace */
-
-int main()
-{
-       int ret;
-
-       ret = get_pipe_size();
-       if (ret < 0) {
-               return EXIT_FAILURE;
-       }
-
-       /* Print the pipe buffer size to stdout. */
-       printf("%d\n", ret);
-
-       return EXIT_SUCCESS;
-}
This page took 0.027337 seconds and 4 git commands to generate.