• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env bash
2#
3# Copyright (C) 2019-2021 Red Hat, Inc.
4# This file is part of elfutils.
5#
6# This file is free software; you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by
8# the Free Software Foundation; either version 3 of the License, or
9# (at your option) any later version.
10#
11# elfutils is distributed in the hope that it will be useful, but
12# WITHOUT ANY WARRANTY; without even the implied warranty of
13# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14# GNU General Public License for more details.
15#
16# You should have received a copy of the GNU General Public License
17# along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
19. $srcdir/debuginfod-subr.sh
20
21# for test case debugging, uncomment:
22set -x
23unset VALGRIND_CMD
24
25########################################################################
26# Test debuginfod without a path list
27# This variable is essential and ensures no time-race for claiming ports occurs
28# set base to a unique multiple of 100 not used in any other 'run-debuginfod-*' test
29base=9300
30get_ports
31
32env LD_LIBRARY_PATH=$ldpath ${abs_builddir}/../debuginfod/debuginfod $VERBOSE -F -U -d :memory: -p $PORT1 -L -F &
33PID1=$!
34
35wait_ready $PORT1 'thread_work_total{role="traverse"}' 1
36wait_ready $PORT1 'thread_work_pending{role="scan"}' 0
37wait_ready $PORT1 'thread_busy{role="scan"}' 0
38kill -int $PID1
39wait $PID1
40PID1=0
41exit 0
42