[ovs-dev] [PATCH] test: Avoid using 'truncate' command

Mark Michelson mmichels at redhat.com
Mon Sep 11 20:58:12 UTC 2017


The 'truncate' command is not available on all platforms. Since the
command was being used to zero out a file, there are other easy options
available. In this case, I've replaced 'truncate' with a redirection.

Reported-by: Alin Gabriel Serdean <aserdean at ovn.org>
Signed-off-by: Mark Michelson <mmichels at redhat.com>
---
 tests/ovn.at | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ovn.at b/tests/ovn.at
index 2a00232ed..6c38b973f 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -8501,7 +8501,7 @@ ovn-nbctl --wait=hv --timeout=3 sync
 # doesn't have the same effect because "name" is conserved, and the
 # Chassis entry is not replaced.
 
-truncate -s 0 gw1/ovn-controller.log
+> gw1/ovn-controller.log
 
 gw2_chassis=$(ovn-sbctl --bare --columns=_uuid find Chassis name=gw2)
 ovn-sbctl destroy Chassis $gw2_chassis
-- 
2.13.5



More information about the dev mailing list