Working on ASST2 targets.
This commit is contained in:
9
test161/tests/stability/badcall/badcall-close.t
Normal file
9
test161/tests/stability/badcall/badcall-close.t
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: "Badcall-close Test"
|
||||
description:
|
||||
Tests whether close syscall is implemented correctly by invoking it in all
|
||||
possible wrong ways.
|
||||
tags: [badcall, stability]
|
||||
depends: [shell]
|
||||
---
|
||||
$ /testbin/badcall f
|
9
test161/tests/stability/badcall/badcall-dup2.t
Normal file
9
test161/tests/stability/badcall/badcall-dup2.t
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: "Badcall-dup2 Test"
|
||||
description:
|
||||
Tests whether dup2 syscall is implemented correctly by invoking it in all
|
||||
possible wrong ways.
|
||||
tags: [badcall, stability]
|
||||
depends: [shell]
|
||||
---
|
||||
$ /testbin/badcall w
|
11
test161/tests/stability/badcall/badcall-execv.t
Normal file
11
test161/tests/stability/badcall/badcall-execv.t
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: "Badcall-execv Test"
|
||||
description:
|
||||
Tests whether execv syscall is implemented correctly by invoking it in all
|
||||
possible wrong ways.
|
||||
tags: [badcall, stability]
|
||||
depends: [shell]
|
||||
sys161:
|
||||
ram: 4M
|
||||
---
|
||||
$ /testbin/badcall a
|
9
test161/tests/stability/badcall/badcall-lseek.t
Normal file
9
test161/tests/stability/badcall/badcall-lseek.t
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: "Badcall-lseek Test"
|
||||
description:
|
||||
Tests whether lseek syscall is implemented correctly by invoking it in all
|
||||
possible wrong ways.
|
||||
tags: [badcall, stability]
|
||||
depends: [shell]
|
||||
---
|
||||
$ /testbin/badcall j
|
9
test161/tests/stability/badcall/badcall-open.t
Normal file
9
test161/tests/stability/badcall/badcall-open.t
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: "Badcall-open Test"
|
||||
description:
|
||||
Tests whether open syscall is implemented correctly by invoking it in all
|
||||
possible wrong ways.
|
||||
tags: [badcall, stability]
|
||||
depends: [shell]
|
||||
---
|
||||
$ /testbin/badcall c
|
9
test161/tests/stability/badcall/badcall-read.t
Normal file
9
test161/tests/stability/badcall/badcall-read.t
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: "Badcall-read Test"
|
||||
description:
|
||||
Tests whether read syscall is implemented correctly by invoking it in all
|
||||
possible wrong ways.
|
||||
tags: [badcall, stability]
|
||||
depends: [shell]
|
||||
---
|
||||
$ /testbin/badcall d
|
11
test161/tests/stability/badcall/badcall-waitpid.t
Normal file
11
test161/tests/stability/badcall/badcall-waitpid.t
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
name: "Badcall-waitpid Test"
|
||||
description:
|
||||
Tests whether waitpid syscall is implemented correctly by invoking it in all
|
||||
possible wrong ways.
|
||||
tags: [badcall, stability]
|
||||
depends: [shell]
|
||||
sys161:
|
||||
ram: 4M
|
||||
---
|
||||
$ /testbin/badcall b
|
9
test161/tests/stability/badcall/badcall-write.t
Normal file
9
test161/tests/stability/badcall/badcall-write.t
Normal file
@@ -0,0 +1,9 @@
|
||||
---
|
||||
name: "Badcall-write Test"
|
||||
description:
|
||||
Tests whether write syscall is implemented correctly by invoking it in all
|
||||
possible wrong ways.
|
||||
tags: [badcall, stability]
|
||||
depends: [shell]
|
||||
---
|
||||
$ /testbin/badcall e
|
13
test161/tests/stability/crash/crash-allS.t
Normal file
13
test161/tests/stability/crash/crash-allS.t
Normal file
@@ -0,0 +1,13 @@
|
||||
---
|
||||
name: "Crash-all Shell Test"
|
||||
description:
|
||||
Tests whether your system correctly handles a variety of
|
||||
illegal attempts from userspace processes to access resources that
|
||||
do not belong to it. Please see userland/testbin/crash for more info.
|
||||
Runs it from the shell.
|
||||
tags: [stability, crash, crash-fork]
|
||||
depends: [shell, /asst2/process/forktest.t]
|
||||
sys161:
|
||||
ram: 4M
|
||||
---
|
||||
$ /testbin/crash *
|
10
test161/tests/stability/crash/crash-template
Normal file
10
test161/tests/stability/crash/crash-template
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: "Crash-template Test"
|
||||
description:
|
||||
Tests whether your system correctly handles a variety of
|
||||
illegal attempts from userspace processes to access resources that
|
||||
do not belong to it. Please see userland/testbin/crash for more info.
|
||||
tags: [stability, crash]
|
||||
depends: [console]
|
||||
---
|
||||
p /extratests/crash-template
|
54
test161/tests/stability/crash/script.py
Normal file
54
test161/tests/stability/crash/script.py
Normal file
@@ -0,0 +1,54 @@
|
||||
import os,sys
|
||||
import subprocess
|
||||
|
||||
RANGE=[chr(i) for i in range(ord('a'), ord('p'))]
|
||||
|
||||
# First create crash-a/b/c.t files
|
||||
template = open('crash-template').read()
|
||||
|
||||
def add_sys161_opts(content, sys161_opts):
|
||||
content = content.split('\n')
|
||||
idx = content[1:].index('---') + 1
|
||||
content.insert(idx, sys161_opts.strip())
|
||||
content = '\n'.join(content)
|
||||
return content
|
||||
|
||||
def create_crash(char, sys161_opts=None):
|
||||
content = template.replace('-template', '-%s' % char)
|
||||
content = content.replace(', crash]', ', crash-fork]')
|
||||
content = content.replace('[console]', '[console, /asst2/process/forktest.t]')
|
||||
if sys161_opts:
|
||||
content = add_sys161_opts(content, sys161_opts)
|
||||
|
||||
with open('crash-%s.t' % char, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
# now do the F version
|
||||
content = template.replace('-template', '-%sF' % char)
|
||||
if sys161_opts:
|
||||
content = add_sys161_opts(content, sys161_opts)
|
||||
with open('crash-%sF.t' % char, 'w') as f:
|
||||
f.write(content)
|
||||
|
||||
for char in RANGE:
|
||||
create_crash(char)
|
||||
|
||||
# Now do the 'all'
|
||||
sys161_opts = \
|
||||
'''
|
||||
sys161:
|
||||
ram: 2M
|
||||
'''
|
||||
create_crash('all', sys161_opts)
|
||||
|
||||
#p = subprocess.Popen('ls *.t', shell=True, stdout=subprocess.PIPE)
|
||||
#stdout, stderr = p.communicate()
|
||||
#files = stdout.strip().split('\n')
|
||||
#
|
||||
#for f in files:
|
||||
# name, ext = os.path.splitext(f)
|
||||
#
|
||||
# new_file = name + 'F' + ext
|
||||
# letters = name[name.index('-'):]
|
||||
# subprocess.check_call('cp %s %s' % (f, new_file), shell=True)
|
||||
# subprocess.check_call('''sed -i 's/%s/%sF/g' %s''' % (letters, letters, new_file), shell=True)
|
10
test161/tests/stability/faulter.t
Normal file
10
test161/tests/stability/faulter.t
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: "Faulter Test"
|
||||
description:
|
||||
Tests whether kill_curthread is implemented correctly.
|
||||
Attempts to access an invalid memory address expecting the kernel
|
||||
to gracefully kill the current process instead of panicking.
|
||||
tags: [proc]
|
||||
depends: [console]
|
||||
---
|
||||
p /testbin/faulter
|
10
test161/tests/stability/forkbomb.t
Normal file
10
test161/tests/stability/forkbomb.t
Normal file
@@ -0,0 +1,10 @@
|
||||
---
|
||||
name: "Forkbomb"
|
||||
tags: [stability]
|
||||
depends: [console]
|
||||
sys161:
|
||||
ram: 2M
|
||||
monitor:
|
||||
progresstimeout: 40.0
|
||||
---
|
||||
p /testbin/forkbomb
|
14
test161/tests/stability/forktest-stability.t
Normal file
14
test161/tests/stability/forktest-stability.t
Normal file
@@ -0,0 +1,14 @@
|
||||
---
|
||||
name: "Forktest Stability Test"
|
||||
description:
|
||||
Runs forktest 5 times to check for synchronization issues.
|
||||
tags: [stability]
|
||||
depends: [shell, /asst2/process/forktest.t]
|
||||
sys161:
|
||||
ram: 16M
|
||||
---
|
||||
$ /testbin/forktest
|
||||
$ /testbin/forktest
|
||||
$ /testbin/forktest
|
||||
$ /testbin/forktest
|
||||
$ /testbin/forktest
|
12
test161/tests/stability/randcall.t
Normal file
12
test161/tests/stability/randcall.t
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
name: "Randcall Test"
|
||||
description:
|
||||
Invokes system calls on random with random arguments.
|
||||
Tests whether your system can gracefully recover from
|
||||
bad system calls.
|
||||
tags: [randcall-2, stability]
|
||||
depends: [shell]
|
||||
sys161:
|
||||
ram: 16M
|
||||
---
|
||||
$ /testbin/randcall -f -c 1000 -r 30 2
|
Reference in New Issue
Block a user