Skip to content
This repository was archived by the owner on Nov 26, 2025. It is now read-only.

Commit 06a9db5

Browse files
committed
Merge branch 'main' of github.com:oscomp/starry-next into yyy-dev
2 parents dac1e6e + 8194944 commit 06a9db5

File tree

3 files changed

+47
-28
lines changed

3 files changed

+47
-28
lines changed

apps/oscomp/judge_basic.py

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def test(self, data):
116116
self.assert_ge(len(data), 1)
117117
self.assert_in_str(r" close \d+ success.", data)
118118

119-
class dup2_test(TestBase):
119+
class test_dup2(TestBase):
120120
def __init__(self):
121121
super().__init__("dup2", 2)
122122

@@ -296,22 +296,22 @@ def test(self, data):
296296

297297
class test_pipe(TestBase):
298298
def __init__(self):
299-
super().__init__("pipe", 4)
299+
super().__init__("pipe", 2)
300300

301301
def test(self, data):
302302
self.assert_ge(len(data), 3)
303-
cpid0 = False
304-
cpid1 = False
305-
for line in data[:3]:
306-
if line == "cpid: 0":
307-
cpid0 = True
308-
continue
309-
r = re.findall(r"cpid: (\d+)", line)
310-
if r and int(r[0]) > 0:
311-
cpid1 = True
312-
continue
313-
self.assert_equal(cpid0, True)
314-
self.assert_equal(cpid1, True)
303+
# cpid0 = False
304+
# cpid1 = False
305+
# for line in data[:3]:
306+
# if line == "cpid: 0":
307+
# cpid0 = True
308+
# continue
309+
# r = re.findall(r"cpid: (\d+)", line)
310+
# if r and int(r[0]) > 0:
311+
# cpid1 = True
312+
# continue
313+
# self.assert_equal(cpid0, True)
314+
# self.assert_equal(cpid1, True)
315315
self.assert_equal(data[2], " Write to pipe successfully.")
316316

317317
class test_read(TestBase):
@@ -462,6 +462,21 @@ def get_runner(name):
462462
"test_gettimeofday",
463463
"test_sleep",
464464
"test_times"
465+
"test_pipe",
466+
# "test_close",
467+
# "test_dup",
468+
# "test_dup2",
469+
# "test_fstat",
470+
# "test_getcwd",
471+
# "test_mkdir",
472+
# "test_open",
473+
# "test_read",
474+
# "test_unlink",
475+
# "test_write",
476+
# "test_openat",
477+
# "test_getdents",
478+
# "test_mount",
479+
# "test_umount",
465480
]
466481

467482
if __name__ == '__main__':
@@ -509,6 +524,7 @@ def get_runner(name):
509524
for x in runner.values():
510525
result = x.get_result()
511526
if result['all'] != result['pass'] and result['name'] in target_testcases:
527+
print(result['name'] + " failed!")
512528
exit(255)
513-
print("Busybox testcases passed.")
529+
print("Basic testcases passed.")
514530
print(json.dumps(test_results))

apps/oscomp/testcase_list

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1 @@
1-
/musl/basic/brk
2-
/musl/basic/chdir
3-
/musl/basic/clone
4-
/musl/basic/getpid
5-
/musl/basic/getppid
6-
/musl/basic/exit
7-
/musl/basic/wait
8-
/musl/basic/execve
9-
/musl/basic/waitpid
10-
/musl/basic/yield
11-
/musl/basic/gettimeofday
12-
/musl/basic/sleep
13-
/musl/basic/times
1+
/musl/runtest.exe -w entry-static.exe argv

scripts/oscomp_test.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,21 @@ basic_testlist=(
4646
"/$LIBC/basic/gettimeofday"
4747
"/$LIBC/basic/sleep"
4848
"/$LIBC/basic/times"
49+
"/$LIBC/basic/pipe"
50+
# "/$LIBC/basic/close"
51+
# "/$LIBC/basic/dup"
52+
# "/$LIBC/basic/dup2"
53+
# "/$LIBC/basic/fstat"
54+
# "/$LIBC/basic/getcwd"
55+
# "/$LIBC/basic/mkdir_"
56+
# "/$LIBC/basic/open"
57+
# "/$LIBC/basic/read"
58+
# "/$LIBC/basic/unlink"
59+
# "/$LIBC/basic/write"
60+
# "/$LIBC/basic/openat"
61+
# "/$LIBC/basic/getdents"
62+
# "/$LIBC/basic/mount"
63+
# "/$LIBC/basic/umount"
4964
)
5065
busybox_testlist=("/$LIBC/busybox sh /$LIBC/busybox_testcode.sh")
5166
iozone_testlist=("/$LIBC/busybox sh /$LIBC/iozone_testcode.sh")

0 commit comments

Comments
 (0)