add some tests

This commit is contained in:
virusdefender 2016-01-24 10:22:30 +08:00
parent 92d1f7fb61
commit 77e522c279
36 changed files with 122 additions and 0 deletions

8
tests/10/Main.c Normal file
View File

@ -0,0 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
while(1);
return 0;
}

1
tests/10/config Normal file
View File

@ -0,0 +1 @@
{"language": "c", "max_cpu_time": 300, "max_memory": 200000000}

0
tests/10/in Normal file
View File

0
tests/10/out Normal file
View File

1
tests/10/result Normal file
View File

@ -0,0 +1 @@
{"flag": 1, "signal": 26}

8
tests/11/Main.c Normal file
View File

@ -0,0 +1,8 @@
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[]) {
sleep(1000);
return 0;
}

1
tests/11/config Normal file
View File

@ -0,0 +1 @@
{"language": "c", "max_cpu_time": 300, "max_memory": 200000000, "use_sandbox": false}

0
tests/11/in Normal file
View File

0
tests/11/out Normal file
View File

1
tests/11/result Normal file
View File

@ -0,0 +1 @@
{"flag": 2, "signal": 14}

15
tests/12/12/12/Main.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
// 150m
int big_size = 150 * 1024 * 1024;
int *b = NULL;
b = (int *)malloc(big_size);
memset(b, 0, big_size);
return 0;
}

1
tests/12/12/12/config Normal file
View File

@ -0,0 +1 @@
{"language": "c", "max_cpu_time": 300, "max_memory": 100000000}

0
tests/12/12/12/out Normal file
View File

1
tests/12/12/12/result Normal file
View File

@ -0,0 +1 @@
{"flag": 3, "signal": 0}

15
tests/12/12/Main.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
// 150m
int big_size = 150 * 1024 * 1024;
int *b = NULL;
b = (int *)malloc(big_size);
memset(b, 0, big_size);
return 0;
}

1
tests/12/12/config Normal file
View File

@ -0,0 +1 @@
{"language": "c", "max_cpu_time": 300, "max_memory": 100000000}

0
tests/12/12/out Normal file
View File

1
tests/12/12/result Normal file
View File

@ -0,0 +1 @@
{"flag": 3, "signal": 0}

15
tests/12/Main.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
// 150m
int big_size = 150 * 1024 * 1024;
int *b = NULL;
b = (int *)malloc(big_size);
memset(b, 0, big_size);
return 0;
}

1
tests/12/config Normal file
View File

@ -0,0 +1 @@
{"language": "c", "max_cpu_time": 300, "max_memory": 100000000}

0
tests/12/in Normal file
View File

0
tests/12/out Normal file
View File

1
tests/12/result Normal file
View File

@ -0,0 +1 @@
{"flag": 3, "signal": 0}

15
tests/13/12/12/Main.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
// 150m
int big_size = 150 * 1024 * 1024;
int *b = NULL;
b = (int *)malloc(big_size);
memset(b, 0, big_size);
return 0;
}

1
tests/13/12/12/config Normal file
View File

@ -0,0 +1 @@
{"language": "c", "max_cpu_time": 300, "max_memory": 100000000}

0
tests/13/12/12/out Normal file
View File

1
tests/13/12/12/result Normal file
View File

@ -0,0 +1 @@
{"flag": 3, "signal": 0}

15
tests/13/12/Main.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
// 150m
int big_size = 150 * 1024 * 1024;
int *b = NULL;
b = (int *)malloc(big_size);
memset(b, 0, big_size);
return 0;
}

1
tests/13/12/config Normal file
View File

@ -0,0 +1 @@
{"language": "c", "max_cpu_time": 300, "max_memory": 100000000}

0
tests/13/12/out Normal file
View File

1
tests/13/12/result Normal file
View File

@ -0,0 +1 @@
{"flag": 3, "signal": 0}

15
tests/13/Main.c Normal file
View File

@ -0,0 +1,15 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main()
{
// 300m
int big_size = 300 * 1024 * 1024;
int *b = NULL;
b = (int *)malloc(big_size);
memset(b, 0, big_size);
return 0;
}

1
tests/13/config Normal file
View File

@ -0,0 +1 @@
{"language": "c", "max_cpu_time": 300, "max_memory": 50000000}

0
tests/13/in Normal file
View File

0
tests/13/out Normal file
View File

1
tests/13/result Normal file
View File

@ -0,0 +1 @@
{"flag": 4, "signal": 11}