mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-20 21:26:30 +00:00
Add full epoll_pwait
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
9484d35730
commit
07caaa5b3f
@ -11,5 +11,6 @@ cd ${SCRIPT_DIR}
|
||||
./ext2.sh
|
||||
./process.sh
|
||||
./network.sh
|
||||
./test_epoll_pwait.sh
|
||||
|
||||
echo "All regression tests passed."
|
||||
|
31
regression/apps/scripts/test_epoll_pwait.sh
Executable file
31
regression/apps/scripts/test_epoll_pwait.sh
Executable file
@ -0,0 +1,31 @@
|
||||
#!/bin/sh
|
||||
|
||||
# SPDX-License-Identifier: MPL-2.0
|
||||
|
||||
set -e
|
||||
|
||||
EPOLLTEST_DIR=/regression/epoll
|
||||
cd ${EPOLLTEST_DIR}
|
||||
|
||||
echo "Start epoll_pwait test......"
|
||||
|
||||
# Step 2: Run epoll_pwait in the background
|
||||
./epoll_pwait &
|
||||
EPOLL_PID=$!
|
||||
|
||||
echo "epoll_pwait PID: $EPOLL_PID"
|
||||
|
||||
# Step 3: Wait for 1 seconds to let epoll_pwait initialize and block SIGUSR1
|
||||
sleep 1
|
||||
|
||||
# Step 4: Send SIGUSR1 to epoll_pwait
|
||||
kill -USR1 $EPOLL_PID
|
||||
echo "Sent SIGUSR1 to PID $EPOLL_PID"
|
||||
|
||||
# Optional: Wait a bit more to see the output if the process is still running
|
||||
sleep 3
|
||||
|
||||
# You can also wait till the subprocess epoll_pwait completely finishes
|
||||
# wait $EPOLL_PID
|
||||
|
||||
echo "Test completed."
|
Reference in New Issue
Block a user