[CRIU] [PATCH 1/3] zdtm: fix awk script for Ubuntu
Andrey Vagin
avagin at openvz.org
Fri Mar 20 01:33:07 PDT 2015
mawk doesn't handle '\<...\>'
Ubuntu:
$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan
$ ldd /bin/ps
linux-vdso.so.1 => (0x00007fffb290a000)
$ ldd /bin/ps | awk '/\<linux-vdso\.so\>/ { print $1 }'
$ ldd /bin/ps | awk '/linux-vdso\.so/ { print $1 }'
linux-vdso.so.1
Fedora:
$ ldd /bin/ps
linux-vdso.so.1 => (0x00007fff61fcb000)
$ ldd /bin/ps | awk '/\<linux-vdso\.so\>/ { print $1 }'
linux-vdso.so.1
$ awk --version
GNU Awk 4.1.1, API: 1.1
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/zdtm.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 878bfae..a270b79 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -435,9 +435,9 @@ construct_root()
local libs=$(ldd $test_path $ps_path | awk '
!/^[ \t]/ { next }
- /\<linux-vdso\.so\>/ { next }
- /\<linux-gate\.so\>/ { next }
- /\<not a dynamic executable$/ { next }
+ /linux-vdso\.so/ { next }
+ /linux-gate\.so/ { next }
+ /not a dynamic executable$/ { next }
$2 ~ /^=>$/ { print $3; next }
{ print $1 }
')
--
2.1.0
More information about the CRIU
mailing list