Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(207)

Side by Side Diff: native_client_sdk/src/tests/nacl_io_test/socket_test.cc

Issue 1726723002: [NaCL SDK] nacl_io: Re-enable UnixSocketMultithreadedTest.SendRecv (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <arpa/inet.h> 5 #include <arpa/inet.h>
6 #include <errno.h> 6 #include <errno.h>
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <netinet/in.h> 8 #include <netinet/in.h>
9 #include <pthread.h> 9 #include <pthread.h>
10 #include <sys/types.h> 10 #include <sys/types.h>
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 &thread_buffer_); 532 &thread_buffer_);
533 return NULL; 533 return NULL;
534 } 534 }
535 535
536 protected: 536 protected:
537 Buffer thread_buffer_; 537 Buffer thread_buffer_;
538 }; 538 };
539 539
540 } // namespace 540 } // namespace
541 541
542 TEST_F(UnixSocketMultithreadedTest, DISABLED_SendRecv) { 542 TEST_F(UnixSocketMultithreadedTest, SendRecv) {
543 pthread_t thread = CreateThread(); 543 pthread_t thread = CreateThread();
544 544
545 uint8_t pattern[] = {0xA5, 0x00, 0xC3, 0xFF}; 545 uint8_t pattern[] = {0xA5, 0x00, 0xC3, 0xFF};
546 size_t pattern_size = sizeof(pattern); 546 size_t pattern_size = sizeof(pattern);
547 Buffer main_read_buf; 547 Buffer main_read_buf;
548 548
549 ReadWriteSocket(sv_[0], pattern, pattern_size, kMainSendSize, &main_read_buf); 549 ReadWriteSocket(sv_[0], pattern, pattern_size, kMainSendSize, &main_read_buf);
550 550
551 pthread_join(thread, NULL); 551 pthread_join(thread, NULL);
552 552
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 830
831 TEST(SocketUtilityFunctions, Ntohl) { 831 TEST(SocketUtilityFunctions, Ntohl) {
832 uint8_t network_bytes[4] = { 0x44, 0x33, 0x22, 0x11 }; 832 uint8_t network_bytes[4] = { 0x44, 0x33, 0x22, 0x11 };
833 uint32_t network_long; 833 uint32_t network_long;
834 memcpy(&network_long, network_bytes, 4); 834 memcpy(&network_long, network_bytes, 4);
835 uint32_t host_long = ntohl(network_long); 835 uint32_t host_long = ntohl(network_long);
836 EXPECT_EQ(host_long, 0x44332211); 836 EXPECT_EQ(host_long, 0x44332211);
837 } 837 }
838 838
839 #endif // PROVIDES_SOCKETPAIR_API 839 #endif // PROVIDES_SOCKETPAIR_API
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698