[demos] Update Linux LTP test demo
This commit is contained in:
		
							parent
							
								
									b746fea82b
								
							
						
					
					
						commit
						41e62ae982
					
				
							
								
								
									
										2
									
								
								.github/workflows/code_coverage.yaml
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										2
									
								
								.github/workflows/code_coverage.yaml
									
									
									
									
										vendored
									
									
								
							| @ -98,7 +98,7 @@ jobs: | |||||||
| 
 | 
 | ||||||
|     - name: LTP test |     - name: LTP test | ||||||
|       run: docker exec code_coverage bash -c "cd /root/occlum/demos/linux-ltp && ./dl_and_build_ltp.sh && SGX_MODE=SIM ./prepare_ltp.sh; |       run: docker exec code_coverage bash -c "cd /root/occlum/demos/linux-ltp && ./dl_and_build_ltp.sh && SGX_MODE=SIM ./prepare_ltp.sh; | ||||||
|             cd ltp_instance; |             cd occlum_instance; | ||||||
|             occlum run /opt/ltp/run-ltp.sh -f syscalls-occlum; |             occlum run /opt/ltp/run-ltp.sh -f syscalls-occlum; | ||||||
|             cd /root/occlum/demos && rm -rf ./linux-ltp" |             cd /root/occlum/demos && rm -rf ./linux-ltp" | ||||||
|      |      | ||||||
|  | |||||||
							
								
								
									
										2
									
								
								.github/workflows/demo_test.yml
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
									
									
								
							
						
						
									
										2
									
								
								.github/workflows/demo_test.yml
									
									
									
									
										vendored
									
									
								
							| @ -1144,7 +1144,7 @@ jobs: | |||||||
|       run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/linux-ltp && SGX_MODE=SIM ./prepare_ltp.sh" |       run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/linux-ltp && SGX_MODE=SIM ./prepare_ltp.sh" | ||||||
| 
 | 
 | ||||||
|     - name: Run the LTP demo |     - name: Run the LTP demo | ||||||
|       run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/linux-ltp/ltp_instance; |       run: docker exec ${{ github.job }} bash -c "cd /root/occlum/demos/linux-ltp/occlum_instance; | ||||||
|             occlum run /opt/ltp/run-ltp.sh -f syscalls-occlum" |             occlum run /opt/ltp/run-ltp.sh -f syscalls-occlum" | ||||||
|      |      | ||||||
|     - name: Clean LTP test |     - name: Clean LTP test | ||||||
|  | |||||||
| @ -18,7 +18,7 @@ Some test cases are failed due to multiple reasons, such as syscall is not imple | |||||||
| * Some default LTP test cases may make the Occlum crash or hang (Only checked the cases in syscalls for now). | * Some default LTP test cases may make the Occlum crash or hang (Only checked the cases in syscalls for now). | ||||||
| * Occlum runable syscall test cases are defined in [`syscalls-occlum`](./syscalls-occlum). It may be updated with Occlum development. | * Occlum runable syscall test cases are defined in [`syscalls-occlum`](./syscalls-occlum). It may be updated with Occlum development. | ||||||
| 
 | 
 | ||||||
| The original [`syscalls`] test cases could be found in the built demo `ltp_instance/image/opt/ltp/runtest/syscalls`. | The original [`syscalls`] test cases could be found in the built demo `occlum_instance/image/opt/ltp/runtest/syscalls`. | ||||||
| Panic/Sefault/hang testcases could be listed by a simple diff for these two files. | Panic/Sefault/hang testcases could be listed by a simple diff for these two files. | ||||||
| 
 | 
 | ||||||
| ## Prepare the Occlum instance for LTP demo | ## Prepare the Occlum instance for LTP demo | ||||||
| @ -39,8 +39,13 @@ The script `run-ltp.sh` supports two optional arguments as below. | |||||||
|     example: run-ltp.sh -f syscalls-occlum -s timerfd |     example: run-ltp.sh -f syscalls-occlum -s timerfd | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
|  | To run in Occlum, use the following command. | ||||||
|  | ``` | ||||||
|  | occlum run /opt/ltp/run-ltp.sh -f syscalls-occlum -s timerfd | ||||||
|  | ``` | ||||||
|  | 
 | ||||||
| If no options provided, all the test cases in default LTP syscalls will be run one by one. | If no options provided, all the test cases in default LTP syscalls will be run one by one. | ||||||
| 
 | 
 | ||||||
| Note: | Note: | ||||||
| 
 | 
 | ||||||
| * The `CMDFILES` are defined in the LTP install path, such as `ltp_instance/image/opt/ltp/runtest/` in this demo. | * The `CMDFILES` are defined in the LTP install path, such as `occlum_instance/image/opt/ltp/runtest/` in this demo. | ||||||
|  | |||||||
| @ -1,10 +1,10 @@ | |||||||
| #! /bin/bash | #! /bin/bash | ||||||
| set -e | set -e | ||||||
| 
 | 
 | ||||||
| rm -rf ltp_instance | rm -rf occlum_instance | ||||||
| occlum new ltp_instance | occlum new occlum_instance | ||||||
| 
 | 
 | ||||||
| cd ltp_instance | cd occlum_instance | ||||||
| rm -rf image | rm -rf image | ||||||
| copy_bom -f ../ltp.yaml --root image --include-dir /opt/occlum/etc/template | copy_bom -f ../ltp.yaml --root image --include-dir /opt/occlum/etc/template | ||||||
| 
 | 
 | ||||||
|  | |||||||
| @ -1004,8 +1004,8 @@ preadv03_64 preadv03_64 | |||||||
| 
 | 
 | ||||||
| preadv201 preadv201 | preadv201 preadv201 | ||||||
| preadv201_64 preadv201_64 | preadv201_64 preadv201_64 | ||||||
| preadv202 preadv202 | # preadv202 preadv202 | ||||||
| preadv202_64 preadv202_64 | # preadv202_64 preadv202_64 | ||||||
| preadv203 preadv203 | preadv203 preadv203 | ||||||
| preadv203_64 preadv203_64 | preadv203_64 preadv203_64 | ||||||
| 
 | 
 | ||||||
| @ -1052,15 +1052,15 @@ pwrite04_64 pwrite04_64 | |||||||
| 
 | 
 | ||||||
| pwritev01 pwritev01 | pwritev01 pwritev01 | ||||||
| pwritev01_64 pwritev01_64 | pwritev01_64 pwritev01_64 | ||||||
| # pwritev02 pwritev02 | pwritev02 pwritev02 | ||||||
| # pwritev02_64 pwritev02_64 | pwritev02_64 pwritev02_64 | ||||||
| pwritev03 pwritev03 | pwritev03 pwritev03 | ||||||
| pwritev03_64 pwritev03_64 | pwritev03_64 pwritev03_64 | ||||||
| 
 | 
 | ||||||
| pwritev201 pwritev201 | pwritev201 pwritev201 | ||||||
| pwritev201_64 pwritev201_64 | pwritev201_64 pwritev201_64 | ||||||
| pwritev202 pwritev202 | # pwritev202 pwritev202 | ||||||
| pwritev202_64 pwritev202_64 | # pwritev202_64 pwritev202_64 | ||||||
| 
 | 
 | ||||||
| quotactl01 quotactl01 | quotactl01 quotactl01 | ||||||
| quotactl02 quotactl02 | quotactl02 quotactl02 | ||||||
| @ -1090,7 +1090,7 @@ readlinkat01 readlinkat01 | |||||||
| readlinkat02 readlinkat02 | readlinkat02 readlinkat02 | ||||||
| 
 | 
 | ||||||
| readv01 readv01 | readv01 readv01 | ||||||
| readv02 readv02 | # readv02 readv02 | ||||||
| 
 | 
 | ||||||
| realpath01 realpath01 | realpath01 realpath01 | ||||||
| 
 | 
 | ||||||
| @ -1695,12 +1695,12 @@ write02 write02 | |||||||
| write04 write04 | write04 write04 | ||||||
| #write05 write05 | #write05 write05 | ||||||
| 
 | 
 | ||||||
| #writev01 writev01 | writev01 writev01 | ||||||
| #writev02 writev02 | # writev02 writev02 | ||||||
| writev03 writev03 | writev03 writev03 | ||||||
| #writev05 writev05 | # writev05 writev05 | ||||||
| writev06 writev06 | writev06 writev06 | ||||||
| #writev07 writev07 | # writev07 writev07 | ||||||
| 
 | 
 | ||||||
| perf_event_open01 perf_event_open01 | perf_event_open01 perf_event_open01 | ||||||
| perf_event_open02 perf_event_open02 | perf_event_open02 perf_event_open02 | ||||||
| @ -1729,7 +1729,7 @@ copy_file_range03 copy_file_range03 | |||||||
| 
 | 
 | ||||||
| statx01 statx01 | statx01 statx01 | ||||||
| statx02 statx02 | statx02 statx02 | ||||||
| statx03 statx03 | # statx03 statx03 | ||||||
| statx04 statx04 | statx04 statx04 | ||||||
| statx05 statx05 | statx05 statx05 | ||||||
| statx06 statx06 | statx06 statx06 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user