File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change 5757
5858if [ $# -ge 2 ] && [ " $2 " = " 1" ]; then
5959 readonly SHECC_CFLAGS=" --dynlink"
60+ readonly IS_DYNLINK=" 1"
6061else
6162 readonly SHECC_CFLAGS=" "
63+ readonly IS_DYNLINK=" 0"
6264fi
6365
6466# Utility Functions
@@ -2098,6 +2100,7 @@ EOF
20982100# Category: Memory Management
20992101begin_category " Memory Management" " Testing malloc, free, and dynamic memory allocation"
21002102
2103+ if [ " $IS_DYNLINK " = " 0" ]; then
21012104# malloc and free
21022105try_ 1 << EOF
21032106int main()
@@ -2113,6 +2116,9 @@ int main()
21132116 return a == b;
21142117}
21152118EOF
2119+ else
2120+ echo " Skip test cases in dynamic linking mode"
2121+ fi # "IS_DYNLINK" = "0"
21162122
21172123try_ 1 << EOF
21182124int main()
@@ -3228,6 +3234,8 @@ int main()
32283234}
32293235EOF
32303236
3237+ if [ " $IS_DYNLINK " = " 0" ]; then
3238+
32313239# printf family, including truncation and zero size input
32323240try_output 11 " Hello World" << EOF
32333241int main() {
@@ -3387,6 +3395,9 @@ int main()
33873395 return c == -1;
33883396}
33893397EOF
3398+ else
3399+ echo " Skip test cases in dynamic linking mode"
3400+ fi # "IS_DYNLINK" = "0"
33903401
33913402# tests integer type conversion
33923403# excerpted and modified from issue #166
You can’t perform that action at this time.
0 commit comments