Skip to content

Conversation

@stgates
Copy link

@stgates stgates commented Jun 17, 2014

Adding a macro for turning on/off for debugger support. Attaching a debugger is disabled if running tests for the Windows Runtime.

Disabled some usage of environment variables, which aren't avaliable, when under the Windows Runtime.

Replaced one usage of CreateFileA, which isn't allow in the Windows Runtime with fopen.

Attaching a debugger is disabled if running tests for the Windows Runtime.
Disabled some usage of environment variables, which aren't avaliable, when under the Windows Runtime.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,
Please remove this line.

@raffienficiaud
Copy link
Member

Thanks for the pull request. Would it be possible to remove all the copyright notice please?

@stgates
Copy link
Author

stgates commented Jun 17, 2014

No I don't believe so, otherwise I wouldn't be able to contribute the changes back.

Our legal team has approved the contributions only if they contain the copyright for source code changes. This hasn't been in any issue with several other contributions to other libraries is Boost. Is this going to be a blocker for you? For example see boostorg/system#3 and boostorg/predef#5.

Thanks,
Steve

@raffienficiaud
Copy link
Member

I do not know as I am not the copyright holder. I should ask the other members and I'll get back to you.
BTW, is CreateFileA also deprecated?

@stgates
Copy link
Author

stgates commented Jun 17, 2014

Ok let me know, it hasn't been a problem so far. CreateFile isn't deprecated it just isn't an API allowed in Windows phone and store applications. It is only available for Windows desktop applications, but isn't deprecated.

Thanks,
Steve

@rogeeff
Copy link
Contributor

rogeeff commented Jun 19, 2014

I I've never understood 100% what these copyright statement are for.
Including the importance of the years.
I think this is fine to add more copyright statements, though it become
ambiguous: who has copyright for what? Is this copyright for these few
lines MS added?

On Tue, Jun 17, 2014 at 2:58 PM, stgates [email protected] wrote:

Ok let me know, it hasn't been a problem so far. CreateFile isn't
deprecated it just isn't an API allowed in Windows phone and store
applications. It is only available for Windows desktop applications, but
isn't deprecated.

Thanks,
Steve


Reply to this email directly or view it on GitHub
#9 (comment).

Gennadiy Rozental

@stgates
Copy link
Author

stgates commented Jul 2, 2014

Yes my understanding is the copyright is only for the changes made. This has been the approach I've followed successfully contributing to other libraries in Boost.

Steve

@stgates
Copy link
Author

stgates commented Jul 9, 2014

Ok after some more discussion with legal at Microsoft they've agreed to let me contribute these back without a Microsoft copyright. They've been removed from all the source files I changed here.

@stgates
Copy link
Author

stgates commented Sep 2, 2014

Ping! This has been pending for some time and I've addressed all the comments made. Is this change likely to be accepted?

Thanks,
Steve

@raffienficiaud
Copy link
Member

Sorry for the delay.
I will take care of it tonight or tomorrow. Thank you for having addressed my concerns BTW.

Best,
Raffi

On 02 Sep 2014, at 19:56, Steve Gates [email protected] wrote:

Ping! This has been pending for some time and I've addressed all the comments made. Is this change likely to be accepted?

Thanks,
Steve


Reply to this email directly or view it on GitHub.

@stgates
Copy link
Author

stgates commented Sep 2, 2014

Great thanks Raffi!

@raffienficiaud
Copy link
Member

Hi,

Sorry, it takes more time than expected. I am on it.
On 02 Sep 2014, at 20:40, Steve Gates [email protected] wrote:

Great thanks Raffi!


Reply to this email directly or view it on GitHub.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be better to add definitions like

#if !defined(UNDER_CE) && !BOOST_PLAT_WINDOWS_RUNTIME
  #define BOOST_TEST_HAS_GETENV_SUPPORT
  #define BOOST_TEST_HAS_SETENV_SUPPORT  
#endif 

and then to propagate these macros in the code, like in cpp_main.cpp

@raffienficiaud
Copy link
Member

Hi Steve,

I putted some comments on your pull request.
https://github.com/boostorg/test/pull/9/files

Could you please review them?

Thanks,
Raffi

On 04 Sep 2014, at 09:38, Raffi Enficiaud [email protected] wrote:

Hi,

Sorry, it takes more time than expected. I am on it.
On 02 Sep 2014, at 20:40, Steve Gates [email protected] wrote:

Great thanks Raffi!


Reply to this email directly or view it on GitHub.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this last line is erroneous, since we want the environment variable support on eg linux or OSX. Could be replaced by

#if defined(BOOST_TEST_HAS_GETENV_SUPPORT) || defined(BOOST_TEST_HAS_SETENV_SUPPORT)

?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same remark as for line 74 in file cpp_main.ipp

@stgates
Copy link
Author

stgates commented Sep 4, 2014

Yes I'll take a look at your comments and address them. Unfortunately I'm busy the next few days and with CppCon next week, I probably won't get to this until the week after.

@raffienficiaud
Copy link
Member

I can also do some parts of course.

Best,
Raffi

On 04 Sep 2014, at 19:23, Steve Gates [email protected] wrote:

Yes I'll take a look at your comments and address them. Unfortunately I'm busy the next few days and with CppCon next week, I probably won't get to this until the week after.


Reply to this email directly or view it on GitHub.

@jneidlinger
Copy link

@stgates Pinging! Any chance this work could be revived? I would LOVE to be using Boost UTF on my Windows Runtime projects.

@stgates
Copy link
Author

stgates commented Apr 22, 2015

@jneidlinger These changes here were to enable running some of the Boost tests covering the Windows Runtime. I'm not entirely sure how easy it would be to use for testing arbitrary Windows Runtime projects.

More of the Windows APIs are being unbanned and allowed in the Windows Runtime, for example the socket and threading APIs. I'm canceling this pull request, as I think the changes are a bit invasive and going to be difficult to maintain.

@stgates stgates closed this Apr 22, 2015
@jneidlinger
Copy link

@stgates I was more interested in using the same Boost tests we currently use to test some cross platform native libraries we share between Windows apps and WinRT apps.

Are you thinking enough banned APIs will be opened up to use Boost UTF out of the box (Windows) in the future?

Thanks for the update, I appreciate it.

@stgates
Copy link
Author

stgates commented Apr 23, 2015

@jneidlinger I don't know if that will happened, but I don't have any more time to spend on this pull request. Also without regular testing it would be quite easy to break this work.

ecatmur added a commit to ecatmur/test that referenced this pull request Feb 15, 2021
Detected by asan with gcc10:

==863==ERROR: AddressSanitizer: invalid-pointer-pair: 0x7ffe21c831b0 0x00000c26f470
    #0 0x2688702 in boost::unit_test::framework::state::priority_order::operator()(boost::unit_test::test_observer*, boost::unit_test::test_observer*) const libs/test/include/boost/test/impl/framework.ipp:865
    boostorg#1 0x2688702 in std::_Rb_tree<boost::unit_test::test_observer*, boost::unit_test::test_observer*, std::_Identity<boost::unit_test::test_observer*>, boost::unit_test::framework::state::priority_order, std::allocator<boost::unit_test::test_observer*> >::_M_get_insert_unique_pos(boost::unit_test::test_observer* const&) /opt/gcc-10.2.0/include/c++/10.2.0/bits/stl_tree.h:2101
    boostorg#2 0x268aafb in std::pair<std::_Rb_tree_iterator<boost::unit_test::test_observer*>, bool> std::_Rb_tree<boost::unit_test::test_observer*, boost::unit_test::test_observer*, std::_Identity<boost::unit_test::test_observer*>, boost::unit_test::framework::state::priority_order, std::allocator<boost::unit_test::test_observer*> >::_M_insert_unique<boost::unit_test::test_observer*>(boost::unit_test::test_observer*&&) /opt/gcc-10.2.0/include/c++/10.2.0/bits/stl_tree.h:2154
    boostorg#3 0x2614ac4 in std::set<boost::unit_test::test_observer*, boost::unit_test::framework::state::priority_order, std::allocator<boost::unit_test::test_observer*> >::insert(boost::unit_test::test_observer*&&) /opt/gcc-10.2.0/include/c++/10.2.0/bits/stl_set.h:521
    boostorg#4 0x2614ac4 in boost::unit_test::framework::register_observer(boost::unit_test::test_observer&) libs/test/include/boost/test/impl/framework.ipp:1380
    boostorg#5 0x2642b56 in boost::unit_test::framework::register_observer_helper::register_obs() libs/test/include/boost/test/impl/framework.ipp:1627
    boostorg#6 0x2642b56 in boost::unit_test::framework::run(unsigned long, bool) libs/test/include/boost/test/impl/framework.ipp:1731
    boostorg#7 0x27f6c77 in boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) libs/test/include/boost/test/impl/unit_test_main.ipp:250
    boostorg#8 0x27f9495 in main libs/test/include/boost/test/impl/unit_test_main.ipp:306
    boostorg#9 0x7f8d8b3c1554 in __libc_start_main ../csu/libc-start.c:266
    boostorg#10 0x568e0d  (test+0x568e0d)
ecatmur added a commit to ecatmur/test that referenced this pull request Feb 15, 2021
Detected by asan with gcc10:

==863==ERROR: AddressSanitizer: invalid-pointer-pair: 0x7ffe21c831b0 0x00000c26f470
    #0 0x2688702 in boost::unit_test::framework::state::priority_order::operator()(boost::unit_test::test_observer*, boost::unit_test::test_observer*) const libs/test/include/boost/test/impl/framework.ipp:865
    boostorg#1 0x2688702 in std::_Rb_tree<boost::unit_test::test_observer*, boost::unit_test::test_observer*, std::_Identity<boost::unit_test::test_observer*>, boost::unit_test::framework::state::priority_order, std::allocator<boost::unit_test::test_observer*> >::_M_get_insert_unique_pos(boost::unit_test::test_observer* const&) /opt/gcc-10.2.0/include/c++/10.2.0/bits/stl_tree.h:2101
    boostorg#2 0x268aafb in std::pair<std::_Rb_tree_iterator<boost::unit_test::test_observer*>, bool> std::_Rb_tree<boost::unit_test::test_observer*, boost::unit_test::test_observer*, std::_Identity<boost::unit_test::test_observer*>, boost::unit_test::framework::state::priority_order, std::allocator<boost::unit_test::test_observer*> >::_M_insert_unique<boost::unit_test::test_observer*>(boost::unit_test::test_observer*&&) /opt/gcc-10.2.0/include/c++/10.2.0/bits/stl_tree.h:2154
    boostorg#3 0x2614ac4 in std::set<boost::unit_test::test_observer*, boost::unit_test::framework::state::priority_order, std::allocator<boost::unit_test::test_observer*> >::insert(boost::unit_test::test_observer*&&) /opt/gcc-10.2.0/include/c++/10.2.0/bits/stl_set.h:521
    boostorg#4 0x2614ac4 in boost::unit_test::framework::register_observer(boost::unit_test::test_observer&) libs/test/include/boost/test/impl/framework.ipp:1380
    boostorg#5 0x2642b56 in boost::unit_test::framework::register_observer_helper::register_obs() libs/test/include/boost/test/impl/framework.ipp:1627
    boostorg#6 0x2642b56 in boost::unit_test::framework::run(unsigned long, bool) libs/test/include/boost/test/impl/framework.ipp:1731
    boostorg#7 0x27f6c77 in boost::unit_test::unit_test_main(boost::unit_test::test_suite* (*)(int, char**), int, char**) libs/test/include/boost/test/impl/unit_test_main.ipp:250
    boostorg#8 0x27f9495 in main libs/test/include/boost/test/impl/unit_test_main.ipp:306
    boostorg#9 0x7f8d8b3c1554 in __libc_start_main ../csu/libc-start.c:266
    boostorg#10 0x568e0d  (test+0x568e0d)

Clarify formatting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants