Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 994ED200D24 for ; Tue, 24 Oct 2017 11:27:52 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 97E24160BE0; Tue, 24 Oct 2017 09:27:52 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DC3B7160BDB for ; Tue, 24 Oct 2017 11:27:51 +0200 (CEST) Received: (qmail 22317 invoked by uid 500); 24 Oct 2017 09:27:51 -0000 Mailing-List: contact reviews-help@mesos.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@mesos.apache.org Delivered-To: mailing list reviews@mesos.apache.org Received: (qmail 22306 invoked by uid 99); 24 Oct 2017 09:27:50 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 24 Oct 2017 09:27:50 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 1335C1A12AE; Tue, 24 Oct 2017 09:27:50 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.25 X-Spam-Level: *** X-Spam-Status: No, score=3.25 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, KAM_LAZY_DOMAIN_SECURITY=1, KAM_LOTSOFHASH=0.25, RP_MATCHES_RCVD=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 55Zqc_oPeIhh; Tue, 24 Oct 2017 09:27:48 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A5C295F3E1; Tue, 24 Oct 2017 09:27:47 +0000 (UTC) Received: from reviews.apache.org (unknown [10.41.0.12]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 3C703E045B; Tue, 24 Oct 2017 09:27:47 +0000 (UTC) Received: from reviews-vm2.apache.org (localhost [IPv6:::1]) by reviews.apache.org (ASF Mail Server at reviews-vm2.apache.org) with ESMTP id E5469C400D7; Tue, 24 Oct 2017 09:27:45 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============6635660672021588089==" MIME-Version: 1.0 Subject: Review Request 63245: Ported and enabled Os Tests on Windows. From: Raluca Miclea To: Andrew Schwartzmeyer Cc: Raluca Miclea , mesos Date: Tue, 24 Oct 2017 09:27:44 -0000 Message-ID: <20171024092744.64628.50443@reviews-vm2.apache.org> X-ReviewBoard-URL: https://reviews.apache.org/ Auto-Submitted: auto-generated Sender: Raluca Miclea X-ReviewGroup: mesos X-Auto-Response-Suppress: DR, RN, OOF, AutoReply X-ReviewRequest-URL: https://reviews.apache.org/r/63245/ X-Sender: Raluca Miclea Reply-To: Raluca Miclea X-ReviewRequest-Repository: mesos archived-at: Tue, 24 Oct 2017 09:27:52 -0000 --===============6635660672021588089== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/63245/ ----------------------------------------------------------- Review request for mesos and Andrew Schwartzmeyer. Bugs: MESOS-3441 https://issues.apache.org/jira/browse/MESOS-3441 Repository: mesos Description ------- TEST_F(OsTest, Libraries) The test failed because no environmental variable was provided for Windows. I used "PATH" as environmental variable on Windows since there's no default variable where the linker should look into while linking dynamic libraries/shared libraries. (like LD_LIBRARY_PATH on Unix/Linux) TEST_F(OsTest, Sleep) The test hanged because of the last assertion: ASSERT_ERROR(os::sleep(Milliseconds(-10))); Apparently, it didn't handle a negative sleep duration. By simply returning an error value when the duration is negative the problem was solved. TEST_F(OsTest, SYMLINK_Size) First issue was this assertion: EXPECT_SOME_EQ(size, os::stat::size(file,FollowSymlink::DO_NOT_FOLLOW_SYMLINK)); It fails everytime because is not a symbolic link. When calling os:stat:size with argument set to "DO_NOT_FOLLOW_SYMLINK", it firstly checks whether the path it receives is a symlink in order to get the symlink data for that path. If it's not a symlink, it returns an error. If you are supposed to be able to test the size of a non-link file in the context of not-following-a-link, the program should return the size of the non-link file instead of returning an error upon determining the nature of the path as not being a link file path. Right now, the assertion is not relevant since you'll get an error if you supply it a non-link file path rather thana symlink. TEST_F_TEMP_DISABLED_ON_WINDOWS(OsTest, SYMLINK_Realpath) The issue was that the symlink resolved to itself but it was tested against the path of the target file. Once the path of the target file was replaced by the path of the symlink, the test passed. Diffs ----- 3rdparty/stout/include/stout/os.hpp 1a81db61faa55d7043d75a012fe1e66b49bf601c 3rdparty/stout/include/stout/os/windows/stat.hpp 0db6d482ad19897db33d334bffe4b294da11a36f 3rdparty/stout/include/stout/windows/os.hpp 09ddec6d69472cd13b453fe1a77fdbe343fc23c8 3rdparty/stout/tests/os_tests.cpp 959b02d08f06481a64ef1a39acf23b062d5dc805 Diff: https://reviews.apache.org/r/63245/diff/1/ Testing ------- Modified tests: TEST_F(OsTest, Libraries) TEST_F(OsTest, Sleep) TEST_F(OsTest, SYMLINK_Size) TEST_F_TEMP_DISABLED_ON_WINDOWS(OsTest, SYMLINK_Realpath) Thanks, Raluca Miclea --===============6635660672021588089==--