commit ca8b7921798189e47b45ac7e105f378e463e2625
Author: David Malcolm <dmalcolm(a)redhat.com>
Date: Tue Mar 27 16:32:19 2012 -0400
cpychecker: move tests/cpychecker/refcounts/cplusplus -> tests/cpychecker/refcounts/cplusplus/simple
.../refcounts/cplusplus/{ => simple}/input.cc | 0
.../refcounts/cplusplus/{ => simple}/metadata.ini | 0
.../refcounts/cplusplus/{ => simple}/script.py | 0
.../refcounts/cplusplus/simple/stderr.txt | 12 ++++++
.../refcounts/cplusplus/{ => simple}/stdout.txt | 36 ++++++++++----------
tests/cpychecker/refcounts/cplusplus/stderr.txt | 12 ------
6 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/tests/cpychecker/refcounts/cplusplus/input.cc b/tests/cpychecker/refcounts/cplusplus/simple/input.cc
similarity index 100%
rename from tests/cpychecker/refcounts/cplusplus/input.cc
rename to tests/cpychecker/refcounts/cplusplus/simple/input.cc
diff --git a/tests/cpychecker/refcounts/cplusplus/metadata.ini b/tests/cpychecker/refcounts/cplusplus/simple/metadata.ini
similarity index 100%
rename from tests/cpychecker/refcounts/cplusplus/metadata.ini
rename to tests/cpychecker/refcounts/cplusplus/simple/metadata.ini
diff --git a/tests/cpychecker/refcounts/cplusplus/script.py b/tests/cpychecker/refcounts/cplusplus/simple/script.py
similarity index 100%
rename from tests/cpychecker/refcounts/cplusplus/script.py
rename to tests/cpychecker/refcounts/cplusplus/simple/script.py
diff --git a/tests/cpychecker/refcounts/cplusplus/simple/stderr.txt b/tests/cpychecker/refcounts/cplusplus/simple/stderr.txt
new file mode 100644
index 0000000..95ec022
--- /dev/null
+++ b/tests/cpychecker/refcounts/cplusplus/simple/stderr.txt
@@ -0,0 +1,12 @@
+tests/cpychecker/refcounts/cplusplus/simple/input.cc: In function 'PyObject* test(int)':
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:38:1: warning: ob_refcnt of return value is 1 too low [enabled by default]
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:38:1: note: was expecting final ob_refcnt to be N + 1 (for some unknown N)
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:38:1: note: due to object being referenced by: return value
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:38:1: note: but final ob_refcnt is N + 0
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:27:5: note: when considering value == (int)0 from tests/cpychecker/refcounts/cplusplus/simple/input.cc:25 at: if (i) {
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:27:5: note: taking False path at: if (i) {
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:36:16: note: reaching: return Py_None;
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:27:5: note: ob_refcnt is now refs: 0 + N where N >= 1
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:38:1: note: returning
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:38:1: note: consider using "Py_RETURN_NONE;"
+tests/cpychecker/refcounts/cplusplus/simple/input.cc:26:1: note: graphical error report for function 'test' written out to 'tests/cpychecker/refcounts/cplusplus/simple/input.cc.test-refcount-errors.html'
diff --git a/tests/cpychecker/refcounts/cplusplus/stdout.txt b/tests/cpychecker/refcounts/cplusplus/simple/stdout.txt
similarity index 56%
rename from tests/cpychecker/refcounts/cplusplus/stdout.txt
rename to tests/cpychecker/refcounts/cplusplus/simple/stdout.txt
index 6a462cb..7a531fb 100644
--- a/tests/cpychecker/refcounts/cplusplus/stdout.txt
+++ b/tests/cpychecker/refcounts/cplusplus/simple/stdout.txt
@@ -5,12 +5,12 @@ Trace 0:
'when PyDict_New() succeeds'
'returning'
Return value:
- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32)))
- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32)) from tests/cpychecker/refcounts/cplusplus/input.cc:32
+ repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32)))
+ str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32)) from tests/cpychecker/refcounts/cplusplus/simple/input.cc:32
r->ob_refcnt: refs: 1 + N where N >= 0
- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type')))
+ r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type')))
Exception:
- (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/input.cc:26
+ (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/simple/input.cc:26
Trace 1:
Transitions:
@@ -19,23 +19,23 @@ Trace 1:
'when PyDict_New() fails'
'returning'
Return value:
- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32), value=0)
- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/input.cc:32
+ repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32), value=0)
+ str(): (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/simple/input.cc:32
Exception:
- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/cplusplus/input.cc:32
+ (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/cplusplus/simple/input.cc:32
Trace 2:
Transitions:
- 'when considering value == (int)0 from tests/cpychecker/refcounts/cplusplus/input.cc:25'
+ 'when considering value == (int)0 from tests/cpychecker/refcounts/cplusplus/simple/input.cc:25'
'taking False path'
'returning'
Return value:
- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=36), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')))
- str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/cplusplus/input.cc:36
+ repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=36), region=RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')))
+ str(): (struct PyObject *)&RegionForGlobal(gcc.VarDecl('_Py_NoneStruct')) from tests/cpychecker/refcounts/cplusplus/simple/input.cc:36
r->ob_refcnt: refs: 0 + N where N >= 1
r->ob_type: None
Exception:
- (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/input.cc:26
+ (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/simple/input.cc:26
Trace 3:
Transitions:
@@ -44,12 +44,12 @@ Trace 3:
'when PyDict_New() succeeds'
'returning'
Return value:
- repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32)))
- str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32)) from tests/cpychecker/refcounts/cplusplus/input.cc:32
+ repr(): PointerToRegion(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32), region=RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32)))
+ str(): (struct PyObject *)&RegionOnHeap('PyDictObject', gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32)) from tests/cpychecker/refcounts/cplusplus/simple/input.cc:32
r->ob_refcnt: refs: 1 + N where N >= 0
- r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type')))
+ r->ob_type: PointerToRegion(gcctype='struct PyTypeObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32), region=RegionForGlobal(gcc.VarDecl('PyDict_Type')))
Exception:
- (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/input.cc:26
+ (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/simple/input.cc:26
Trace 4:
Transitions:
@@ -58,7 +58,7 @@ Trace 4:
'when PyDict_New() fails'
'returning'
Return value:
- repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/input.cc', line=32), value=0)
- str(): (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/input.cc:32
+ repr(): ConcreteValue(gcctype='struct PyObject *', loc=gcc.Location(file='tests/cpychecker/refcounts/cplusplus/simple/input.cc', line=32), value=0)
+ str(): (struct PyObject *)0 from tests/cpychecker/refcounts/cplusplus/simple/input.cc:32
Exception:
- (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/cplusplus/input.cc:32
+ (struct PyObject *)&RegionForGlobal(gcc.VarDecl('PyExc_MemoryError')) from tests/cpychecker/refcounts/cplusplus/simple/input.cc:32