Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-99674

QFile::write() does not report errors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • Icon: P1: Critical P1: Critical
    • None
    • 5.15, 6.2.2
    • Core: I/O
    • None
    • Linux/X11

      QFile::write() returns always success (the number of bytes that should be written) regardless whether the write actually succeeds or not. See the attached error case example for a proof.

      How to run it:

      1.  Compile the test kernel module, that creates a sysfs file that always returns EBUSY on write.
      2. Load the module. A "/sys/devices/qfile/ebusy" file should appear in the filesystem.
      3. Try "echo test > /sys/devices/qfile/ebusy". You will get an error from the shell.
      4. Compile the test application.
      5. Run the test application. You will get no error from QFile::write().

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            thiago Thiago Macieira
            tumic Martin Tůma
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes