Test_write_errors() fails all the time on my xubuntu-18.04.5 x86_64 machine.
The test was recently introduced by:
commit 36f96a515109dc1fad279571a645c0f0d65f2de4 (tag: v8.2.2849)
Author: Yegappan Lakshmanan <yega...@yahoo.com>
Date: Thu May 13 18:33:16 2021 +0200
patch 8.2.2849: bufwrite not sufficiently tested
Problem: Bufwrite not sufficiently tested.
Solution: Add a few more tests. (Yegappan Lakshmanan, closes #8192)
To Reproduce
$ cd vim/src/testdir
$ make test_writefile
...snip...
Executed 28 tests in 1.875718 seconds
1 FAILED:
Found errors in Test_write_errors():
command line..script /home/pel/sb/vim/src/testdir/runtest.vim[473]..function RunTheTest[44]..Test_write_errors line 53: Expected 'E505: ' but got 'E503: "/dev/loop0" is not a file or writable device': write
$ ls -l /dev/loop0
brw-rw---- 1 root plugdev 7, 0 mei 13 18:37 /dev/loop0
Environment
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled May 14 2021 02:36:52)
Included patches: 1-2850
Compiled by pel@pel-cirrus7
Huge version with GTK3 GUI. Features included (+) or not (-):
+acl -farsi +mouse_sgr +tag_binary
+arabic +file_in_path -mouse_sysmouse -tag_old_static
+autocmd +find_in_path +mouse_urxvt -tag_any_white
+autochdir +float +mouse_xterm -tcl
-autoservername +folding +multi_byte +termguicolors
+balloon_eval -footer +multi_lang +terminal
+balloon_eval_term +fork() -mzscheme +terminfo
+browse +gettext +netbeans_intg +termresponse
++builtin_terms -hangul_input +num64 +textobjects
+byte_offset +iconv +packages +textprop
+channel +insert_expand +path_extra +timers
+cindent +ipv6 +perl +title
+clientserver +job +persistent_undo +toolbar
+clipboard +jumplist +popupwin +user_commands
+cmdline_compl +keymap +postscript +vartabs
+cmdline_hist +lambda +printer +vertsplit
+cmdline_info +langmap +profile +virtualedit
+comments +libcall -python +visual
+conceal +linebreak +python3 +visualextra
+cryptv +lispindent +quickfix +viminfo
+cscope +listcmds +reltime +vreplace
+cursorbind +localmap +rightleft +wildignore
+cursorshape -lua -ruby +wildmenu
+dialog_con_gui +menu +scrollbind +windows
+diff +mksession +signs +writebackup
+digraphs +modify_fname +smartindent +X11
+dnd +mouse +sound -xfontset
-ebcdic +mouseshape +spell +xim
+emacs_tags +mouse_dec +startuptime +xpm
+eval +mouse_gpm +statusline +xsmp_interact
+ex_extra -mouse_jsbterm -sun_workshop +xterm_clipboard
+extra_search +mouse_netterm +syntax -xterm_save
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
defaults file: "$VIMRUNTIME/defaults.vim"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/usr/local/share/vim"
Compilation: clang-12 -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -g -O2 -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DEXITFREE -DABORT_ON_INTERNAL_ERROR
Linking: clang-12 -Wl,-E -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -ltinfo -lselinux -lcanberra -lacl -lattr -lgpm -ldl -Wl,-E -fstack-protector-strong -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu/perl/5.26/CORE -lperl -ldl -lm -lpthread -lcrypt -L/usr/lib/python3.6/config-3.6m-x86_64-linux-gnu -lpython3.6m -lpthread -ldl -lutil -lm
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.![]()
Test_write_errors()fails all the time on my xubuntu-18.04.5 x86_64 machine.
—
You are receiving this because you commented.
On Fri, May 14, 2021, 03:35 vim-dev ML ***@***.***> wrote:
> Hi Dominique,
>
> On Thu, May 13, 2021 at 6:01 PM Dominique Pellé ***@***.***>
> wrote:
>
> > Test_write_errors() fails all the time on my xubuntu-18.04.5 x86_64
> > machine.
> >
>
> I am running Ubuntu 21.04 and the test passes there. If you manually
> edit /dev/loop0 and run the ":write" and ":write!" commands, what error
> code do you see? Do you run as a user who has root privileges?
>
II get E503, as when I run the test.
I do not run as root but as regular user.
Sorry I'm brief as my Internet is currently broken (sent from my phone).
What is the output of ls -l /dev/loop0 for you?
I posted the output of that command on my system in the bug description.
—
You are receiving this because you commented.
What is the output of
ls -l /dev/loop0for you?
I posted the output of that command on my system in the bug description.
It appears the problem is that somehow /dev/loop0 is not considered read-only.
The check for it being a special device, which you can't write to anyway comes later.
So the ":write /dev/loop0" may or may not say the file is readonly, but
it always fails for ":write! /dev/loop0" because it's a special device.
We should probably check for a special device earlier, so that it's clear adding a "!" won't help.
—
You are receiving this because you commented.
I did not reply earlier as I had a broken internet (now resolved).
Anyway, this ticket was fixed in the mean time.
For the record and for comparison with what @yegappan posted earlier, this is what I get on my machine where the test used to fail:
$ ls -l /dev/loop0
brw-rw---- 1 root plugdev 7, 0 mei 18 04:59 /dev/loop0
$ uname -a
Linux pel-cirrus7 4.15.0-143-generic #147-Ubuntu SMP Wed Apr 14 16:10:11 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
$ id
uid=1000(pel) gid=1000(pel) groups=1000(pel),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),118(lpadmin),126(sambashare),132(libvirt)
$ groups
pel adm cdrom sudo dip plugdev lpadmin sambashare libvirt
—
You are receiving this because you commented.