netatalk
netatalk copied to clipboard
testsuite: a handful of T2 tests fail on OpenBSD
24 Tier-2 testsuite tests fail on OpenBSD. The T2 tests are the ones that access the host file system directly for test setup and validation (rather than using AFP commands for everything.) It is likely that some of those system calls are not portable.
We had a similar situation on Linux/musl before (when getting it to run on Alpine) so the suite was clearly written with Linux/glibc in mind.
Failed tests:
FPCopyFile:test373: copyFile check meta data, file without resource fork
FPDelete:test507: Resolve ID in a deleted folder
FPGetFileDirParms:test32: dir deleted by someone else, access with ID
FPGetFileDirParms:test33: dir deleted by someone else, access with name
FPGetFileDirParms:test42: dir deleted by someone else, access with ID from another dir
FPGetFileDirParms:test340: dir deleted by someone else, access with ID
FPGetFileDirParms:test420: FPGetFileDirParms an open file is renamed with local fs
FPMoveAndRename:test302: file renamed by someone else, cnid updated
FPResolveID:test129: Resolve ID
FPResolveID:test130: Delete ID
FPResolveID:test131: Resolve ID
FPResolveID:test331: Resolve ID file modified with local fs
FPResolveID:test360: Resolve ID file modified with local fs and a file is opened
FPResolveID:test412: Resolve ID file modified with local fs, nested dir
FPResolveID:test413: Resolve ID file modified with local fs, rename dir
Not tested tests (setup step failed):
FPGetFileDirParms:test127: dir removed with cnid not updated
FPGetFileDirParms:test128: dir removed with cnid not updated
FPGetFileDirParms:test182: dir deleted by someone else, access with ID (dirlookup)
FPOpenFork:test3: open data fork without metadata twice, close once, then read
FPOpenFork:test4: open reso fork without metadata twice, close once, then read
FPOpenFork:test7: open data fork without metadata, then open and close resource fork
FPOpenFork:test153: open data fork without resource fork
FPOpenFork:test157: open not existing resource fork read-only
FPOpenFork:test236: symlink attack: try reading /etc/passw
Is OpenBSD using AD_V2? By default the spectest is assuming AD_EA on all platforms. Confirm the backend in use and try running with the -a switch.
The earlier test results were from ea = none actually. Or rather, leave ea undefined and let it fall back to none.
Here are the results with ea = ad and the -a switch for spectest. A total of 21 failed tests.
Failed tests:
FPCreateFile:test325: recreate a file with dangling symlink and no right
FPDelete:test146: delete read only open file
FPDelete:test507: Resolve ID in a deleted folder
FPGetFileDirParms:test420: FPGetFileDirParms an open file is renamed with local fs
FPMoveAndRename:test302: file renamed by someone else, cnid updated
FPOpenFork:test152: Error when no write access to .AppleDouble
FPOpenFork:test321: Bogus (empty) resource fork
FPResolveID:test129: Resolve ID
FPResolveID:test130: Delete ID
FPResolveID:test131: Resolve ID
FPResolveID:test331: Resolve ID file modified with local fs
FPResolveID:test360: Resolve ID file modified with local fs and a file is opened
FPResolveID:test412: Resolve ID file modified with local fs, nested dir
FPResolveID:test413: Resolve ID file modified with local fs, rename dir
FPread:test109: read resource fork that is ro (0400), inaccessible (0000) or without metadata EA
Not tested tests (setup step failed):
FPGetFileDirParms:test127: dir removed with cnid not updated
FPGetFileDirParms:test128: dir removed with cnid not updated
FPGetFileDirParms:test182: dir deleted by someone else, access with ID (dirlookup)
FPOpenFork:test156: Open data fork with no write access to .AppleDouble
FPOpenFork:test236: symlink attack: try reading /etc/passwd
FPSetFileParms:test89: test set file setfilparam
Yeesh, different tests pass and fail in that case!
Out of curiosity, I got a FreeBSD environment set up. The tier-1 tests all pass (as on OpenBSD) while 14 of the tier-2 tests are failing. Yet another pattern!
Failed tests:
FPGetFileDirParms:test32: dir deleted by someone else, access with ID
FPGetFileDirParms:test33: dir deleted by someone else, access with name
FPGetFileDirParms:test42: dir deleted by someone else, access with ID from another dir
FPGetFileDirParms:test182: dir deleted by someone else, access with ID (dirlookup)
FPGetFileDirParms:test340: dir deleted by someone else, access with ID
FPMoveAndRename:test136: move and rename in a dir without .AppleDouble
FPMoveAndRename:test137: move and rename open file in dir without .AppleDouble
FPOpenFork:test431: check AppleDouble conversion from v2 to ea
FPResolveID:test129: Resolve ID
FPResolveID:test130: Delete ID
FPResolveID:test131: Resolve ID
FPResolveID:test397: Resolve ID file deleted local fs
FPResolveID:test412: Resolve ID file modified with local fs, nested dir
Encoding:western
Discarding this. It's the most important that the Tier 1 spectests as passing, since they're the ones that cover the AFP commands proper. The Tier 2 tests are more hackish in nature, interacting with the system directly to test corner cases.