@@ -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
297297class 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
317317class test_read (TestBase ):
@@ -452,6 +452,21 @@ def get_runner(name):
452452 "test_brk" ,
453453 "test_chdir" ,
454454 "test_execve" ,
455+ "test_pipe" ,
456+ # "test_close",
457+ # "test_dup",
458+ # "test_dup2",
459+ # "test_fstat",
460+ # "test_getcwd",
461+ # "test_mkdir",
462+ # "test_open",
463+ # "test_read",
464+ # "test_unlink",
465+ # "test_write",
466+ # "test_openat",
467+ # "test_getdents",
468+ # "test_mount",
469+ # "test_umount",
455470]
456471
457472if __name__ == '__main__' :
@@ -499,6 +514,7 @@ def get_runner(name):
499514 for x in runner .values ():
500515 result = x .get_result ()
501516 if result ['all' ] != result ['pass' ] and result ['name' ] in target_testcases :
517+ print (result ['name' ] + " failed!" )
502518 exit (255 )
503- print ("Busybox testcases passed." )
519+ print ("Basic testcases passed." )
504520 print (json .dumps (test_results ))
0 commit comments