Skip to content

Commit a1384c3

Browse files
committed
Commenting out unused code
testing++
1 parent 2d0d065 commit a1384c3

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

include/fsmod/PartitionFIFOCaching.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ namespace simgrid::fsmod {
4141
private:
4242
unsigned long sequence_number_ = 0;
4343
std::map<unsigned long, FileMetadata*> priority_list_;
44-
void print_priority_list();
44+
// void print_priority_list();
4545
};
4646

4747
/** \endcond */

src/PartitionFIFOCaching.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,13 @@ namespace simgrid::fsmod {
3838
}
3939
}
4040

41-
void PartitionFIFOCaching::print_priority_list() {
42-
std::cerr << "PLIST " << this->get_name() << " = ";
43-
for (auto const &i : priority_list_) {
44-
std::cerr << " " << i.second->file_name_ << " ";
45-
}
46-
std::cerr << "\n";
47-
}
41+
// void PartitionFIFOCaching::print_priority_list() {
42+
// std::cerr << "PLIST " << this->get_name() << " = ";
43+
// for (auto const &i : priority_list_) {
44+
// std::cerr << " " << i.second->file_name_ << " ";
45+
// }
46+
// std::cerr << "\n";
47+
// }
4848

4949
void PartitionFIFOCaching::new_file_creation_event(FileMetadata *file_metadata) {
5050
file_metadata->sequence_number_ = sequence_number_++;

test/truncate_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ TEST_F(TruncateTest, TruncateAndTell) {
5656
ASSERT_NO_THROW(file = fs_->open("/dev/a/foo.txt", "a"));
5757
XBT_INFO("Check current position, should be 100k ('append' mode)");
5858
ASSERT_DOUBLE_EQ(file->tell(), 100*1000);
59+
XBT_INFO("Try to truncate an opened file, which should fail");
60+
ASSERT_THROW(fs_->truncate_file("/dev/a/foo.txt", 50*1000), sgfs::InvalidTruncateException);
5961
XBT_INFO("Close the file");
6062
ASSERT_NO_THROW(file->close());
6163
XBT_INFO("Truncate the file to half its size");

0 commit comments

Comments
 (0)