Project

General

Profile

Bug #5312

Skip EXT4StoreTest._detect_fs test if DISK or MOUNTPOINT environment variables not set

Added by David Zafman over 6 years ago. Updated about 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
06/11/2013
Due date:
% Done:

0%

Spent time:
Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

I disabled the ColSplitTest1/ColSplitTest2 tests (see bug #5310).

Currently, this test case just crashes with unclear error message:

[ RUN ] EXT4StoreTest._detect_fs
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct null not valid

Found in gdb:
#6 0x00007f9afdd1a787 in std::__throw_logic_error(char const*) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#7 0x00007f9afdd58509 in char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#8 0x00007f9afdd585e3 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&) () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#9 0x000000000091ffe5 in EXT4StoreTest__detect_fs_Test::TestBody (this=0x1796990) at test/filestore/store_test.cc:835

835 const string disk(::getenv("DISK"));

Something is causing the string constructor to throw an error on attempt to create an empty string. Even if this were corrected this test would failed on the next line anyway because of the string size.

836 EXPECT_LT((unsigned)0, disk.size());

Associated revisions

Revision 6e320a1b (diff)
Added by Loic Dachary about 6 years ago

skip TEST if DISK or MOUNTPOINT are undefined

The TEST test is meant to be run from
qa/workunits/filestore/filestore.sh, after the ext4 file system was
created. If the DISK and MOUNTPOINT environment variables are not
defined, display a message explaining the expected environment and
silentely skip the test. The tests in store_test.cc are not unit tests
because they depend on their environment.

http://tracker.ceph.com/issues/5312 fixes #5312

Signed-off-by: Loic Dachary <>

History

#1 Updated by Ian Colle over 6 years ago

1577e203f08c3f94c36fd128dda14e8bceeca7a9

#2 Updated by Sage Weil over 6 years ago

  • Assignee set to David Zafman

#3 Updated by Loic Dachary about 6 years ago

TEST (EXT4StoreTest, _detect_fs) was introduced by https://github.com/ceph/ceph/commit/574051f8da0a30073a7d5da880878ee3c941721b and meant to be run from filestore.sh

#4 Updated by Loic Dachary about 6 years ago

  • Status changed from New to Need Review

#5 Updated by Sage Weil about 6 years ago

  • Status changed from Need Review to Resolved

Also available in: Atom PDF