示例#1
0

class Getpinfo2(Xv6Test):
    name = "getpinfo2"
    description = "check that getpinfo returns some reasonable values"
    tester = name + ".c"
    timeout = 30


class Ticks(Xv6Test):
    name = "ticks"
    description = "check that processes are scheduled at correct ratio"
    tester = name + ".c"
    timeout = 75
    make_args = "CPUS=1"


class Usertests(Xv6Test):
    name = "usertests"
    description = "run usertests to check for regressions"
    tester = name + ".c"
    timeout = 500


all_tests = [Settickets, Getpinfo, Getpinfo2, Ticks]

import toolspath
from testing.runtests import main

main(Xv6Build, all_tests)
from testing import Xv6Build, Xv6Test


class Readcount1(Xv6Test):
    name = "readcount1"
    description = "call getreadcount(), value > 0"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 1


class Readcount2(Xv6Test):
    name = "readcount2"
    description = "call readcount() twice, no read() between"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 1


class Readcount3(Xv6Test):
    name = "readcount3"
    description = "called readcount() with 5 reads in between"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 1


import toolspath
from testing.runtests import main
main(Xv6Build, [Readcount1, Readcount2, Readcount3])
from fsbuild import FastsortBuild
tester_files = ["contest"]

all = []
for f in tester_files:
    module = __import__(f)
    all.extend(module.test_list)

import toolspath
from testing.runtests import main
main(FastsortBuild, all)
示例#4
0
from fsbuild import FastsortBuild
tester_files = ["contest_beta"]

all = []
for f in tester_files:
  module = __import__(f)
  all.extend(module.test_list)

import toolspath
from testing.runtests import main
main(FastsortBuild, all)
示例#5
0
class Getpinfo(Xv6Test):
   name = "getpinfo"
   description = "compile and run a user program with a getpinfo call"
   tester = name + ".c"
   timeout = 30

class Getpinfo2(Xv6Test):
   name = "getpinfo2"
   description = "check that getpinfo returns some reasonable values"
   tester = name + ".c"
   timeout = 30

class Ticks(Xv6Test):
   name = "ticks"
   description = "check that processes are scheduled at correct ratio"
   tester = name + ".c"
   timeout = 75
   make_args = "CPUS=1"

class Usertests(Xv6Test):
   name = "usertests"
   description = "run usertests to check for regressions"
   tester = name + ".c"
   timeout = 500

all_tests = [Settickets, Getpinfo, Getpinfo2, Ticks]

import toolspath
from testing.runtests import main
main(Xv6Build, all_tests)
示例#6
0
   name = "procs2"
   description = "call fork() before getprocs()"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   point_value = 20

class Procs3(Xv6Test):
   name = "procs3"
   description = "call getprocs() with a full process table"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   point_value = 20

class Procs4(Xv6Test):
   name = "procs4"
   description = "call getprocs() with a process table filled with zombies"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   point_value = 20

class Procs5(Xv6Test):
   name = "procs5"
   description = "call getprocs() after some entries turn back to UNUSED"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   point_value = 20

import toolspath
from testing.runtests import main
main(Xv6Build, [Procs1, Procs2, Procs3, Procs4, Procs5])
示例#7
0
   tester = "basic.c"
   make_qemu_args = "CPUS=1"

class Getsyscallinfo(Xv6Test):
   name = "getsyscallinfo"
   description = "repeated calls of getsyscallinfo()"
   tester = "getsyscallinfo.c"
   make_qemu_args = "CPUS=1"

class Many(Xv6Test):
   name = "many"
   description = "count many other syscalls"
   tester = "many.c"
   make_qemu_args = "CPUS=1"

class Invalid(Xv6Test):
   name = "invalid"
   description = "make an invalid system call"
   tester = "invalid.c"
   make_qemu_args = "CPUS=1"

class Usertests(Xv6Test):
   name = "usertests"
   description = "run usertests to check for regressions"
   tester = "usertests.c"
   timeout = 300

import toolspath
from testing.runtests import main
main(Xv6Build, [Basic, Getsyscallinfo, Many, Invalid])
示例#8
0
   description = "check no low priority processes are running when there is high priority \n The corresponding test file is at ~cs537-1/ta/tests/2b/ctests/run_high_priority.c"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   point_value = 20

class Scheduling8(Xv6Test):
   name = "sleep_high_priority"
   description = "check if low priority processes run when high priority is put to sleep \n The corresponding test file is at ~cs537-1/ta/tests/2b/ctests/sleep_high_priority.c"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   point_value = 20

class Scheduling9(Xv6Test):
   name = "awake_high_priority"
   description = "check if only high priority process run when high priority is awake from sleep \n The corresponding test file is at ~cs537-1/ta/tests/2b/ctests/awake_high_priority.c"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   point_value = 20

class Scheduling10(Xv6Test):
   name = "multiple_high_priority"
   description = "check if multiple high priority processes run in round robin \n The corresponding test file is at ~cs537-1/ta/tests/2b/ctests/multiple_high_priority.c"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   point_value = 20


import toolspath
from testing.runtests import main
main(Xv6Build, [Scheduling1, Scheduling2, Scheduling3, Scheduling4, Scheduling5, Scheduling6, Scheduling7, Scheduling8, Scheduling9, Scheduling10])
from fsbuild import RangesortBuild
tester_files = ["errtests", "gentests", "duptest", "selectedtest", "contest"]

all = []
for f in tester_files:
  module = __import__(f)
  all.extend(module.test_list)

import toolspath
from testing.runtests import main
main(RangesortBuild, all)
示例#10
0
class getProcsCheckTable5Procs(Xv6Test):
    name = "getprocs_table5procs"
    description = "2B: when calling getprocs with two additional processes running, processInfoTable contains " + \
                  "correct info."
    tester = "ctests/proj1-part2/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 5
    timeout = 20


class getProcsCheckTable63Procs(Xv6Test):
    name = "getprocs_table63procs"
    description = "2B: when calling getprocs with 63 total processes, processInfoTable contains " + \
                  "correct info."
    tester = "ctests/proj1-part2/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 6
    timeout = 20


import toolspath
from testing.runtests import main
#main(Xv6Build, [Program])
main(Xv6Build, [
    Basic, NoExtraProcs, OneExtraProc, TwoExtraProc, ThreeExtraProc,
    SixtyOneExtraProc, PsPrints4Procs, PsPrints5Procs,
    getProcsCheckTable3Procs, getProcsCheckTable4Procs,
    getProcsCheckTable5Procs, getProcsCheckTable63Procs
])
#main(Xv6Build, [NoExtraProcs, OneExtraProc, TwoExtraProc])
示例#11
0
  description = "Part 2: Test cpy-on-write folk."
  tester = "ctests/proj2/" + name + ".c"
  make_qemu_args = "CPUS=1"
  point_value = 10
  timeout = 10

class forkCowTest2(Xv6Test):
  name = "forkCowTest2"
  description = "Part 2: Test cpy-on-write folk: fork the parent 30 times."
  tester = "ctests/proj2/" + name + ".c"
  make_qemu_args = "CPUS=1"
  point_value = 10
  timeout = 60

class forkCowTest3(Xv6Test):
  name = "forkCowTest3"
  description = "Part 2: Test cpy-on-write folk: fork two children, make changes in both children. " + \
                "Test whether the memory content changed."
  tester = "ctests/proj2/" + name + ".c"
  make_qemu_args = "CPUS=1"
  point_value = 10
  timeout = 10


import toolspath
from testing.runtests import main
main(Xv6Build, [deref_null, deref_0x1000, alloc_155_pages, whenTryingToAllocateAboveUsertop_sbrkShouldFail,
               whenTryingToReallocateAPageNearUsertop_sbrkShouldSucceed,
               forkLargeMemTest, forkCowTest, forkCowTest2, forkCowTest3])
#main(Xv6Build, [shmem_access_communication])
示例#12
0
import toolspath
from testing import Xv6Build, Xv6Test

class Basic(Xv6Test):
   name = "basic"
   description = "call getsyscallinfo() from a user program"
   tester = "basic.c"
   make_qemu_args = "CPUS=1"

class Getsyscallinfo(Xv6Test):
   name = "getsyscallinfo"
   description = "repeated calls of getsyscallinfo()"
   tester = "getsyscallinfo.c"
   make_qemu_args = "CPUS=1"

class Many(Xv6Test):
   name = "many"
   description = "count many other syscalls"
   tester = "many.c"
   make_qemu_args = "CPUS=1"

class Usertests(Xv6Test):
   name = "usertests"
   description = "run usertests to check for regressions"
   tester = "usertests.c"
   timeout = 300

import toolspath
from testing.runtests import main
main(Xv6Build, [Basic, Getsyscallinfo, Many])
示例#13
0
    targets = ['test_srand']
    point_value = 3
    name = 'srand behavior test'
    status = 0
    description = 'test the behavior of srand according to the definition in the header file'
    timeout = 20

    def run(self):
        build_command = ['gcc', '-Wl,-wrap,rand', self.test_path + '/ctests/srand_tester.c', 'kernel/rand.c', '-I./include', '-I./user', '-I./kernel', '-o', 'srand_tester', '-Wall', '-Werror']
        rt_code = self.run_util(build_command)

        infd = None
        outfd = subprocess.PIPE
        errfd = subprocess.PIPE
        start = time()
        command = ['./srand_tester']
        child = self.run_util(command)
        self.done()


class Allocator_b(Xv6Test):
   name = "allocator_b"
   description = "test the random allocator in part 3"
   tester = "ctests/" + name + ".c"
   make_qemu_args = "CPUS=1"
   rand_test = True
   point_value = 5


main(Xv6Build, [RandTest, SrandTest, Allocator_b])
示例#14
0
   name = "join"
   description = """join"""
   tester = name + ".c"
   timeout = 30
   point_value = 10
   make_qemu_args = "CPUS=1"

class Test4(Xv6Test):
   name = "join2"
   description = """join2"""
   tester = name + ".c"
   timeout = 30
   point_value = 10
   make_qemu_args = "CPUS=1"


class Test6(Xv6Test):
   name = "recursion"
   description = """recursion"""
   tester = name + ".c"
   timeout = 30
   point_value = 10
   make_qemu_args = "CPUS=1"


released_tests = [ Test0, Test1, Test3, Test4, Test6]
#hidden_tests = [TestHidden2]
all_tests = released_tests

main(Xv6Build, released_tests)
示例#15
0
class Scheduling8(Xv6Test):
    name = "sleep_high_priority"
    description = "check if low priority processes run when high priority is put to sleep \n The corresponding test file is at ~cs537-1/ta/tests/2b/ctests/sleep_high_priority.c"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 20


class Scheduling9(Xv6Test):
    name = "awake_high_priority"
    description = "check if only high priority process run when high priority is awake from sleep \n The corresponding test file is at ~cs537-1/ta/tests/2b/ctests/awake_high_priority.c"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 20


class Scheduling10(Xv6Test):
    name = "multiple_high_priority"
    description = "check if multiple high priority processes run in round robin \n The corresponding test file is at ~cs537-1/ta/tests/2b/ctests/multiple_high_priority.c"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 20


import toolspath
from testing.runtests import main
main(Xv6Build, [
    Scheduling1, Scheduling2, Scheduling3, Scheduling4, Scheduling5,
    Scheduling6, Scheduling7, Scheduling8, Scheduling9, Scheduling10
])
示例#16
0
文件: project4a.py 项目: asegid/cs537
import toolspath
from testing import BuildTest

build_test = BuildTest
build_test.targets = ["server"]

all_tests = list()
import server
all_tests.extend(server.test_list)

from testing.runtests import main
main(build_test, all_tests)
示例#17
0
   tester = "getsyscallnumtotal.c"
   make_qemu_args = "CPUS=1"

class Getsyscallnumsuccess(Xv6Test):
   name = "getsyscallnumsuccess"
   description = "repeated calls of getsyscallnumsuccess()"
   tester = "getsyscallnumsuccess.c"
   make_qemu_args = "CPUS=1"

class Many_getsyscallnumtotal(Xv6Test):
   name = "many_getsyscallnumtotal"
   description = "count calls to many different syscalls"
   tester = "many_getsyscallnumtotal.c"
   make_qemu_args = "CPUS=1"

class Many_getsyscallnumsuccess(Xv6Test):
   name = "many_getsyscallnumsuccess"
   description = "count calls to many different syscalls, both successful and unsuccessful"
   tester = "many_getsyscallnumsuccess.c"
   make_qemu_args = "CPUS=1"

class Usertests(Xv6Test):
   name = "usertests"
   description = "run usertests to check for regressions"
   tester = "usertests.c"
   timeout = 300

import toolspath
from testing.runtests import main
main(Xv6Build, [Basic, Getsyscallnumtotal, Getsyscallnumsuccess, Many_getsyscallnumtotal, Many_getsyscallnumsuccess])
示例#18
0
    LongLine,
    TooLong,
    BadProg,
    Errout,
    BadExit,
    basic_hist,
    extraargs_exclaim,
    extraargs_hist,
    hist1,
    hist2,
    hist3,
    invalid_arg,
    randin,
    redir_hist,
    valid_hist,
    wrong_redir,
    Redirect,
    Redirect2,
    BadRedir,
    BadRedir2,
    
    
    
    
    ]

build_test = ShellBuildTest

from testing.runtests import main
main(build_test, all_tests)
示例#19
0
    name = "basic"
    description = "call getsyscallinfo() from a user program"
    tester = "basic.c"
    make_qemu_args = "CPUS=1"


class Getsyscallinfo(Xv6Test):
    name = "getsyscallinfo"
    description = "repeated calls of getsyscallinfo()"
    tester = "getsyscallinfo.c"
    make_qemu_args = "CPUS=1"


class Many(Xv6Test):
    name = "many"
    description = "count many other syscalls"
    tester = "many.c"
    make_qemu_args = "CPUS=1"


class Usertests(Xv6Test):
    name = "usertests"
    description = "run usertests to check for regressions"
    tester = "usertests.c"
    timeout = 300


import toolspath
from testing.runtests import main
main(Xv6Build, [Basic, Getsyscallinfo, Many])
示例#20
0
    point_value = 5


class test_protect(Xv6Test):
    name = "test_protect"
    description = "check whether mprotect and munprotect work properly"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 8


class protect_error(Xv6Test):
    name = "protect_error"
    description = "check the error handling of mprotect and munprotect"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 5


class allocator_a(Xv6Test):
    name = "allocator_a"
    description = "test the alternate allocator in part 2"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 5


main(Xv6Build, [
    mprotect_basic, mprotect_fork, munprotect_basic, test_protect,
    protect_error, allocator_a
])
示例#21
0
   tester = "getsyscallnumtotal.c"
   make_qemu_args = "CPUS=1"

class Getsyscallnumsuccess(Xv6Test):
   name = "getsyscallnumsuccess"
   description = "repeated calls of getsyscallnumsuccess()"
   tester = "getsyscallnumsuccess.c"
   make_qemu_args = "CPUS=1"

class Many_getsyscallnumtotal(Xv6Test):
   name = "many_getsyscallnumtotal"
   description = "count calls to many different syscalls"
   tester = "many_getsyscallnumtotal.c"
   make_qemu_args = "CPUS=1"

class Many_getsyscallnumsuccess(Xv6Test):
   name = "many_getsyscallnumsuccess"
   description = "count calls to many different syscalls, both successful and unsuccessful"
   tester = "many_getsyscallnumsuccess.c"
   make_qemu_args = "CPUS=1"

class Usertests(Xv6Test):
   name = "usertests"
   description = "run usertests to check for regressions"
   tester = "usertests.c"
   timeout = 300

import toolspath
from testing.runtests import main
main(Xv6Build, [Usertests])
示例#22
0
    point_value = 20
    timeout = 180


class Scheduling12(Xv6Test):
    name = "stress_manylow"
    description = "A process with a high number of tickets should run as often as the total of many processes whose tickets sum to that number \n The corresponding test file is at tests/mp2/ctests/" + name + ".c"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 20
    timeout = 180


class Scheduling13(Xv6Test):
    name = "random"
    description = "Check that the scheduling is random, not just uniform \n The corresponding test file is at tests/mp2/ctests/" + name + ".c"
    tester = "ctests/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 30
    timeout = 30


import toolspath

from testing.runtests import main
main(Xv6Build, [
    Scheduling1, Scheduling2, Scheduling3, Scheduling4, Scheduling5,
    Scheduling6, Scheduling7
])
#main(Xv6Build, [Scheduling1, Scheduling2, Scheduling3, Scheduling4, Scheduling5, Scheduling6, Scheduling7, Scheduling8, Scheduling9, Scheduling10, Scheduling11,Scheduling12,Scheduling13])
示例#23
0
    description = "Part 2: Experimental Test."
    tester = "ctests/proj2/" + name + ".c"
    make_qemu_args = "CPUS=1"
    point_value = 0
    timeout = 10


import toolspath
from testing.runtests import main

main(Xv6Build, [
    deref_null, deref_0x1000, alloc_155_pages,
    whenTryingToAllocateAboveUsertop_sbrkShouldFail,
    whenTryingToReallocateAPageNearUsertop_sbrkShouldSucceed,
    shmem_access_invalid_input, shmem_count_invalid_input,
    whenRequestingSharedMemory_ValidAddressIsReturned,
    afterRequestingSharedMemory_countReturns1,
    whenSharingAPage_ParentSeesChangesMadeByChild,
    whenProcessExits_SharedPageIsFreed,
    whenSharingAPageBetween2Processes_countReturns2,
    whenProcessExists_countReturns0,
    beforeRequestingSharedMemory_countReturns0, shmem_access_communication,
    shmem_access_double_call, shmem_access_many_call,
    whenManyProcessesRequestSharedMemoryThenExit_NoMemoryLeaks,
    shmem_access_full_address_space, shmem_access_full_address_space2,
    whenAProcessWithSharedPageRepeatedlyForks_ChildrenHaveAccessToSharedPage,
    whenAManyProcessesSharingAPageExit_referenceCountsAreDecrementedCorrectly,
    shmem_access_exec, shmem_access_exec2
])
#main(Xv6Build, [shmem_access_communication])