X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=tests%2Ftools%2Fhealth%2Fhealth_check.c;fp=tests%2Ftools%2Fhealth%2Fhealth_check.c;h=0000000000000000000000000000000000000000;hp=3eef1104008d0deab00324740d9c8447a1dd07f1;hb=9ac429ef32142eaecfec2d1a44569464c4f8f721;hpb=785d2d0dc3aec3a4e44fcf677155dd07e8e4cc1f diff --git a/tests/tools/health/health_check.c b/tests/tools/health/health_check.c deleted file mode 100644 index 3eef11040..000000000 --- a/tests/tools/health/health_check.c +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (C) 2012 - Christian Babeux - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License, version 2 only, as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - * more details. - * - * You should have received a copy of the GNU General Public License along with - * this program; if not, write to the Free Software Foundation, Inc., 51 - * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#include - -#include "lttng/lttng.h" - -#define HEALTH_CMD_FAIL (1 << 0) -#define HEALTH_APP_MNG_FAIL (1 << 1) -#define HEALTH_APP_REG_FAIL (1 << 2) -#define HEALTH_KERNEL_FAIL (1 << 3) -#define HEALTH_CSMR_FAIL (1 << 4) - -int main(int argc, char *argv[]) -{ - int health = -1; - int status = 0; - - /* Command thread */ - health = lttng_health_check(LTTNG_HEALTH_CMD); - printf("Health check cmd: %d\n", health); - - if (health) { - status |= HEALTH_CMD_FAIL; - } - - /* App manage thread */ - health = lttng_health_check(LTTNG_HEALTH_APP_MANAGE); - printf("Health check app. manage: %d\n", health); - - if (health) { - status |= HEALTH_APP_MNG_FAIL; - } - /* App registration thread */ - health = lttng_health_check(LTTNG_HEALTH_APP_REG); - printf("Health check app. registration: %d\n", health); - - if (health) { - status |= HEALTH_APP_REG_FAIL; - } - - /* Kernel thread */ - health = lttng_health_check(LTTNG_HEALTH_KERNEL); - printf("Health check kernel: %d\n", health); - - if (health) { - status |= HEALTH_KERNEL_FAIL; - } - - /* Consumer thread */ - health = lttng_health_check(LTTNG_HEALTH_CONSUMER); - printf("Health check consumer: %d\n", health); - - if (health) { - status |= HEALTH_CSMR_FAIL; - } - - return status; -}