lsfd_expr="PID == ${PID} and FD == $FD"
lsfd_inode=$(${TS_CMD_LSFD} -n --raw -o INODE -Q "${lsfd_expr}")
lsns_expr="NS == $lsfd_inode"
- lsns_output=$(${TS_CMD_LSNS} -n --raw -o TYPE,NPROCS,USER -Q "${lsns_expr}")
+ lsns_output=$(${TS_CMD_LSNS} --noheadings --raw --output TYPE,NPROCS,USER -Q "${lsns_expr}")
if ! [ "${lsns_output}" == "net 0 root" ]; then
echo lsfd_inode: $lsfd_inode
echo lsns_output: $lsns_output
read child_pidns < $FIFO_DATA
expected="$child_userns $my_userns $my_userns"
- actual=$("$TS_CMD_LSNS" -t user -n -o NS,PNS,ONS "$child_userns" | uniq)
+ actual=$("$TS_CMD_LSNS" --type user --noheadings --output NS,PNS,ONS "$child_userns" | uniq)
test "$expected" = "$actual"
RESULT=$?
if [ $RESULT -ne 0 ]; then
for t in $(for t0 in "${!tcase[@]}"; do echo "$t0"; done | sort); do
column=$t
expected=${tcase[$t]}
- output=$(${TS_CMD_LSNS} -n --raw -o $column -Q "NS == $NETNS")
+ output=$(${TS_CMD_LSNS} --noheadings --raw --output $column --filter "NS == $NETNS")
echo "$column \$? $?"
if [[ "${output}" == "$expected" ]]; then
fi
echo "===LSNS output" >> $LOG
- $TS_CMD_LSNS -o+NETNSID,NSFS --type net >> $LOG
+ $TS_CMD_LSNS --output +NETNSID,NSFS --type net >> $LOG
LSNS_ID=$($TS_CMD_LSNS -n -o NETNSID --type net --task $PID | { read VAL; echo $VAL; } )
echo "===LSNS_ID=$LSNS_ID" >> $LOG
local O
ts_init_subtest "$1"
- if O=$($TS_CMD_LSNS --raw --noheadings -Q "NETNSID == '$NETNSID'" -o $1); then
+ if O=$($TS_CMD_LSNS --raw --noheadings --filter "NETNSID == '$NETNSID'" --output $1); then
if "$eval_func" "$O"; then
echo OK
else