7686729069
Extract protocol-agnostic FenceTimeline from Intel to shared src/drivers/fence.rs — atomic-based fence tracking suitable for Intel, VIRGL, and AMD drivers. Extract protocol-agnostic SyncobjManager from Intel to shared src/drivers/syncobj.rs — syncobj create/destroy/signal/reset/ wait/query and sync_file fd export/import. Wire both into VirtioDriver: - Add FenceTimeline + SyncobjManager fields - Implement all 5 GpuDriver syncobj trait methods (create, destroy, wait, export_fd, import_fd) - Track fence seqnos in virgl_submit_3d (allocate before submit, signal after completion) Intel fence.rs and syncobj.rs converted to thin re-export modules pointing at shared sources — no behavioral change for Intel driver. This gives Mesa VIRGL userspace the standard DRM syncobj API for GPU/compositor synchronization.
78 lines
2.3 KiB
Bash
Executable File
78 lines
2.3 KiB
Bash
Executable File
#!/bin/sh
|
|
# Test 'l' command with different widths
|
|
|
|
# Copyright (C) 2016-2017 Free Software Foundation, Inc.
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
. "${srcdir=.}/testsuite/init.sh"; path_prepend_ ./sed
|
|
print_ver_ sed
|
|
|
|
fail=0
|
|
|
|
# 10 20 30 40 50 60 70 75
|
|
cat <<\EOF >in1 || framework_failure_
|
|
0123456789012345678901234567890123456789012345678901234567890123456789012345
|
|
EOF
|
|
|
|
# default: 70 characters (including the \n)
|
|
cat <<\EOF >exp-def || framework_failure_
|
|
012345678901234567890123456789012345678901234567890123456789012345678\
|
|
9012345$
|
|
EOF
|
|
|
|
# 11 characters
|
|
cat <<\EOF >exp-11 || framework_failure_
|
|
0123456789\
|
|
0123456789\
|
|
0123456789\
|
|
0123456789\
|
|
0123456789\
|
|
0123456789\
|
|
0123456789\
|
|
012345$
|
|
EOF
|
|
|
|
# command 'l n' is a gnu extension, rejected in posix mode
|
|
cat <<\EOF >exp-err-posix-ln || framework_failure_
|
|
sed: -e expression #1, char 2: extra characters after command
|
|
EOF
|
|
|
|
# sed's default: 70 characters
|
|
sed -n l in1 >out-def || fail=1
|
|
compare_ exp-def out-def || fail=1
|
|
|
|
# limit with COLS envvar, sed subtracts one to avoid ttys linewraps
|
|
COLS=12 sed -n l in1 >out-cols12 || fail=1
|
|
compare_ exp-11 out-cols12 || fail=1
|
|
|
|
# invalid COLS envvar should be ignored (wrap at default=70)
|
|
COLS=0 sed -n l in1 >out-cols0 || fail=1
|
|
compare_ exp-def out-cols0 || fail=1
|
|
COLS=foo sed -n l in1 >out-cols-foo || fail=1
|
|
compare_ exp-def out-cols-foo || fail=1
|
|
|
|
# limit with -l parameter
|
|
sed -l 11 -n l in1 >out-l11 || fail=1
|
|
compare_ exp-11 out-l11 || fail=1
|
|
|
|
# limit with 'ln' command (gnu extension)
|
|
sed -n l11 in1 >out-ln-11 || fail=1
|
|
compare_ exp-11 out-ln-11 || fail=1
|
|
|
|
# limit with 'ln' command (gnu extension)
|
|
returns_ 1 sed --posix -n l11 in1 2>err-posix-ln || fail=1
|
|
compare_ exp-err-posix-ln err-posix-ln || fail=1
|
|
|
|
Exit $fail
|