
431 S.E.2d 330 (1993)
William M. McCLENNY, Jr.
v.
Edward W. MURRAY, Director of the Department of Corrections, et al.
Record No. 921549.
Supreme Court of Virginia.
June 11, 1993.
William M. McClenny, Jr., pro se.
Robert Q. Harris, Asst. Atty. Gen. (Stephen D. Rosenthal, Atty. Gen., on brief), for appellees.
Present: All the Justices.
HASSELL, Justice.
In this appeal, we consider whether a writ of habeas corpus ad subjiciendum is available to a convicted felon who was sentenced to pay fines and placed on supervised probation.
The facts are not in dispute. William M. McClenny, Jr. was convicted of three separate felony offenses of forgery, uttering, and larceny. The jury recommended sentences of $2,500 in fines for each conviction.
The trial court suspended the fines for two convictions, placed McClenny on supervised probation for three years, and ordered that he perform 180 hours of community service. Additionally, McClenny was ordered to submit a blood sample for DNA analysis, at his expense, in accordance with Code §§ 19.2-310.2 through -310.7. No term of imprisonment was imposed for any conviction.
McClenny subsequently filed a writ of habeas corpus ad subjiciendum in the circuit court, alleging ineffective assistance of counsel. The Commonwealth filed a motion to dismiss, asserting, among other things, that under the sentence imposed, Edward W. Murray, Director of the Department of Corrections and Henry Kennon, Sheriff of Louisa County, have no authority to hold or detain McClenny and, therefore, detention, as defined for habeas corpus jurisdiction, does not exist. In dismissing McClenny's petition, the trial court held, among other things, that it did not have habeas corpus jurisdiction because the "petitioner has not been sentenced to incarceration by said three convictions and that no incarceration term was suspended by the court." The court dismissed the petition, and we awarded McClenny an appeal.
McClenny argues that "actual physical restraint to invoke habeas corpus" jurisdiction is no longer a requirement and that he is being detained within the meaning of Code § 8.01-654(A) because he must submit to DNA screening, he must report to his probation officer, and he must perform community service. We disagree.
Code § 8.01-654(A) states:
The writ of habeas corpus ad subjiciendum shall be granted forthwith by any circuit court, to any person who shall apply for the same by petition, showing by affidavits or other evidence probable cause to believe that he is detained without lawful authority.
The clear language contained in this statute requires that the petitioner show that *331 he is being detained without lawful authority.
Furthermore, applying common law, we have held that the purpose of the writ of habeas corpus is to test the legality of a prisoner's detention.

Habeas corpus is a writ of inquiry granted to determine whether a person "is detained without lawful authority." It is available only where the release of the prisoner from his immediate detention will follow as a result of an order in his favor. It is not available to secure a judicial determination of any question which, even if determined in the prisoner's favor, could not affect the lawfulness of his immediate custody and detention. It cannot be used to modify or revise a judgment of conviction.
McDorman v. Smyth, 187 Va. 522, 525, 47 S.E.2d 441, 443-44 (1948) (citations omitted); see Blowe v. Peyton, 208 Va. 68, 73, 155 S.E.2d 351, 355-56 (1967); Peyton v. Williams, 206 Va. 595, 601, 145 S.E.2d 147, 151 (1965); Smyth v. Midgett, 199 Va. 727, 730, 101 S.E.2d 575, 578 (1958).
In Smyth v. Holland, 199 Va. 92, 97 S.E.2d 745 (1957), cert. denied, 357 U.S. 944, 78 S.Ct. 1394, 2 L.Ed.2d 1556 (1958), we considered whether a circuit court had jurisdiction to consider the validity of a conviction after the underlying sentence had been served. We stated:
We have had frequent occasion in recent years to discuss the scope and functions of the writ of habeas corpus and the grounds for relief by means of the writ. It will serve no useful purpose to restate what we have heretofore said at length, other than to say, by way of summary, that the only question which the writ presents is whether or not the prisoner "is detained without lawful authority...." Thus, the scope of the inquiry is limited to the propriety of the prisoner's present detention, that is, whether his detention is by due process of law.
Id. at 96-97, 97 S.E.2d at 748 (citations omitted).[*] Additionally, we have said that "[a] petition for habeas corpus and an appeal from a judgment granting the writ both test the legality of the incarceration rather than the guilt or innocence of the prisoner." Virginia Dep't. of Corrections v. Crowley, 227 Va. 254, 263, 316 S.E.2d 439, 443 (1984).
Accordingly, we hold that the trial court did not have jurisdiction to consider McClenny's writ of habeas corpus. His writ of habeas corpus could not test the legality of any incarceration because he was not sentenced to any term of incarceration, but only fined and placed on supervised probation. Thus, he cannot show that he is "detained" within the intendment of Code § 8.01-654(A).
We will affirm the judgment of the trial court.
Affirmed.
NOTES
[*]  The scope of the common law habeas corpus review has been expanded by Code § 8.01-654(B)(3), which states: "Such petition may allege detention without lawful authority through challenge to a conviction, although the sentence imposed for such conviction is suspended or is to be served subsequently to the sentence currently being served by the petitioner." This statutory provision is not applicable here because McClenny did not receive a suspended sentence of incarceration.
