def METHOD_NAME(uvm_plain_rw):
    """
    Test intercepting and handling SIGXFSZ.
    """
    microvm = uvm_plain_rw
    microvm.spawn()
    # We don't need to monitor the memory for this test.
    microvm.memory_monitor = None
    # We need to use the Sync file engine type. If we use io_uring we will not
    # get a SIGXFSZ. We'll instead get an errno 27 File too large as the
    # completed entry status code.
    microvm.basic_config(rootfs_io_engine="Sync")
    microvm.start()
    metrics_jail_path = microvm.metrics_file
    metrics_fd = open(metrics_jail_path, encoding="utf-8")
    line_metrics = metrics_fd.readlines()
    assert len(line_metrics) == 1
    firecracker_pid = int(microvm.jailer_clone_pid)
    size = os.path.getsize(metrics_jail_path)
    # The SIGXFSZ is triggered because the size of rootfs is bigger than
    # the size of metrics file times 3. Since the metrics file is flushed
    # twice we have to make sure that the limit is bigger than that
    # in order to make sure the SIGXFSZ metric is logged
    res.prlimit(firecracker_pid, res.RLIMIT_FSIZE, (size * 3, res.RLIM_INFINITY))
    while True:
        try:
            utils.run_cmd("ps -p {}".format(firecracker_pid))
            sleep(1)
        except ChildProcessError:
            break
    microvm.expect_kill_by_signal = True
    msg = "Shutting down VM after intercepting signal 25, code 0"
    microvm.check_log_message(msg)
    metric_line = json.loads(metrics_fd.readlines()[0])
    assert metric_line["signals"]["sigxfsz"] == 1