services/device/internal/impl/daemonreap: disable flaky test in race mode

See https://github.com/vanadium/issues/issues/573

Change-Id: I26920562fb3e769923c46b755cc802882b160ffd
diff --git a/services/device/internal/impl/daemonreap/daemon_reaping_test.go b/services/device/internal/impl/daemonreap/daemon_reaping_test.go
index b751fdb..b35512c 100644
--- a/services/device/internal/impl/daemonreap/daemon_reaping_test.go
+++ b/services/device/internal/impl/daemonreap/daemon_reaping_test.go
@@ -16,6 +16,9 @@
 )
 
 func TestDaemonRestart(t *testing.T) {
+	if raceEnabled {
+		t.Skip("Test is flaky when run with -race.  Disabling until v.io/i/573 is fixed.")
+	}
 	cleanup, ctx, sh, envelope, root, helperPath, _ := utiltest.StartupHelper(t)
 	defer cleanup()
 
diff --git a/services/device/internal/impl/daemonreap/race0_test.go b/services/device/internal/impl/daemonreap/race0_test.go
new file mode 100644
index 0000000..07e0deb
--- /dev/null
+++ b/services/device/internal/impl/daemonreap/race0_test.go
@@ -0,0 +1,9 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build !race
+
+package daemonreap_test
+
+const raceEnabled = false
diff --git a/services/device/internal/impl/daemonreap/race_test.go b/services/device/internal/impl/daemonreap/race_test.go
new file mode 100644
index 0000000..053fdb1
--- /dev/null
+++ b/services/device/internal/impl/daemonreap/race_test.go
@@ -0,0 +1,9 @@
+// Copyright 2015 The Vanadium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// +build race
+
+package daemonreap_test
+
+const raceEnabled = true