Skip to content

Commit c753de1

Browse files
committed
tests: Add test for 'profile count data file not found' warnings
1 parent 0f73f85 commit c753de1

7 files changed

+37884
-0
lines changed

Diff for: tests/csdiff/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,6 @@ test_csdiff(diff-misc 11-pylint-copr-json)
7979
test_csdiff(diff-misc 12-shellcheck-sc222x)
8080
test_csdiff(diff-misc 13-gcca-filt)
8181
test_csdiff(diff-misc 14-gitleaks-paths)
82+
test_csdiff(diff-misc 15-gcc-prof-filter)
8283

8384
add_subdirectory(filter-file)

Diff for: tests/csdiff/diff-misc/15-gcc-prof-filter-add-z.err

+1,678
Large diffs are not rendered by default.

Diff for: tests/csdiff/diff-misc/15-gcc-prof-filter-add.err

+1,678
Large diffs are not rendered by default.

Diff for: tests/csdiff/diff-misc/15-gcc-prof-filter-fix-z.err

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Error: COMPILER_WARNING:
2+
Python-3.12.0/Modules/_io/bufferedio.c: scope_hint: In function ‘_io_BufferedRandom___init__’
3+
Python-3.12.0/Modules/_io/bufferedio.c:2692:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/bufferedio.gcda’ profile count data file not found
4+
# 2690| Py_TPFLAGS_IMMUTABLETYPE),
5+
# 2691| .slots = bufferedrandom_slots,
6+
# 2692|-> };
7+
8+
Error: COMPILER_WARNING:
9+
Python-3.12.0/Modules/_testcapi/exceptions.c: scope_hint: In function ‘_PyTestCapi_Init_Exceptions’
10+
Python-3.12.0/Modules/_testcapi/exceptions.c:414:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/exceptions.gcda’ profile count data file not found
11+
# 412|
12+
# 413| return 0;
13+
# 414|-> }
14+
15+
Error: COMPILER_WARNING:
16+
Python-3.12.0/Modules/_tkinter.c: scope_hint: In function ‘PyInit__tkinter’
17+
Python-3.12.0/Modules/_tkinter.c:3361:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/_tkinter.gcda’ profile count data file not found
18+
# 3359|
19+
# 3360| return m;
20+
# 3361|-> }
21+
22+
Error: COMPILER_WARNING:
23+
Python-3.12.0/Modules/cjkcodecs/multibytecodec.c: scope_hint: In function ‘PyInit__multibytecodec’
24+
Python-3.12.0/Modules/cjkcodecs/multibytecodec.c:2084:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/multibytecodec.gcda’ profile count data file not found
25+
# 2082| {
26+
# 2083| return PyModuleDef_Init(&_multibytecodecmodule);
27+
# 2084|-> }
28+
29+
Error: COMPILER_WARNING:
30+
Python-3.12.0/Objects/codeobject.c: scope_hint: In function ‘_Py_MakeShimCode’
31+
Python-3.12.0/Objects/codeobject.c:2400:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/codeobject.gcda’ profile count data file not found
32+
# 2398| Py_XDECREF(lines);
33+
# 2399| return codeobj;
34+
# 2400|-> }
35+
36+
Error: COMPILER_WARNING:
37+
Python-3.12.0/Objects/exceptions.c: scope_hint: In function ‘_PyException_AddNote’
38+
Python-3.12.0/Objects/exceptions.c:3844:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/exceptions.gcda’ profile count data file not found
39+
# 3842| Py_XDECREF(r);
40+
# 3843| return res;
41+
# 3844|-> }
42+
# 3845|
43+
44+
Error: COMPILER_WARNING:
45+
Python-3.12.0/Python/_warnings.c: scope_hint: In function ‘_PyWarnings_Fini’
46+
Python-3.12.0/Python/_warnings.c:1481:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/_warnings.gcda’ profile count data file not found
47+
# 1479| {
48+
# 1480| warnings_clear_state(&interp->warnings);
49+
# 1481|-> }
50+
51+
Error: COMPILER_WARNING:
52+
Python-3.12.0/Python/errors.c: scope_hint: In function ‘PyErr_ProgramTextObject’
53+
Python-3.12.0/Python/errors.c:1951:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/errors.gcda’ profile count data file not found
54+
# 1949| {
55+
# 1950| return _PyErr_ProgramDecodedTextObject(filename, lineno, NULL);
56+
# 1951|-> }
57+
# 1952|
58+
# 1953| #ifdef __cplusplus
59+
60+
Error: COMPILER_WARNING:
61+
Python-3.12.0/Python/flowgraph.c: scope_hint: In function ‘_PyCfg_OptimizeCodeUnit’
62+
Python-3.12.0/Python/flowgraph.c:2218:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/flowgraph.gcda’ profile count data file not found
63+
# 2216| RETURN_IF_ERROR(resolve_line_numbers(g, firstlineno));
64+
# 2217| return SUCCESS;
65+
# 2218|-> }
66+
67+
Error: COMPILER_WARNING:
68+
Python-3.12.0/Python/hamt.c: scope_hint: In function ‘hamt_py_keys’
69+
Python-3.12.0/Python/hamt.c:2894:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/hamt.gcda’ profile count data file not found
70+
# 2892| .tp_free = PyObject_GC_Del,
71+
# 2893| .tp_hash = PyObject_HashNotImplemented,
72+
# 2894|-> };
73+
74+
Error: COMPILER_WARNING:
75+
Python-3.12.0/Python/sysmodule.c: scope_hint: In function ‘PySys_FormatStderr’
76+
Python-3.12.0/Python/sysmodule.c:3892:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/sysmodule.gcda’ profile count data file not found
77+
# 3890| sys_format(&_Py_ID(stderr), stderr, format, va);
78+
# 3891| va_end(va);
79+
# 3892|-> }

Diff for: tests/csdiff/diff-misc/15-gcc-prof-filter-fix.err

+79
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
Error: COMPILER_WARNING:
2+
Python-3.12.0/Modules/_io/bufferedio.c: scope_hint: In function ‘_io_BufferedRandom___init__’
3+
Python-3.12.0/Modules/_io/bufferedio.c:2692:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/bufferedio.gcda’ profile count data file not found
4+
# 2690| Py_TPFLAGS_IMMUTABLETYPE),
5+
# 2691| .slots = bufferedrandom_slots,
6+
# 2692|-> };
7+
8+
Error: COMPILER_WARNING:
9+
Python-3.12.0/Modules/_testcapi/exceptions.c: scope_hint: In function ‘_PyTestCapi_Init_Exceptions’
10+
Python-3.12.0/Modules/_testcapi/exceptions.c:414:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/exceptions.gcda’ profile count data file not found
11+
# 412|
12+
# 413| return 0;
13+
# 414|-> }
14+
15+
Error: COMPILER_WARNING:
16+
Python-3.12.0/Modules/_tkinter.c: scope_hint: In function ‘PyInit__tkinter’
17+
Python-3.12.0/Modules/_tkinter.c:3361:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/_tkinter.gcda’ profile count data file not found
18+
# 3359|
19+
# 3360| return m;
20+
# 3361|-> }
21+
22+
Error: COMPILER_WARNING:
23+
Python-3.12.0/Modules/cjkcodecs/multibytecodec.c: scope_hint: In function ‘PyInit__multibytecodec’
24+
Python-3.12.0/Modules/cjkcodecs/multibytecodec.c:2084:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/multibytecodec.gcda’ profile count data file not found
25+
# 2082| {
26+
# 2083| return PyModuleDef_Init(&_multibytecodecmodule);
27+
# 2084|-> }
28+
29+
Error: COMPILER_WARNING:
30+
Python-3.12.0/Objects/codeobject.c: scope_hint: In function ‘_Py_MakeShimCode’
31+
Python-3.12.0/Objects/codeobject.c:2400:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/codeobject.gcda’ profile count data file not found
32+
# 2398| Py_XDECREF(lines);
33+
# 2399| return codeobj;
34+
# 2400|-> }
35+
36+
Error: COMPILER_WARNING:
37+
Python-3.12.0/Objects/exceptions.c: scope_hint: In function ‘_PyException_AddNote’
38+
Python-3.12.0/Objects/exceptions.c:3844:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/exceptions.gcda’ profile count data file not found
39+
# 3842| Py_XDECREF(r);
40+
# 3843| return res;
41+
# 3844|-> }
42+
# 3845|
43+
44+
Error: COMPILER_WARNING:
45+
Python-3.12.0/Python/_warnings.c: scope_hint: In function ‘_PyWarnings_Fini’
46+
Python-3.12.0/Python/_warnings.c:1481:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/_warnings.gcda’ profile count data file not found
47+
# 1479| {
48+
# 1480| warnings_clear_state(&interp->warnings);
49+
# 1481|-> }
50+
51+
Error: COMPILER_WARNING:
52+
Python-3.12.0/Python/errors.c: scope_hint: In function ‘PyErr_ProgramTextObject’
53+
Python-3.12.0/Python/errors.c:1951:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/errors.gcda’ profile count data file not found
54+
# 1949| {
55+
# 1950| return _PyErr_ProgramDecodedTextObject(filename, lineno, NULL);
56+
# 1951|-> }
57+
# 1952|
58+
# 1953| #ifdef __cplusplus
59+
60+
Error: COMPILER_WARNING:
61+
Python-3.12.0/Python/flowgraph.c: scope_hint: In function ‘_PyCfg_OptimizeCodeUnit’
62+
Python-3.12.0/Python/flowgraph.c:2218:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/flowgraph.gcda’ profile count data file not found
63+
# 2216| RETURN_IF_ERROR(resolve_line_numbers(g, firstlineno));
64+
# 2217| return SUCCESS;
65+
# 2218|-> }
66+
67+
Error: COMPILER_WARNING:
68+
Python-3.12.0/Python/hamt.c: scope_hint: In function ‘hamt_py_keys’
69+
Python-3.12.0/Python/hamt.c:2894:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/hamt.gcda’ profile count data file not found
70+
# 2892| .tp_free = PyObject_GC_Del,
71+
# 2893| .tp_hash = PyObject_HashNotImplemented,
72+
# 2894|-> };
73+
74+
Error: COMPILER_WARNING:
75+
Python-3.12.0/Python/sysmodule.c: scope_hint: In function ‘PySys_FormatStderr’
76+
Python-3.12.0/Python/sysmodule.c:3892:1: warning[-Wmissing-profile]: ‘/builddir/build/BUILD/Python-3.12.0/build/optimized/sysmodule.gcda’ profile count data file not found
77+
# 3890| sys_format(&_Py_ID(stderr), stderr, format, va);
78+
# 3891| va_end(va);
79+
# 3892|-> }

0 commit comments

Comments
 (0)