File: README.md

package info (click to toggle)
criu 4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,500 kB
  • sloc: ansic: 139,280; python: 7,484; sh: 3,824; java: 2,799; makefile: 2,659; asm: 1,137; perl: 206; xml: 117; exp: 45
file content (50 lines) | stat: -rw-r--r-- 2,395 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# JavaTests

Java Functional tests checks the Java File based APIs and Memory mapping APIs by placing the process in various states before checkpointing and validates if these resources are still accessible after restore. It also validates if the file contents are in expected states.

Tests are to be run by a user having following capabilities:  
CAP_DAC_OVERRIDE  
CAP_CHOWN  
CAP_SETPCAP  
CAP_SETGID  
CAP_AUDIT_CONTROL  
CAP_DAC_READ_SEARCH  
CAP_NET_ADMIN  
CAP_SYS_ADMIN  
CAP_SYS_CHROOT  
CAP_SYS_PTRACE  
CAP_FOWNER  
CAP_KILL  
CAP_FSETID  
CAP_SYS_RESOURCE  
CAP_SETUID

## File-based Java APIs

Here we test the File-Based Java APIs by checkpointing the application in the following scenarios and verifying the contents of the file after restore:
- Reading and writing in the same file. (FileRead.java)
- Read from a file and write its content to another file. (ReadWrite.java)
- Reading from multiple files and writing their content to another file. (MultipleFileRead)
- Reading from a file and writing its content to multiple files. (MultipleFileWrite)

## Memory mapping Java APIs

Here we test the Memory Mapping APIs by checkpointing the application in following scenario and verifying the contents after restore:
- Memory-mapping a file and writing its content to another file. (MemoryMappings.java)  

## Socket-based Java APIs

Here we test the Socket-based API's by checkpointing the application in the following scenario and verifying the state after restore:  
- Checkpointing the server process in the middle of data transfer. (Sockets.java)  
- Checkpointing the server process after it has bound to a port but is not listening for client connections. (SocketListen.java)  
- Checkpointing the server process while it is listening for client connections, and no client has connected yet. (SocketConnect.java)  
- Checkpointing the server process when it has multiple clients in multiple states connected to it. (SocketMultiple.java)  
- Checkpointing the client process in the middle of data transfer. (SocketsData.java)  

### Prerequisites for running the tests:
- Maven

### To run the tests:
- In the javaTests folder run the command ```sudo mvn test```
- To keep the img files and logs from previous failures, between different runs of the test, use the ```-DneverCleanFailures=true ``` option in the maven command
as ```sudo mvn -DneverCleanFailures=true test```