Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support both static and dynamic linking mode in testing for vxWorks #63789

Merged
merged 14 commits into from Sep 7, 2019

Conversation

@BaoshanPang
Copy link
Contributor

commented Aug 21, 2019

  1. Support both static and dynamic linking mode in testing for vxWorks
  2. Ignore unsupported test cases: net:tcp:tests:timeouts and net:ucp:tests:timeouts

r? @alexcrichton

BaoshanPang and others added 3 commits Aug 20, 2019
Merge pull request #6 from rust-lang/master
rebase code from rust-lang/rust master branch
run test for vxWorks in 'pure' static linking mode by default;
if environment variables 'RUST_TEST_DYLINK' is set to 1, then run test in 'pure' dynamic linking mode
Merge pull request #2 from Wind-River/bpang-runtest
Support static and dynamic linking mode for vxWorks in running test suite
n-salim added 2 commits Aug 22, 2019
VxWorks ignores the SO_SNDTIMEO socket option (this is long-standing
behavior), so skip the following tests:

net::tcp::tests::timeouts
net::udp::tests::timeouts
Merge pull request #7 from Wind-River/vxworks-V7LIBC-942
Skip socket timeout tests on VxWorks
@alexcrichton

This comment has been minimized.

Copy link
Member

commented Aug 26, 2019

Thanks! With a name like use_dynamic_linking this doesn't necessarily sound vxworks-specific, so perhaps this could just be blanket applied to all targets? It looks like it's opt-in behavior so I don't think it'll break anything anyway.

Additionally could the other logic about selecting -Cprefer-dynamic all be centralized in this method as well?

bpangWR and others added 3 commits Aug 16, 2019
run test for vxWorks in 'pure' static linking mode by default;
if environment variables 'RUST_TEST_DYLINK' is set to 1, then run test in 'pure' dynamic linking mode
Merge pull request #10 from Wind-River/bpang-runtest
run test for vxWorks in 'pure' static linking mode by default;
@BaoshanPang

This comment has been minimized.

Copy link
Contributor Author

commented Aug 29, 2019

Thanks! With a name like use_dynamic_linking this doesn't necessarily sound vxworks-specific, so perhaps this could just be blanket applied to all targets? It looks like it's opt-in behavior so I don't think it'll break anything anyway.

Additionally could the other logic about selecting -Cprefer-dynamic all be centralized in this method as well?

I have revised the code in more VxWorks specific way which should be safer.

@alexcrichton
Is this acceptable? I feel making it more genereic is little risk for me as I don't know other targets very well.


fn is_vxworks_pure_dynamic(&self) -> bool {
if self.config.target.contains("vxworks") {
match env::var("RUST_TEST_DYLINK") {

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Sep 3, 2019

Member

Could this branch perhaps just be !self.is_vxworks_pure_static()? (basically reading the env var only once)

This comment has been minimized.

Copy link
@BaoshanPang

BaoshanPang Sep 3, 2019

Author Contributor

Could this branch perhaps just be !self.is_vxworks_pure_static()? (basically reading the env var only once)

For !self.is_vxworks_pure_static(), it would be true for all non-vxworks targets which is not what we want.

This comment has been minimized.

Copy link
@alexcrichton

alexcrichton Sep 4, 2019

Member

Er sorry I meant just in this branch, so only if the target is vxworks do we delegate to is_vxworks_pure_static

This comment has been minimized.

Copy link
@BaoshanPang

BaoshanPang Sep 5, 2019

Author Contributor

I see. I have uploaded the code that simply the function is_vxworks_pure_dynamic().

src/tools/compiletest/src/runtest.rs Outdated Show resolved Hide resolved
BaoshanPang and others added 6 commits Sep 3, 2019
Merge pull request #12 from rust-lang/master
sync with rust-lang/rust branch master
Merge pull request #15 from Wind-River/bpang-runtest
change RUST_TEST_DYLINK to RUST_VXWORKS_TEST_DYLINK
Merge pull request #18 from Wind-River/bpang-runtest-2
simplify is_vxworks_pure_dynamic()
Merge pull request #17 from rust-lang/master
sync with rust-lang/rust master branch
@alexcrichton

This comment has been minimized.

Copy link
Member

commented Sep 6, 2019

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2019

📌 Commit 414d104 has been approved by alexcrichton

@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2019

⌛️ Testing commit 414d104 with merge da13f06...

bors added a commit that referenced this pull request Sep 6, 2019
Auto merge of #63789 - Wind-River:master, r=alexcrichton
Support both static and dynamic linking mode in testing for vxWorks

1. Support both static and dynamic linking mode in testing for vxWorks
2. Ignore unsupported test cases: net:tcp:tests:timeouts and net:ucp:tests:timeouts

r? @alexcrichton
@bors

This comment has been minimized.

Copy link
Contributor

commented Sep 7, 2019

☀️ Test successful - checks-azure
Approved by: alexcrichton
Pushing da13f06 to master...

@bors bors added the merged-by-bors label Sep 7, 2019

@bors bors merged commit 414d104 into rust-lang:master Sep 7, 2019

5 checks passed

homu Test successful
Details
pr Build #20190906.7 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.