Skip to content

Commit 89f3a75

Browse files
committed
Fix test 12
1 parent 46e30ba commit 89f3a75

File tree

7 files changed

+12
-12
lines changed

7 files changed

+12
-12
lines changed

tests/cases/11-sigint-proc-group/check_ps_output.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ def main():
1010
max_score = input_data.get("max_score", 2.0)
1111

1212
# 提取/bin/ps命令的输出
13-
# 方法:找到包含"tsh> /bin/ps a"的行,然后获取它后面的内容直到下一个提示符
13+
# 方法:找到包含"tsh> /bin/ps ax"的行,然后获取它后面的内容直到下一个提示符
1414
ps_output = ""
15-
ps_command_pattern = r"> /bin/ps a\s*\n"
15+
ps_command_pattern = r"> /bin/ps ax\s*\n"
1616
match = re.search(ps_command_pattern, stdout)
1717

1818
if match:

tests/cases/11-sigint-proc-group/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ stdout_pattern = "Job \\[\\d+\\] \\(\\d+\\) terminated by signal (2|SIGINT)"
3636

3737
[[run.steps]]
3838
type = "input"
39-
content = "/bin/ps a"
39+
content = "/bin/ps ax"
4040

4141
[[run.steps]]
4242
type = "check"

tests/cases/12-sigtstp-proc-group/check_ps_output.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ def check_ps_output(stdout):
1313
"""
1414
lines = stdout.strip().split("\n")
1515

16-
# Find the section of output after "/bin/ps a" command
16+
# Find the section of output after "/bin/ps ax" command
1717
ps_output_start = -1
1818
for i, line in enumerate(lines):
19-
if line.strip() == "/bin/ps a" or line.strip() == "> /bin/ps a":
19+
if line.strip() == "/bin/ps ax" or line.strip() == "> /bin/ps ax":
2020
ps_output_start = i + 1
2121
break
2222

tests/cases/12-sigtstp-proc-group/config.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ stdout_pattern = "\\[\\d+\\] \\(\\d+\\) Stopped ./mysplit 4"
5353

5454
[[run.steps]]
5555
type = "input"
56-
content = "/bin/ps a"
56+
content = "/bin/ps ax"
5757
echo = true
5858
wait_for_output = true
5959

tests/cases/13-restart/config.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ stdout_pattern = "\\[\\d+\\] \\(\\d+\\) Stopped ./mysplit 4"
5353

5454
[[run.steps]]
5555
type = "input"
56-
content = "/bin/ps a"
56+
content = "/bin/ps ax"
5757
echo = true
5858
wait_for_output = true
5959

@@ -75,7 +75,7 @@ seconds = 1
7575

7676
[[run.steps]]
7777
type = "input"
78-
content = "/bin/ps a"
78+
content = "/bin/ps ax"
7979
echo = true
8080
wait_for_output = true
8181

tests/cases/13-restart/judge_ps_running.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def judge_ps_output(stdout):
1111
# Find the second instance of ps output (after fg command)
1212
ps_instances = []
1313
for i, line in enumerate(lines):
14-
if line.strip() == "tsh> /bin/ps a":
14+
if line.strip() == "> /bin/ps ax":
1515
ps_instances.append(i)
1616

1717
if len(ps_instances) < 2:
@@ -26,7 +26,7 @@ def judge_ps_output(stdout):
2626
ps_lines = []
2727
for i in range(ps_start, len(lines)):
2828
line = lines[i].strip()
29-
if line.startswith("tsh>"):
29+
if line.startswith(">"):
3030
break
3131
if line:
3232
ps_lines.append(line)

tests/cases/13-restart/judge_ps_stopped.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ def judge_ps_output(stdout):
88
# Convert stdout to lines for easier processing
99
lines = stdout.strip().split("\n")
1010

11-
# Find where the ps output starts (after "tsh> /bin/ps a")
11+
# Find where the ps output starts (after "> /bin/ps ax")
1212
ps_start = -1
1313
for i, line in enumerate(lines):
14-
if line.strip() == "tsh> /bin/ps a":
14+
if line.strip() == "> /bin/ps ax":
1515
ps_start = i + 1
1616
break
1717

0 commit comments

Comments
 (0)