Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ before_script:
- mkdir darwin && cd darwin

script:
- cmake .. -DTRAVIS=ON
- cmake .. -DTRAVIS=ON -DEXTRA_TESTS=ON
- make VERBOSE=1 && ./unittests --pass
2 changes: 2 additions & 0 deletions examples/demo_service/service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ http::Response handle_request(const http::Request& req)
void Service::start(const std::string&)
{
// DHCP on interface 0
printf("*** Waiting up to 10 sec. for DHCP... ***\n");
auto& inet = net::Inet4::ifconfig(5.0, [](bool timeout) {
if (timeout) {
printf("*** Falling back to static network config ***\n");
// static IP in case DHCP fails
net::Inet4::stack().network_config(
{ 10,0,0,42 }, // IP
Expand Down
2 changes: 1 addition & 1 deletion test/posix/integration/stat/ftw_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ void ftw_tests()
printf("Total size: %ld\n", total_size);
}

int display_info(const char *fpath, const struct stat *sb, int flag, struct FTW *ftwbuf)
int display_info(const char *fpath, const struct stat *sb, int flag, struct FTW *)
{
printf("%ld\t%s (%d)\n", sb->st_size, fpath, flag);
#ifdef EXTRAVERBOSE
Expand Down
12 changes: 6 additions & 6 deletions test/posix/integration/stat/test_stat_ftw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@
int ftw_tests();
int stat_tests();

fs::Disk_ptr& memdisk() {
static auto disk = fs::new_shared_memdisk();
fs::Disk& memdisk() {
fs::Disk& disk = fs::memdisk();

if (not disk->fs_ready()) {
printf("%s\n", disk->name().c_str());
disk->init_fs([](fs::error_t err, auto&) {
if (not disk.fs_ready()) {
printf("%s\n", disk.name().c_str());
disk.init_fs([](fs::error_t err, auto&) {
if (err) {
printf("ERROR MOUNTING DISK\n");
exit(127);
Expand All @@ -44,7 +44,7 @@ int main()
INFO("POSIX stat", "Running tests for POSIX stat");

// mount a disk with contents for testing
auto root = memdisk()->fs().stat("/");
auto root = memdisk().fs().stat("/");
fs::mount("/mnt/disk", root, "test root");

fs::print_tree();
Expand Down