Add a testcase to limit open files to 16 for AR with plugin. Before
commit
103da91bc083f94769e3758175a96d06cef1f8fe
Author: Nick Clifton <nickc@redhat.com>
Date: Wed Aug 1 14:34:41 2018 +0100
Close resource leaks in the BFD library's plugin handler.
it failed with:
../binutils/ar: tmpdir/pr23460f.o: plugin needed to handle lto object
PR binutils/23460
* testsuite/ld-plugin/lto.exp: Run the PR binutils/23460 test.
* testsuite/ld-plugin/pr23460a.c: New file.
* testsuite/ld-plugin/pr23460b.c: Likewise.
* testsuite/ld-plugin/pr23460c.c: Likewise.
* testsuite/ld-plugin/pr23460d.c: Likewise.
* testsuite/ld-plugin/pr23460e.c: Likewise.
* testsuite/ld-plugin/pr23460f.c: Likewise.
+2018-08-02 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR binutils/23460
+ * testsuite/ld-plugin/lto.exp: Run the PR binutils/23460 test.
+ * testsuite/ld-plugin/pr23460a.c: New file.
+ * testsuite/ld-plugin/pr23460b.c: Likewise.
+ * testsuite/ld-plugin/pr23460c.c: Likewise.
+ * testsuite/ld-plugin/pr23460d.c: Likewise.
+ * testsuite/ld-plugin/pr23460e.c: Likewise.
+ * testsuite/ld-plugin/pr23460f.c: Likewise.
+
2018-08-01 Roland McGrath <mcgrathr@google.com>
* testsuite/ld-aarch64/ifunc-1-local.d: Adjust regexps to match
} {
fail $testname
}
+
+ run_cc_link_tests [list \
+ [list \
+ "Build pr23460*.o" \
+ "$plug_opt" \
+ "-O2 -fPIC -flto $lto_no_fat" \
+ {pr23460a.c pr23460b.c pr23460c.c \
+ pr23460d.c pr23460e.c pr23460f.c} \
+ ] \
+ ]
+ set exec_output [run_host_cmd "sh" \
+ "-c \"ulimit -n 16; \
+ $ar -rc $plug_opt \
+ tmpdir/libpr23460.a \
+ tmpdir/pr23460a.o \
+ tmpdir/pr23460b.o \
+ tmpdir/pr23460c.o \
+ tmpdir/pr23460d.o \
+ tmpdir/pr23460e.o \
+ tmpdir/pr23460f.o\""]
+ set exec_output [prune_warnings $exec_output]
+ if [string match "" $exec_output] then {
+ pass "PR binutils/23460"
+ } else {
+ fail "PR binutils/23460"
+ }
}
# Run "ld -r" to generate inputs for complex LTO tests.
--- /dev/null
+void
+x1 (void)
+{
+}
--- /dev/null
+void
+x2 (void)
+{
+}
--- /dev/null
+void
+x3 (void)
+{
+}
--- /dev/null
+void
+x4 (void)
+{
+}
--- /dev/null
+void
+x5 (void)
+{
+}
--- /dev/null
+void
+x6 (void)
+{
+}