File tree Expand file tree Collapse file tree 10 files changed +91
-24
lines changed Expand file tree Collapse file tree 10 files changed +91
-24
lines changed Original file line number Diff line number Diff line change 15
15
- name : Prepare
16
16
run : |
17
17
sudo apt-get update
18
- sudo apt-get install -y libssl-dev libcurl4-openssl-dev uncrustify
18
+ sudo apt-get install -y libssl-dev libcurl4-openssl-dev uncrustify valgrind
19
19
- name : Prepare libwebsockets
20
20
run : |
21
21
git clone https://libwebsockets.org/repo/libwebsockets --depth 1 --branch v4.2-stable
65
65
kubectl describe node
66
66
cd examples/
67
67
LD_LIBRARY_PATH=$GITHUB_WORKSPACE/kubernetes/build/:/usr/local/lib make test
68
+ - name : Valgrind memory check for examples
69
+ run : |
70
+ kubectl cluster-info --context kind-chart-testing
71
+ kubectl describe node
72
+ cd examples/
73
+ LD_LIBRARY_PATH=$GITHUB_WORKSPACE/kubernetes/build/:/usr/local/lib make memcheck
Original file line number Diff line number Diff line change @@ -27,12 +27,27 @@ clean:
27
27
cd configmap; make clean
28
28
29
29
test :
30
- cd create_pod; make test ; sleep 10
30
+ cd create_pod; make test ;
31
+ kubectl wait --for=condition=ready --all pod -n default --timeout=60s
31
32
cd list_pod; make test
32
33
cd delete_pod; make test
33
34
cd list_secret; make test
34
35
cd configmap; make test
35
36
cd generic; make test
36
- cd multi_thread; make test ; sleep 10
37
+ cd multi_thread; make test ;
38
+ kubectl wait --for=condition=ready pod/test-pod-8 -n default --timeout=60s
37
39
kubectl describe po test-pod-8
38
- cd exec_pod; make test
40
+ cd exec_pod; make test
41
+
42
+ memcheck :
43
+ cd create_pod; make memcheck;
44
+ kubectl wait --for=condition=ready --all pod -n default --timeout=60s
45
+ cd list_pod; make memcheck
46
+ cd delete_pod; make memcheck
47
+ cd list_secret; make memcheck
48
+ cd configmap; make memcheck
49
+ cd generic; make memcheck
50
+ cd multi_thread; make memcheck;
51
+ kubectl wait --for=condition=ready pod/test-pod-8 -n default --timeout=60s
52
+ kubectl describe po test-pod-8
53
+ cd exec_pod; make memcheck
Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ LIBS:=-L../../kubernetes/build -lkubernetes -lyaml -lwebsockets -L/usr/local/lib
3
3
CFLAGS: =-g
4
4
BIN: =configmap_bin
5
5
6
+ .PHONY : all clean test memcheck
6
7
all :
7
8
gcc main.c $(CFLAGS ) $(INCLUDE ) $(LIBS ) -o $(BIN )
8
- clean :
9
- rm ./$(BIN )
9
+
10
10
test :
11
11
./$(BIN )
12
+
13
+ memcheck :
14
+ valgrind --tool=memcheck --leak-check=full ./$(BIN )
15
+
16
+ clean :
17
+ rm ./$(BIN )
Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ LIBS:=-L../../kubernetes/build -lkubernetes -lyaml -lwebsockets -L/usr/local/lib
3
3
CFLAGS: =-g
4
4
BIN: =create_pod_bin
5
5
6
+ .PHONY : all clean test memcheck
6
7
all :
7
8
gcc main.c $(CFLAGS ) $(INCLUDE ) $(LIBS ) -o $(BIN )
8
- clean :
9
- rm ./$(BIN )
9
+
10
10
test :
11
11
./$(BIN )
12
+
13
+ memcheck :
14
+ valgrind --tool=memcheck --leak-check=full ./$(BIN )
15
+
16
+ clean :
17
+ rm ./$(BIN )
Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ LIBS:=-L../../kubernetes/build -lkubernetes -lyaml -lwebsockets -L/usr/local/lib
3
3
CFLAGS: =-g
4
4
BIN: =delete_pod_bin
5
5
6
+ .PHONY : all clean test memcheck
6
7
all :
7
8
gcc main.c $(CFLAGS ) $(INCLUDE ) $(LIBS ) -o $(BIN )
8
- clean :
9
- rm ./$(BIN )
9
+
10
10
test :
11
11
./$(BIN )
12
+
13
+ memcheck :
14
+ valgrind --tool=memcheck --leak-check=full ./$(BIN )
15
+
16
+ clean :
17
+ rm ./$(BIN )
Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ LIBS:=-L../../kubernetes/build -lkubernetes -lyaml -lwebsockets -L/usr/local/lib
3
3
CFLAGS: =-g
4
4
BIN: =exec_pod_bin
5
5
6
+ .PHONY : all clean test memcheck
6
7
all :
7
8
gcc main.c $(CFLAGS ) $(INCLUDE ) $(LIBS ) -o $(BIN )
8
- clean :
9
- rm ./$(BIN )
9
+
10
10
test :
11
11
./$(BIN ) only-run-case-1
12
+
13
+ memcheck :
14
+ valgrind --tool=memcheck --leak-check=full ./$(BIN ) only-run-case-1
15
+
16
+ clean :
17
+ rm ./$(BIN )
Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ LIBS:=-L../../kubernetes/build -lkubernetes -lyaml -lwebsockets -L/usr/local/lib
3
3
CFLAGS: =-g
4
4
BIN: =generic_bin
5
5
6
+ .PHONY : all clean test memcheck
6
7
all :
7
- gcc main.c $(CFLAGS ) $(INCLUDE ) $(LIBS ) -o $(BIN )
8
- clean :
9
- rm ./$(BIN )
8
+ gcc main.c $(CFLAGS ) $(INCLUDE ) $(LIBS ) -o $(BIN )
9
+
10
10
test :
11
- ./$(BIN )
11
+ ./$(BIN )
12
+
13
+ memcheck :
14
+ valgrind --tool=memcheck --leak-check=full ./$(BIN )
15
+
16
+ clean :
17
+ rm ./$(BIN )
Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ LIBS:=-L../../kubernetes/build -lyaml -lwebsockets -lkubernetes -L/usr/local/lib
3
3
CFLAGS: =-g
4
4
BIN: =list_pod_bin
5
5
6
+ .PHONY : all clean test memcheck
6
7
all :
7
8
gcc main.c $(CFLAGS ) $(INCLUDE ) $(LIBS ) -o $(BIN )
8
- clean :
9
- rm ./$(BIN )
9
+
10
10
test :
11
11
./$(BIN )
12
+
13
+ memcheck :
14
+ valgrind --tool=memcheck --leak-check=full ./$(BIN )
15
+
16
+ clean :
17
+ rm ./$(BIN )
Original file line number Diff line number Diff line change @@ -3,9 +3,15 @@ LIBS:=-L../../kubernetes/build -lkubernetes -lyaml -lwebsockets -L/usr/local/lib
3
3
CFLAGS: =-g
4
4
BIN: =list_secret_bin
5
5
6
+ .PHONY : all clean test memcheck
6
7
all :
7
8
gcc main.c $(CFLAGS ) $(INCLUDE ) $(LIBS ) -o $(BIN )
8
- clean :
9
- rm ./$(BIN )
9
+
10
+ memcheck :
11
+ valgrind --tool=memcheck --leak-check=full ./$(BIN )
12
+
10
13
test :
11
14
./$(BIN )
15
+
16
+ clean :
17
+ rm ./$(BIN )
Original file line number Diff line number Diff line change @@ -5,14 +5,18 @@ CFLAGS:=-g
5
5
BIN: = multi_thread_bin
6
6
OBJECTS: =main.o watch_pod.o create_pod.o
7
7
8
+ .PHONY : all clean test memcheck
8
9
all : $(OBJECTS )
9
10
$(CC ) -o $(BIN ) $(OBJECTS ) $(LIBS )
10
11
11
12
$(OBJECTS ) : % .o: % .c
12
13
$(CC ) $(CFLAGS ) $(INCLUDE ) -c $< -o $@
13
14
14
- .PHONY : clean test
15
- clean :
16
- rm $(BIN ) $(OBJECTS )
17
15
test :
18
- ./$(BIN )
16
+ ./$(BIN )
17
+
18
+ memcheck :
19
+ valgrind --tool=memcheck --leak-check=full ./$(BIN )
20
+
21
+ clean :
22
+ rm $(BIN ) $(OBJECTS )
You can’t perform that action at this time.
0 commit comments