gdb/testsuite: rename source file gdb.debuginfod/main.c
authorAndrew Burgess <aburgess@redhat.com>
Thu, 17 Nov 2022 11:11:13 +0000 (11:11 +0000)
committerAndrew Burgess <aburgess@redhat.com>
Fri, 18 Nov 2022 11:21:37 +0000 (11:21 +0000)
The test gdb.debuginfod/fetch_src_and_symbols.exp uses a source file
named main.c.  I can't see any particular reason why the file is named
as such.

Usually test source files are named after the test script.

This commit just renames the source file inline with the test script,
and updates the call to standard_testfile (removing the reference to
main.c).

There's no particular reason for this change other than seeing the
file named main.c made me thing that the source file must be shared
with some other test (it isn't).

There should be no change in what is tested after this commit.

gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.c [new file with mode: 0644]
gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.exp
gdb/testsuite/gdb.debuginfod/main.c [deleted file]

diff --git a/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.c b/gdb/testsuite/gdb.debuginfod/fetch_src_and_symbols.c
new file mode 100644 (file)
index 0000000..412bd53
--- /dev/null
@@ -0,0 +1,25 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+   Copyright 2020-2022 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   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, see <http://www.gnu.org/licenses/>.  */
+
+/* Dummy main function.  */
+
+int
+main()
+{
+  asm ("main_label: .globl main_label");
+  return 0;
+}
index b57b3201cf741bc80db6c2c07e74ccc74993b5aa..8b3c2cf709ec3b21f86b4be0cb0f1a748e977e92 100644 (file)
@@ -15,7 +15,7 @@
 
 # Test debuginfod functionality
 
-standard_testfile main.c
+standard_testfile
 
 load_lib dwarf.exp
 load_lib debuginfod-support.exp
diff --git a/gdb/testsuite/gdb.debuginfod/main.c b/gdb/testsuite/gdb.debuginfod/main.c
deleted file mode 100644 (file)
index 412bd53..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2020-2022 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   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, see <http://www.gnu.org/licenses/>.  */
-
-/* Dummy main function.  */
-
-int
-main()
-{
-  asm ("main_label: .globl main_label");
-  return 0;
-}