ab4bc8a24e
Move some of the RHEL QE testcases upstream to Fedora.
110 lines
8.0 KiB
Python
Executable File
110 lines
8.0 KiB
Python
Executable File
#!/usr/bin/python
|
|
|
|
exists = { 'r' : 'open("ababab", O_RDONLY) = 3',
|
|
'rx' : 'open("ababab", O_RDONLY|O_EXCL) = 3',
|
|
'rm' : 'open("ababab", O_RDONLY) = 3',
|
|
'rmx' : 'open("ababab", O_RDONLY|O_EXCL) = 3',
|
|
'rc' : 'open("ababab", O_RDONLY) = 3',
|
|
'rcx' : 'open("ababab", O_RDONLY|O_EXCL) = 3',
|
|
'rcm' : 'open("ababab", O_RDONLY) = 3',
|
|
'rcmx' : 'open("ababab", O_RDONLY|O_EXCL) = 3',
|
|
'r+' : 'open("ababab", O_RDWR) = 3',
|
|
'r+x' : 'open("ababab", O_RDWR|O_EXCL) = 3',
|
|
'r+m' : 'open("ababab", O_RDWR) = 3',
|
|
'r+mx' : 'open("ababab", O_RDWR|O_EXCL) = 3',
|
|
'r+c' : 'open("ababab", O_RDWR) = 3',
|
|
'r+cx' : 'open("ababab", O_RDWR|O_EXCL) = 3',
|
|
'r+cm' : 'open("ababab", O_RDWR) = 3',
|
|
'r+cmx' : 'open("ababab", O_RDWR|O_EXCL) = 3',
|
|
'w' : 'open("ababab", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'wx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666) = -1 EEXIST (File exists)',
|
|
'wm' : 'open("ababab", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'wmx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666) = -1 EEXIST (File exists)',
|
|
'wc' : 'open("ababab", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'wcx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666) = -1 EEXIST (File exists)',
|
|
'wcm' : 'open("ababab", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'wcmx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666) = -1 EEXIST (File exists)',
|
|
'w+' : 'open("ababab", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'w+x' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666) = -1 EEXIST (File exists)',
|
|
'w+m' : 'open("ababab", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'w+mx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666) = -1 EEXIST (File exists)',
|
|
'w+c' : 'open("ababab", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'w+cx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666) = -1 EEXIST (File exists)',
|
|
'w+cm' : 'open("ababab", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'w+cmx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666) = -1 EEXIST (File exists)',
|
|
'a' : 'open("ababab", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3',
|
|
'ax' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = -1 EEXIST (File exists)',
|
|
'am' : 'open("ababab", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3',
|
|
'amx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = -1 EEXIST (File exists)',
|
|
'ac' : 'open("ababab", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3',
|
|
'acx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = -1 EEXIST (File exists)',
|
|
'acm' : 'open("ababab", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3',
|
|
'acmx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = -1 EEXIST (File exists)',
|
|
'a+' : 'open("ababab", O_RDWR|O_CREAT|O_APPEND, 0666) = 3',
|
|
'a+x' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_APPEND, 0666) = -1 EEXIST (File exists)',
|
|
'a+m' : 'open("ababab", O_RDWR|O_CREAT|O_APPEND, 0666) = 3',
|
|
'a+mx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_APPEND, 0666) = -1 EEXIST (File exists)',
|
|
'a+c' : 'open("ababab", O_RDWR|O_CREAT|O_APPEND, 0666) = 3',
|
|
'a+cx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_APPEND, 0666) = -1 EEXIST (File exists)',
|
|
'a+cm' : 'open("ababab", O_RDWR|O_CREAT|O_APPEND, 0666) = 3',
|
|
'a+cmx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_APPEND, 0666) = -1 EEXIST (File exists)', }
|
|
|
|
nexists= { 'r' : 'open("ababab", O_RDONLY) = -1 ENOENT (No such file or directory)',
|
|
'rx' : 'open("ababab", O_RDONLY|O_EXCL) = -1 ENOENT (No such file or directory)',
|
|
'rm' : 'open("ababab", O_RDONLY) = -1 ENOENT (No such file or directory)',
|
|
'rmx' : 'open("ababab", O_RDONLY|O_EXCL) = -1 ENOENT (No such file or directory)',
|
|
'rc' : 'open("ababab", O_RDONLY) = -1 ENOENT (No such file or directory)',
|
|
'rcx' : 'open("ababab", O_RDONLY|O_EXCL) = -1 ENOENT (No such file or directory)',
|
|
'rcm' : 'open("ababab", O_RDONLY) = -1 ENOENT (No such file or directory)',
|
|
'rcmx' : 'open("ababab", O_RDONLY|O_EXCL) = -1 ENOENT (No such file or directory)',
|
|
'r+' : 'open("ababab", O_RDWR) = -1 ENOENT (No such file or directory)',
|
|
'r+x' : 'open("ababab", O_RDWR|O_EXCL) = -1 ENOENT (No such file or directory)',
|
|
'r+m' : 'open("ababab", O_RDWR) = -1 ENOENT (No such file or directory)',
|
|
'r+mx' : 'open("ababab", O_RDWR|O_EXCL) = -1 ENOENT (No such file or directory)',
|
|
'r+c' : 'open("ababab", O_RDWR) = -1 ENOENT (No such file or directory)',
|
|
'r+cx' : 'open("ababab", O_RDWR|O_EXCL) = -1 ENOENT (No such file or directory)',
|
|
'r+cm' : 'open("ababab", O_RDWR) = -1 ENOENT (No such file or directory)',
|
|
'r+cmx' : 'open("ababab", O_RDWR|O_EXCL) = -1 ENOENT (No such file or directory)',
|
|
'w' : 'open("ababab", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'wx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666) = 3',
|
|
'wm' : 'open("ababab", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'wmx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666) = 3',
|
|
'wc' : 'open("ababab", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'wcx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666) = 3',
|
|
'wcm' : 'open("ababab", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'wcmx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_TRUNC, 0666) = 3',
|
|
'w+' : 'open("ababab", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'w+x' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666) = 3',
|
|
'w+m' : 'open("ababab", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'w+mx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666) = 3',
|
|
'w+c' : 'open("ababab", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'w+cx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666) = 3',
|
|
'w+cm' : 'open("ababab", O_RDWR|O_CREAT|O_TRUNC, 0666) = 3',
|
|
'w+cmx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_TRUNC, 0666) = 3',
|
|
'a' : 'open("ababab", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3',
|
|
'ax' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = 3',
|
|
'am' : 'open("ababab", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3',
|
|
'amx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = 3',
|
|
'ac' : 'open("ababab", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3',
|
|
'acx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = 3',
|
|
'acm' : 'open("ababab", O_WRONLY|O_CREAT|O_APPEND, 0666) = 3',
|
|
'acmx' : 'open("ababab", O_WRONLY|O_CREAT|O_EXCL|O_APPEND, 0666) = 3',
|
|
'a+' : 'open("ababab", O_RDWR|O_CREAT|O_APPEND, 0666) = 3',
|
|
'a+x' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_APPEND, 0666) = 3',
|
|
'a+m' : 'open("ababab", O_RDWR|O_CREAT|O_APPEND, 0666) = 3',
|
|
'a+mx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_APPEND, 0666) = 3',
|
|
'a+c' : 'open("ababab", O_RDWR|O_CREAT|O_APPEND, 0666) = 3',
|
|
'a+cx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_APPEND, 0666) = 3',
|
|
'a+cm' : 'open("ababab", O_RDWR|O_CREAT|O_APPEND, 0666) = 3',
|
|
'a+cmx' : 'open("ababab", O_RDWR|O_CREAT|O_EXCL|O_APPEND, 0666) = 3', }
|
|
|
|
import sys
|
|
|
|
var = sys.argv[1]
|
|
what = sys.argv[2]
|
|
|
|
if var == "ex":
|
|
print exists[what]
|
|
elif var == "nex":
|
|
print nexists[what]
|