+ return 0;
+}
+
+static int dm_test_eth_rotate(struct unit_test_state *uts)
+{
+ char ethaddr[18];
+ int retval;
+
+ /* Set target IP to mock ping */
+ net_ping_ip = string_to_ip("1.1.2.2");
+
+ /* Invalidate eth1's MAC address */
+ strcpy(ethaddr, getenv("eth1addr"));
+ /* Must disable access protection for eth1addr before clearing */
+ setenv(".flags", "eth1addr");
+ setenv("eth1addr", NULL);
+
+ retval = _dm_test_eth_rotate1(uts);
+
+ /* Restore the env */
+ setenv("eth1addr", ethaddr);
+ setenv("ethrotate", NULL);
+
+ if (!retval) {
+ /* Invalidate eth0's MAC address */
+ strcpy(ethaddr, getenv("ethaddr"));
+ /* Must disable access protection for ethaddr before clearing */
+ setenv(".flags", "ethaddr");
+ setenv("ethaddr", NULL);
+
+ retval = _dm_test_eth_rotate2(uts);
+
+ /* Restore the env */
+ setenv("ethaddr", ethaddr);
+ }