Skip to content

Commit 97059bb

Browse files
committed
logs-all: more dirs
but not using find yet
1 parent af2848d commit 97059bb

File tree

3 files changed

+42
-6
lines changed

3 files changed

+42
-6
lines changed

logs-all-parallel.sh.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,21 @@ if test -d "$srcdir/test/test-old"; then
3131
done
3232
cd "$abs_builddir" || exit
3333
fi
34+
35+
if test -d "$srcdir/test/issues"; then
36+
echo test/issues
37+
cd "$srcdir/test/issues" || exit
38+
for d in *; do
39+
cd "$d" || continue
40+
@PARALLEL@ @TIMEOUT_30@ "$abs_builddir/libtool" --mode=execute "$abs_builddir/programs/dwgread" -v4 {} \2\>$abs_builddir/{/.}_{//}_"$d".log ::: */*.dwg
41+
cd .. || exit
42+
done
43+
cd "$abs_builddir" || exit
44+
fi
45+
46+
if test -d "$srcdir/test/ossfuzz"; then
47+
echo test/ossfuzz
48+
cd "$srcdir/test/ossfuzz" || exit
49+
@PARALLEL@ @TIMEOUT_30@ "$abs_builddir/libtool" --mode=execute "$abs_builddir/programs/dwgread" -v4 {} \2\>$abs_builddir/{/.}_{//}_"$d".log ::: indwg/cluster* indwg11/cluster*
50+
cd "$abs_builddir" || exit
51+
fi

logs-all-serial.sh.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,23 @@ if test -d "$srcdir/test/test-old"; then
5050
cd "$abs_builddir" || exit
5151
fi
5252

53+
for d in "$srcdir"/test/issues/*/*.dwg; do
54+
xd="$(dirname "$d")"
55+
dir="$(basename "$xd")"
56+
log="$(basename "$d" .dwg)_$dir.log"
57+
echo "$d" || exit
58+
@TIMEOUT_30@ ./libtool --mode=execute programs/dwgread -v3 "$d" 2>"$log"
59+
#(sleep 10s; kill %1 2>/dev/null) &
60+
done
61+
62+
for d in "$srcdir"/test/ossfuzz/indwg*/cluster*; do
63+
xd="$(dirname "$d")"
64+
dir="$(basename "$xd")"
65+
log="$(basename "$d")_$dir.log"
66+
echo "$d" || exit
67+
@TIMEOUT_30@ ./libtool --mode=execute programs/dwgread -v3 "$d" 2>"$log"
68+
#(sleep 10s; kill %1 2>/dev/null) &
69+
done
70+
5371
#with background killing we would need to wait for all processes to end
5472
# while pgrep dwgread; do sleep 1; done

src/dwg.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1889,7 +1889,7 @@ dwg_resbuf_value_type (short gc)
18891889
return DWG_VT_STRING;
18901890
if (gc <= 998)
18911891
return DWG_VT_INVALID;
1892-
if (gc == 999)
1892+
if (gc == 999) // comparison could be removed
18931893
return DWG_VT_STRING; // lgtm [cpp/constant-comparison]
18941894
}
18951895
}
@@ -1905,7 +1905,7 @@ dwg_resbuf_value_type (short gc)
19051905
return DWG_VT_STRING;
19061906
if (gc <= 429)
19071907
return DWG_VT_INT32;
1908-
if (gc <= 439)
1908+
if (gc <= 439) // comparison could be removed
19091909
return DWG_VT_STRING; // lgtm [cpp/constant-comparison]
19101910
}
19111911
else // 330-389
@@ -1920,7 +1920,7 @@ dwg_resbuf_value_type (short gc)
19201920
350-359 SoftOwner, 360-369 HardOwner */
19211921
if (gc <= 369)
19221922
return DWG_VT_OBJECTID;
1923-
if (gc <= 389)
1923+
if (gc <= 389) // comparison could be removed
19241924
return DWG_VT_INT16; // lgtm [cpp/constant-comparison]
19251925
}
19261926
}
@@ -1937,7 +1937,7 @@ dwg_resbuf_value_type (short gc)
19371937
return DWG_VT_INT16;
19381938
if (gc <= 289)
19391939
return DWG_VT_INT8;
1940-
if (gc <= 299)
1940+
if (gc <= 299) // comparison could be removed
19411941
return DWG_VT_BOOL; // lgtm [cpp/constant-comparison]
19421942
}
19431943
else // 105-209
@@ -1956,7 +1956,7 @@ dwg_resbuf_value_type (short gc)
19561956
return DWG_VT_INT64;
19571957
if (gc <= 179)
19581958
return DWG_VT_INT16;
1959-
if (gc <= 209)
1959+
if (gc <= 209) // comparison could be removed
19601960
return DWG_VT_INVALID; // lgtm [cpp/constant-comparison]
19611961
}
19621962
}
@@ -1983,7 +1983,7 @@ dwg_resbuf_value_type (short gc)
19831983
return DWG_VT_HANDLE;
19841984
if (gc <= 9)
19851985
return DWG_VT_STRING; // but 9 never TU
1986-
if (gc <= 37)
1986+
if (gc <= 37) // comparison could be removed
19871987
return DWG_VT_POINT3D; // lgtm [cpp/constant-comparison]
19881988
}
19891989
}

0 commit comments

Comments
 (0)