You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
478 B
25 lines
478 B
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
# Copyright (C) 2017 Red Hat, Inc.
|
|
#
|
|
# Test if gdb can successfully attach to a process and
|
|
# this process exits normally.
|
|
|
|
TST_TESTFUNC=simple_test
|
|
TST_NEEDS_CMDS="gdb /bin/cat"
|
|
|
|
. tst_test.sh
|
|
|
|
simple_test()
|
|
{
|
|
gdb /bin/cat -ex "run /etc/passwd" -ex quit < /dev/null
|
|
RC=$?
|
|
if [ $RC -eq 0 ] ; then
|
|
tst_res TPASS "gdb attached to process and completed run"
|
|
else
|
|
tst_res TFAIL "gdb test failed with" $RC
|
|
fi
|
|
}
|
|
|
|
tst_run
|