Uncommented a few tests that our Storage Kit implementation passes now.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8696 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold 2004-08-28 20:20:55 +00:00
parent 044be4e258
commit cc868bc230
3 changed files with 13 additions and 17 deletions

View File

@ -52,9 +52,6 @@ NodeTest::Suite() {
suite->addTest( new CppUnit::TestCaller<NodeTest>("BNode::Equality Test", &NodeTest::EqualityTest) );
suite->addTest( new CppUnit::TestCaller<NodeTest>("BNode::Assignment Test", &NodeTest::AssignmentTest) );
suite->addTest( new CppUnit::TestCaller<NodeTest>("BNode::Lock Test"
#if TEST_OBOS /* !!!POSIX ONLY!!! */
" (NOTE: test not actually performed with OpenBeOS Posix libraries)"
#endif
, &NodeTest::LockTest) );
return suite;
@ -795,7 +792,7 @@ NodeTest::AttrRenameTest(BNode &node)
const int dataLen = 1024;
char data[dataLen];
node.SetTo("./");
CPPUNIT_ASSERT( node.SetTo("./") == B_OK );
// Test the case of the first attribute not existing
node.RemoveAttr(attr1);
@ -1172,7 +1169,6 @@ NodeTest::LockTest(BNode &node, const char *entryName)
void
NodeTest::LockTest()
{
#if !TEST_OBOS /* !!!POSIX ONLY!!! */
// uninitialized objects
NextSubTest();
TestNodes testEntries;
@ -1190,7 +1186,6 @@ NodeTest::LockTest()
LockTest(*node, nodeName.c_str());
}
testEntries.delete_all();
#endif
}
// entry names used in tests

View File

@ -136,10 +136,7 @@ StatableTest::GetXYZTest()
#if !TEST_R5 && !TEST_OBOS /* !!!POSIX ONLY!!! */
CPPUNIT_ASSERT( atime == st.st_atime );
#endif
// OBOS: BVolume::==() is not implemented yet
#if !TEST_OBOS /* !!!POSIX ONLY!!! */
CPPUNIT_ASSERT( volume == BVolume(st.st_dev) );
#endif
}
testEntries.delete_all();
// test with uninitialized objects
@ -200,35 +197,27 @@ StatableTest::SetXYZTest()
struct stat st;
uid_t owner = 0xdad;
gid_t group = 0xdee;
// OBOS: no fchmod(), no FD time setters
#if !TEST_OBOS /* !!!POSIX ONLY!!! */
mode_t perms = 0x0ab; // -w- r-x -wx -- unusual enough? ;-)
time_t mtime = 1234567;
time_t ctime = 654321;
#endif
// R5: access time unused
#if !TEST_R5 && !TEST_OBOS /* !!!POSIX ONLY!!! */
time_t atime = 2345678;
#endif
// OBOS: no fchmod(), no FD time setters
CPPUNIT_ASSERT( statable->SetOwner(owner) == B_OK );
CPPUNIT_ASSERT( statable->SetGroup(group) == B_OK );
#if !TEST_OBOS /* !!!POSIX ONLY!!! */
CPPUNIT_ASSERT( statable->SetPermissions(perms) == B_OK );
CPPUNIT_ASSERT( statable->SetModificationTime(mtime) == B_OK );
CPPUNIT_ASSERT( statable->SetCreationTime(ctime) == B_OK );
#endif
#if !TEST_R5 && !TEST_OBOS /* !!!POSIX ONLY!!! */
CPPUNIT_ASSERT( statable->SetAccessTime(atime) == B_OK );
#endif
CPPUNIT_ASSERT( lstat(entryName.c_str(), &st) == 0 );
CPPUNIT_ASSERT( owner == st.st_uid );
CPPUNIT_ASSERT( group == st.st_gid );
#if !TEST_OBOS /* !!!POSIX ONLY!!! */
CPPUNIT_ASSERT( perms == (st.st_mode & S_IUMSK) );
CPPUNIT_ASSERT( mtime == st.st_mtime );
CPPUNIT_ASSERT( ctime == st.st_crtime );
#endif
#if !TEST_R5 && !TEST_OBOS /* !!!POSIX ONLY!!! */
CPPUNIT_ASSERT( atime == st.st_atime );
#endif

View File

@ -191,6 +191,17 @@ CheckVolume(BVolume &volume, dev_t device, status_t error)
}
}
// AssertNotBootVolume
static
void
AssertNotBootVolume(const BVolume &volume)
{
CHK(volume.InitCheck() == B_OK);
dev_t bootDevice = dev_for_path("/boot");
CHK(bootDevice >= 0);
CHK(volume.Device() != bootDevice);
}
// InitTest1
void
VolumeTest::InitTest1()
@ -361,6 +372,7 @@ VolumeTest::SetNameTest()
dev_t device = dev_for_path(testMountPoint);
BVolume volume(device);
CheckVolume(volume, device, B_OK);
AssertNotBootVolume(volume);
// set a new name
NextSubTest();
const char *newName = "a new name";