* negative repeat count for x examines backwards * fortran: support structs/arrays with dynamically types fields * support MPX bound checking * support for the Rust language * 'catch syscall' now can catch groups of related syscalls * New (sub)commands: - skip {-file,-gfile,-function,-rfunction}: generic skip mechanism - maint {selftest,info line-table} - new-ui: create new user interface for GUI clients * (fast) tracepoints on s390x and ppc64le added to gdbserver * New target Andes NDS32 - Remove patch gdb-aarch64-v81-hwbreakpoints.diff (upstream) - Add patches from Fedora package: gdb-6.7-testsuite-stable-results.patch gdb-add-index-chmod.patch gdb-bison-old.patch gdb-container-rh-pkg.patch gdb-libexec-add-index.patch gdb-linux_perf-bundle.patch gdb-physname-pr11734-test.patch gdb-physname-pr12273-test.patch gdb-rhbz1007614-memleak-infpy_read_memory-test.patch gdb-rhbz1084404-ppc64-s390x-wrong-prologue-skip-O2-g-3of3.patch gdb-rhbz1149205-catch-syscall-after-fork-test.patch gdb-rhbz1156192-recursive-dlopen-test.patch gdb-rhbz1186476-internal-error-unqualified-name-re-set-test.patch gdb-rhbz1350436-type-printers-error.patch gdb-test-ivy-bridge.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=151
102 lines
3.1 KiB
Diff
102 lines
3.1 KiB
Diff
gdb/testsuite/gdb.base/fileio.c:
|
|
gdb/testsuite/gdb.base/fileio.exp:
|
|
2007-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
|
|
|
|
* gdb.base/fileio.c (ROOTSUBDIR): New macro.
|
|
(main): CHDIR into ROOTSUBDIR. CHOWN ROOTSUBDIR and CHDIR into
|
|
ROOTSUBDIR if we are being run as root.
|
|
* gdb.base/fileio.exp: Change the startup and finish cleanup.
|
|
Change the test file reference to be into the `fileio.dir' directory.
|
|
|
|
|
|
sources/gdb/testsuite/gdb.base/dump.exp:
|
|
Found on RHEL-5.s390x.
|
|
|
|
|
|
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/auxv.exp:
|
|
random FAIL: gdb.base/auxv.exp: matching auxv data from live and gcore
|
|
|
|
|
|
gdb-6.8.50.20090209/gdb/testsuite/gdb.base/annota1.exp:
|
|
frames-invalid can happen asynchronously.
|
|
|
|
Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.c
|
|
===================================================================
|
|
--- gdb-7.12.orig/gdb/testsuite/gdb.base/fileio.c 2016-08-01 17:50:21.000000000 +0200
|
|
+++ gdb-7.12/gdb/testsuite/gdb.base/fileio.c 2016-10-07 22:49:20.689346914 +0200
|
|
@@ -556,6 +556,28 @@
|
|
int
|
|
main ()
|
|
{
|
|
+ /* These tests
|
|
+ Open for write but no write permission returns EACCES
|
|
+ Unlinking a file in a directory w/o write access returns EACCES
|
|
+ fail if we are being run as root - drop the privileges here. */
|
|
+
|
|
+ if (geteuid () == 0)
|
|
+ {
|
|
+ uid_t uid = 99;
|
|
+
|
|
+ if (chown (OUTDIR, uid, uid) != 0)
|
|
+ {
|
|
+ printf ("chown %d.%d %s: %s\n", (int) uid, (int) uid,
|
|
+ OUTDIR, strerror (errno));
|
|
+ exit (1);
|
|
+ }
|
|
+ if (setuid (uid) || geteuid () == 0)
|
|
+ {
|
|
+ printf ("setuid %d: %s\n", (int) uid, strerror (errno));
|
|
+ exit (1);
|
|
+ }
|
|
+ }
|
|
+
|
|
/* Don't change the order of the calls. They partly depend on each other */
|
|
test_open ();
|
|
test_write ();
|
|
Index: gdb-7.12/gdb/testsuite/gdb.base/fileio.exp
|
|
===================================================================
|
|
--- gdb-7.12.orig/gdb/testsuite/gdb.base/fileio.exp 2016-08-01 17:50:21.000000000 +0200
|
|
+++ gdb-7.12/gdb/testsuite/gdb.base/fileio.exp 2016-10-07 22:54:44.680071906 +0200
|
|
@@ -24,9 +24,9 @@
|
|
standard_testfile
|
|
|
|
if {[is_remote host]} {
|
|
- set outdir .
|
|
+ set outdir "fileio.dir"
|
|
} else {
|
|
- set outdir [standard_output_file {}]
|
|
+ set outdir [standard_output_file "fileio.dir"]
|
|
}
|
|
|
|
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
|
|
@@ -47,7 +47,8 @@
|
|
if {[file exists $dir2] && ![file writable $dir2]} {
|
|
system "chmod +w $dir2"
|
|
}
|
|
-system "rm -rf [standard_output_file *.fileio.test]"
|
|
+system "rm -rf [standard_output_file fileio.dir]"
|
|
+system "mkdir -m777 [standard_output_file fileio.dir]"
|
|
|
|
set oldtimeout $timeout
|
|
set timeout [expr "$timeout + 60"]
|
|
@@ -89,7 +90,7 @@
|
|
|
|
gdb_test "continue" ".*" ""
|
|
|
|
-catch "system \"chmod -f -w [standard_output_file nowrt.fileio.test]\""
|
|
+catch "system \"chmod -f -w [standard_output_file fileio.dir/nowrt.fileio.test]\""
|
|
|
|
gdb_test continue \
|
|
"Continuing\\..*open 5:.*EACCES$stop_msg" \
|
|
@@ -276,9 +277,7 @@
|
|
gdb_exit
|
|
|
|
# Make dir2 writable again so rm -rf of a build tree Just Works.
|
|
-if {[file exists $dir2] && ![file writable $dir2]} {
|
|
- system "chmod +w $dir2"
|
|
-}
|
|
+system "chmod -R +w $outdir"
|
|
|
|
set timeout $oldtimeout
|
|
return 0
|