Snap for 8730993 from 5e761e63910939bdc878c1a4b0b322c5a64ce98a to mainline-tzdata3-release

Change-Id: I5971d1abb6d4aca24d499d915173a61dafe7b178
diff --git a/.cargo_vcs_info.json b/.cargo_vcs_info.json
index eb7e2b0..9388b50 100644
--- a/.cargo_vcs_info.json
+++ b/.cargo_vcs_info.json
@@ -1,5 +1,5 @@
 {
   "git": {
-    "sha1": "ff9b0ef7ca5a93f8fb10baba52996e755500546f"
+    "sha1": "e40ec3e4243f95b39a42bcc9049551b62c3058a0"
   }
 }
diff --git a/Android.bp b/Android.bp
index 43cb97d..ef76cb6 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --config cargo2android.json.
+// This file is generated by cargo2android.py --run --dependencies --device --tests.
 // Do not modify this file as changes will be overridden on upgrade.
 
 package {
@@ -22,8 +22,6 @@
     name: "libtokio_test",
     host_supported: true,
     crate_name: "tokio_test",
-    cargo_env_compat: true,
-    cargo_pkg_version: "0.4.2",
     srcs: ["src/lib.rs"],
     edition: "2018",
     rustlibs: [
@@ -36,10 +34,38 @@
 }
 
 rust_defaults {
-    name: "tokio-test_test_defaults",
+    name: "tokio-test_defaults",
     crate_name: "tokio_test",
-    cargo_env_compat: true,
-    cargo_pkg_version: "0.4.2",
+    srcs: ["src/lib.rs"],
+    test_suites: ["general-tests"],
+    auto_gen_config: true,
+    edition: "2018",
+    rustlibs: [
+        "libasync_stream",
+        "libbytes",
+        "libfutures_core",
+        "libfutures_util",
+        "libtokio",
+        "libtokio_stream",
+    ],
+}
+
+rust_test_host {
+    name: "tokio-test_host_test_src_lib",
+    defaults: ["tokio-test_defaults"],
+    test_options: {
+        unit_test: true,
+    },
+}
+
+rust_test {
+    name: "tokio-test_device_test_src_lib",
+    defaults: ["tokio-test_defaults"],
+}
+
+rust_defaults {
+    name: "tokio-test_defaults_tokio_test",
+    crate_name: "tokio_test",
     test_suites: ["general-tests"],
     auto_gen_config: true,
     edition: "2018",
@@ -54,10 +80,9 @@
     ],
 }
 
-rust_test {
-    name: "tokio-test_test_tests_block_on",
-    defaults: ["tokio-test_test_defaults"],
-    host_supported: true,
+rust_test_host {
+    name: "tokio-test_host_test_tests_block_on",
+    defaults: ["tokio-test_defaults_tokio_test"],
     srcs: ["tests/block_on.rs"],
     test_options: {
         unit_test: true,
@@ -65,9 +90,14 @@
 }
 
 rust_test {
-    name: "tokio-test_test_tests_io",
-    defaults: ["tokio-test_test_defaults"],
-    host_supported: true,
+    name: "tokio-test_device_test_tests_block_on",
+    defaults: ["tokio-test_defaults_tokio_test"],
+    srcs: ["tests/block_on.rs"],
+}
+
+rust_test_host {
+    name: "tokio-test_host_test_tests_io",
+    defaults: ["tokio-test_defaults_tokio_test"],
     srcs: ["tests/io.rs"],
     test_options: {
         unit_test: true,
@@ -75,11 +105,58 @@
 }
 
 rust_test {
-    name: "tokio-test_test_tests_macros",
-    defaults: ["tokio-test_test_defaults"],
-    host_supported: true,
+    name: "tokio-test_device_test_tests_io",
+    defaults: ["tokio-test_defaults_tokio_test"],
+    srcs: ["tests/io.rs"],
+}
+
+rust_test_host {
+    name: "tokio-test_host_test_tests_macros",
+    defaults: ["tokio-test_defaults_tokio_test"],
     srcs: ["tests/macros.rs"],
     test_options: {
         unit_test: true,
     },
 }
+
+rust_test {
+    name: "tokio-test_device_test_tests_macros",
+    defaults: ["tokio-test_defaults_tokio_test"],
+    srcs: ["tests/macros.rs"],
+}
+
+// dependent_library ["feature_list"]
+//   async-stream-0.3.0
+//   async-stream-impl-0.3.0
+//   autocfg-1.0.1
+//   bytes-1.0.1 "default,std"
+//   cfg-if-1.0.0
+//   futures-core-0.3.13 "alloc,default,std"
+//   futures-macro-0.3.13
+//   futures-task-0.3.13 "alloc,std"
+//   futures-util-0.3.13 "alloc,async-await,async-await-macro,default,futures-macro,proc-macro-hack,proc-macro-nested,slab,std"
+//   instant-0.1.9
+//   libc-0.2.92 "default,std"
+//   lock_api-0.4.2
+//   log-0.4.14
+//   memchr-2.3.4 "default,std"
+//   mio-0.7.11 "default,net,os-ext,os-poll,os-util,tcp,udp,uds"
+//   num_cpus-1.13.0
+//   once_cell-1.7.2 "alloc,default,race,std"
+//   parking_lot-0.11.1 "default"
+//   parking_lot_core-0.8.3
+//   pin-project-lite-0.2.6
+//   pin-utils-0.1.0
+//   proc-macro-hack-0.5.19
+//   proc-macro-nested-0.1.7
+//   proc-macro2-1.0.26 "default,proc-macro"
+//   quote-1.0.9 "default,proc-macro"
+//   scopeguard-1.1.0
+//   signal-hook-registry-1.3.0
+//   slab-0.4.2
+//   smallvec-1.6.1
+//   syn-1.0.68 "clone-impls,default,derive,extra-traits,full,parsing,printing,proc-macro,quote,visit-mut"
+//   tokio-1.4.0 "bytes,default,fs,full,io-std,io-util,libc,macros,memchr,mio,net,num_cpus,once_cell,parking_lot,process,rt,rt-multi-thread,signal,signal-hook-registry,sync,test-util,time,tokio-macros,winapi"
+//   tokio-macros-1.1.0
+//   tokio-stream-0.1.5 "default,time"
+//   unicode-xid-0.2.1 "default"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b1786f..3fba3ce 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,9 +1,3 @@
-# 0.4.2 (May 14, 2021)
-
-- test: add `assert_elapsed!` macro ([#3728])
-
-[#3728]: https://github.com/tokio-rs/tokio/pull/3728
-
 # 0.4.1 (March 10, 2021)
 
 - Fix `io::Mock` to be `Send` and `Sync` ([#3594])
diff --git a/Cargo.toml b/Cargo.toml
index 1ebd109..6dc1d0c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,11 +13,11 @@
 [package]
 edition = "2018"
 name = "tokio-test"
-version = "0.4.2"
+version = "0.4.1"
 authors = ["Tokio Contributors <team@tokio.rs>"]
 description = "Testing utilities for Tokio- and futures-based code\n"
 homepage = "https://tokio.rs"
-documentation = "https://docs.rs/tokio-test/0.4.2/tokio_test"
+documentation = "https://docs.rs/tokio-test/0.4.1/tokio_test"
 categories = ["asynchronous", "testing"]
 license = "MIT"
 repository = "https://github.com/tokio-rs/tokio"
diff --git a/Cargo.toml.orig b/Cargo.toml.orig
index 55d5aaf..2691c89 100644
--- a/Cargo.toml.orig
+++ b/Cargo.toml.orig
@@ -6,13 +6,13 @@
 #   - Cargo.toml
 # - Update CHANGELOG.md.
 # - Create "tokio-test-0.4.x" git tag.
-version = "0.4.2"
+version = "0.4.1"
 edition = "2018"
 authors = ["Tokio Contributors <team@tokio.rs>"]
 license = "MIT"
 repository = "https://github.com/tokio-rs/tokio"
 homepage = "https://tokio.rs"
-documentation = "https://docs.rs/tokio-test/0.4.2/tokio_test"
+documentation = "https://docs.rs/tokio-test/0.4.1/tokio_test"
 description = """
 Testing utilities for Tokio- and futures-based code
 """
diff --git a/LICENSE b/LICENSE
index ffa38bb..243fcd6 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2021 Tokio Contributors
+Copyright (c) 2020 Tokio Contributors
 
 Permission is hereby granted, free of charge, to any
 person obtaining a copy of this software and associated
diff --git a/METADATA b/METADATA
index f1e1ef3..22032a7 100644
--- a/METADATA
+++ b/METADATA
@@ -7,13 +7,13 @@
   }
   url {
     type: ARCHIVE
-    value: "https://static.crates.io/crates/tokio-test/tokio-test-0.4.2.crate"
+    value: "https://static.crates.io/crates/tokio-test/tokio-test-0.4.1.crate"
   }
-  version: "0.4.2"
+  version: "0.4.1"
   license_type: NOTICE
   last_upgrade_date {
     year: 2021
-    month: 5
-    day: 19
+    month: 4
+    day: 2
   }
 }
diff --git a/TEST_MAPPING b/TEST_MAPPING
index f2e3379..73ad094 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -1,30 +1,113 @@
 // Generated by update_crate_tests.py for tests that depend on this crate.
 {
-  "imports": [
-    {
-      "path": "external/rust/crates/tokio"
-    }
-  ],
   "presubmit": [
     {
-      "name": "tokio-test_test_tests_block_on"
+      "name": "tokio-test_device_test_src_lib"
     },
     {
-      "name": "tokio-test_test_tests_io"
+      "name": "tokio-test_device_test_tests_block_on"
     },
     {
-      "name": "tokio-test_test_tests_macros"
-    }
-  ],
-  "presubmit-rust": [
-    {
-      "name": "tokio-test_test_tests_block_on"
+      "name": "tokio-test_device_test_tests_io"
     },
     {
-      "name": "tokio-test_test_tests_io"
+      "name": "tokio-test_device_test_tests_macros"
     },
     {
-      "name": "tokio-test_test_tests_macros"
+      "name": "tokio_device_test_tests_buffered"
+    },
+    {
+      "name": "tokio_device_test_tests_io_async_read"
+    },
+    {
+      "name": "tokio_device_test_tests_io_copy_bidirectional"
+    },
+    {
+      "name": "tokio_device_test_tests_io_lines"
+    },
+    {
+      "name": "tokio_device_test_tests_io_mem_stream"
+    },
+    {
+      "name": "tokio_device_test_tests_io_read"
+    },
+    {
+      "name": "tokio_device_test_tests_io_read_buf"
+    },
+    {
+      "name": "tokio_device_test_tests_io_read_to_end"
+    },
+    {
+      "name": "tokio_device_test_tests_io_take"
+    },
+    {
+      "name": "tokio_device_test_tests_io_write"
+    },
+    {
+      "name": "tokio_device_test_tests_io_write_all"
+    },
+    {
+      "name": "tokio_device_test_tests_io_write_buf"
+    },
+    {
+      "name": "tokio_device_test_tests_io_write_int"
+    },
+    {
+      "name": "tokio_device_test_tests_macros_join"
+    },
+    {
+      "name": "tokio_device_test_tests_no_rt"
+    },
+    {
+      "name": "tokio_device_test_tests_rt_basic"
+    },
+    {
+      "name": "tokio_device_test_tests_rt_threaded"
+    },
+    {
+      "name": "tokio_device_test_tests_sync_barrier"
+    },
+    {
+      "name": "tokio_device_test_tests_sync_broadcast"
+    },
+    {
+      "name": "tokio_device_test_tests_sync_errors"
+    },
+    {
+      "name": "tokio_device_test_tests_sync_mpsc"
+    },
+    {
+      "name": "tokio_device_test_tests_sync_mutex_owned"
+    },
+    {
+      "name": "tokio_device_test_tests_sync_rwlock"
+    },
+    {
+      "name": "tokio_device_test_tests_sync_watch"
+    },
+    {
+      "name": "tokio_device_test_tests_task_local"
+    },
+    {
+      "name": "tokio_device_test_tests_task_local_set"
+    },
+    {
+      "name": "tokio_device_test_tests_tcp_accept"
+    },
+    {
+      "name": "tokio_device_test_tests_tcp_echo"
+    },
+    {
+      "name": "tokio_device_test_tests_tcp_into_std"
+    },
+    {
+      "name": "tokio_device_test_tests_tcp_shutdown"
+    },
+    {
+      "name": "tokio_device_test_tests_time_rt"
+    },
+    {
+      "name": "tokio_device_test_tests_uds_split"
     }
   ]
 }
diff --git a/cargo2android.json b/cargo2android.json
deleted file mode 100644
index d36fb44..0000000
--- a/cargo2android.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
-  "device": true,
-  "run": true,
-  "tests": true
-}
\ No newline at end of file
diff --git a/src/macros.rs b/src/macros.rs
index 7ca7345..299bd77 100644
--- a/src/macros.rs
+++ b/src/macros.rs
@@ -259,37 +259,3 @@
         }
     }};
 }
-
-/// Asserts that an exact duration has elapsed since since the start instant ±1ms.
-///
-/// ```rust
-/// use tokio::time::{self, Instant};
-/// use std::time::Duration;
-/// use tokio_test::assert_elapsed;
-/// # async fn test_time_passed() {
-///
-/// let start = Instant::now();
-/// let dur = Duration::from_millis(50);
-/// time::sleep(dur).await;
-/// assert_elapsed!(start, dur);
-/// # }
-/// ```
-///
-/// This 1ms buffer is required because Tokio's hashed-wheel timer has finite time resolution and
-/// will not always sleep for the exact interval.
-#[macro_export]
-macro_rules! assert_elapsed {
-    ($start:expr, $dur:expr) => {{
-        let elapsed = $start.elapsed();
-        // type ascription improves compiler error when wrong type is passed
-        let lower: std::time::Duration = $dur;
-
-        // Handles ms rounding
-        assert!(
-            elapsed >= lower && elapsed <= lower + std::time::Duration::from_millis(1),
-            "actual = {:?}, expected = {:?}",
-            elapsed,
-            lower
-        );
-    }};
-}